PurchaseDealerOrderController.java 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. package com.trade.purchase.dealer;
  2. import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  3. import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  4. import com.baomidou.mybatisplus.core.metadata.IPage;
  5. import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
  6. import com.baomidou.mybatisplus.core.toolkit.StringUtils;
  7. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  8. import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
  9. import com.trade.purchase.order.dto.OrderSubmitDto;
  10. import com.trade.purchase.order.entity.Order;
  11. import com.trade.purchase.order.entity.OrderFees;
  12. import com.trade.purchase.order.entity.OrderFiles;
  13. import com.trade.purchase.order.entity.OrderItems;
  14. import com.trade.purchase.order.enums.OrderTypeEnum;
  15. import com.trade.purchase.order.service.IOrderFeesService;
  16. import com.trade.purchase.order.service.IOrderFilesService;
  17. import com.trade.purchase.order.service.IOrderItemsService;
  18. import com.trade.purchase.order.service.IOrderService;
  19. import com.trade.purchase.order.vo.OrderDTO;
  20. import com.trade.purchase.order.vo.OrderVO;
  21. import io.swagger.annotations.Api;
  22. import io.swagger.annotations.ApiOperation;
  23. import io.swagger.annotations.ApiParam;
  24. import lombok.AllArgsConstructor;
  25. import org.springblade.client.entity.CorpsDesc;
  26. import org.springblade.client.entity.StorageDesc;
  27. import org.springblade.client.feign.ICorpsDescClient;
  28. import org.springblade.client.feign.IGoodsDescClient;
  29. import org.springblade.client.feign.IStorageClient;
  30. import org.springblade.client.vo.GoodsDescVO;
  31. import org.springblade.core.boot.ctrl.BladeController;
  32. import org.springblade.core.secure.utils.AuthUtil;
  33. import org.springblade.core.tool.api.R;
  34. import org.springblade.core.tool.utils.CollectionUtil;
  35. import org.springblade.core.tool.utils.Func;
  36. import org.springblade.system.user.entity.User;
  37. import org.springblade.system.user.feign.IUserClient;
  38. import org.springframework.web.bind.annotation.*;
  39. import javax.validation.Valid;
  40. import java.math.BigDecimal;
  41. import java.util.Collections;
  42. import java.util.Date;
  43. import java.util.List;
  44. import java.util.stream.Collectors;
  45. /**
  46. * 进口采购订单表 控制器
  47. *
  48. * @author BladeX
  49. * @since 2021-09-26
  50. */
  51. @RestController
  52. @AllArgsConstructor
  53. @RequestMapping("/dealer/purchaseOrder")
  54. @Api(value = "经销商采购订单", tags = "经销商采购订单")
  55. public class PurchaseDealerOrderController extends BladeController {
  56. private final IOrderService orderService;
  57. private final IOrderFeesService orderFeesService;
  58. private final IOrderFilesService orderFilesService;
  59. private final IOrderItemsService orderItemsService;
  60. private final String ERROR_MSG = "缺少查询信息";
  61. private ICorpsDescClient corpsDescClient;//获取客户信息
  62. private IGoodsDescClient goodsDescClient;
  63. private IUserClient userClient;
  64. private IStorageClient iStorageClient;//库区信息
  65. /**
  66. * 详情
  67. */
  68. @GetMapping("/{id}")
  69. @ApiOperationSupport(order = 1)
  70. @ApiOperation(value = "采购订单查看详情", notes = "传入order")
  71. public R<OrderVO> detail(@PathVariable(value = "id") String id) {
  72. R<OrderVO> orderMessage = orderService.getOrderMessage(id);
  73. if(orderMessage.isSuccess()&&orderMessage.getData()!=null)
  74. {
  75. R<User> user1 = userClient.userInfoById(orderMessage.getData().getUpdateUser());
  76. if (user1.isSuccess() && user1.getData() != null){
  77. orderMessage.getData().setUpdateUserName(user1.getData().getName());
  78. }
  79. R<User> user = userClient.userInfoById(orderMessage.getData().getCreateUser());
  80. if (user.isSuccess() && user.getData() != null){
  81. orderMessage.getData().setCreateUserName(user.getData().getName());
  82. }
  83. List<OrderItems> orderItemsList = orderMessage.getData().getOrderItemsList();
  84. if (CollectionUtil.isNotEmpty(orderItemsList)) {
  85. orderItemsList.forEach(e->{
  86. R<User> user2 = userClient.userInfoById(e.getUpdateUser());
  87. if (user2.isSuccess() && user2.getData() != null){
  88. e.setUpdateUserName(user2.getData().getName());
  89. }
  90. R<User> user3 = userClient.userInfoById(e.getCreateUser());
  91. if (user3.isSuccess() && user3.getData() != null){
  92. e.setCreateUserName(user3.getData().getName());
  93. }
  94. });
  95. }
  96. }
  97. return orderMessage;
  98. }
  99. /**
  100. * 分页 销售或采购订单表
  101. */
  102. @GetMapping("/list")
  103. @ApiOperationSupport(order = 2)
  104. @ApiOperation(value = "采购订单表列表(内贸 外贸 出口)", notes = "传入order")
  105. public R<?> list( @RequestParam(name = "current", defaultValue = "1") Integer current,
  106. @RequestParam(name = "size", defaultValue = "10") Integer size,
  107. @RequestParam(value = "billNo",required = false) String billNo,//提单号
  108. @RequestParam(value = "orderNo",required = false) String orderNo,//合同号
  109. @RequestParam(value = "tradeType",required = false) String tradeType,//贸易类型
  110. @RequestParam(value = "strCorpName",required = false) String strCorpName,//供应商名称
  111. @RequestParam(value = "corpId",required = false) String corpId,//供应商id
  112. @RequestParam(value = "strPurchaserName",required = false) String strPurchaserName,//采购商名称
  113. @RequestParam(value = "salesName",required = false) String salesName,//业务员
  114. @RequestParam(value = "banksAccountName",required = false) String banksAccountName,//公司户头
  115. @RequestParam(value = "packageRemarks",required = false) String packageRemarks,//包装要求
  116. @RequestParam(value = "createUser",required = false) Long createUser,//制单人
  117. @RequestParam(value = "paymentType",required = false) String paymentType,//付款方式
  118. @RequestParam(value = "createStartTime",required = false) String createStartTime,//制单日期
  119. @RequestParam(value = "createEndTime",required = false) String createEndTime,//制单日期
  120. @RequestParam(value = "businesStartDate",required = false) String businesStartDate,//订单开始时间 busines_date
  121. @RequestParam(value = "businesEndDate",required = false) String businesEndDate,//订单结束时间
  122. @RequestParam(value = "accountsCollectionStartDate",required = false) String accountsCollectionStartDate,//应收(付)款开始时间 accounts_collection_date
  123. @RequestParam(value = "accountsCollectionEndDate",required = false) String accountsCollectionEndDate,//应收(付)款结束时间
  124. @RequestParam(value = "dateOfStartArrival",required = false) String dateOfStartArrival,//实际到港开始日期 date_of_arrival
  125. @RequestParam(value = "dateOfEndArrival",required = false) String dateOfEndArrival,//实际到港结束时间,
  126. @RequestParam(value = "requiredDeliveryStartDate",required = false) String requiredDeliveryStartDate,//要求发货开始日期 required_delivery_date
  127. @RequestParam(value = "requiredDeliveryEndDate",required = false) String requiredDeliveryEndDate,//要求发货结束时间
  128. @RequestParam(value = "requiredArrivalStartDate",required = false) String requiredArrivalStartDate,//要求到货开始日期 required_arrival_date
  129. @RequestParam(value = "requiredArrivalEndDate",required = false) String requiredArrivalEndDate,//要求到货结束日期
  130. @RequestParam(value = "creditStartDate",required = false) String creditStartDate,//信用证到期日-开始日期 credit_date
  131. @RequestParam(value = "creditEndDate",required = false) String creditEndDate,//信用证到期日-结束时间
  132. @RequestParam(value = "storageId",required = false) Long storageId,//仓库id
  133. Order order
  134. )
  135. {
  136. QueryWrapper<Order> queryWrapper =new QueryWrapper<>();
  137. //供应商
  138. if(StringUtils.isNotBlank(strCorpName))
  139. {
  140. List<CorpsDesc> corpsDescs = corpsDescClient.listCorpByName(strCorpName);
  141. if(CollectionUtils.isNotEmpty(corpsDescs))
  142. {
  143. List<Long> corpIds = corpsDescs.stream().map(CorpsDesc::getId).collect(Collectors.toList());
  144. queryWrapper.in("corp_id",corpIds);
  145. }
  146. else
  147. {
  148. return R.data(Collections.EMPTY_LIST,"暂无相关数据");
  149. }
  150. }
  151. //采购商
  152. if(StringUtils.isNotBlank(strPurchaserName))
  153. {
  154. List<CorpsDesc> corpsDescs = corpsDescClient.listCorpByName(strPurchaserName);
  155. if(CollectionUtils.isNotEmpty(corpsDescs))
  156. {
  157. List<Long> purchaserIds = corpsDescs.stream().map(CorpsDesc::getId).collect(Collectors.toList());
  158. queryWrapper.in("purchaser_id",purchaserIds);
  159. }
  160. else
  161. {
  162. return R.data(Collections.EMPTY_LIST,"暂无相关数据");
  163. }
  164. }
  165. queryWrapper.like(StringUtils.isNotBlank(banksAccountName),"banks_account_name",banksAccountName);
  166. queryWrapper.like(StringUtils.isNotBlank(packageRemarks),"package_remarks",packageRemarks);
  167. queryWrapper.like(StringUtils.isNotBlank(salesName),"sales_name",salesName);
  168. queryWrapper.like(StringUtils.isNotBlank(orderNo),"order_no",orderNo);
  169. queryWrapper.like(StringUtils.isNotBlank(paymentType),"payment_type",paymentType);
  170. queryWrapper.eq(StringUtils.isNotBlank(corpId),"corp_id",corpId);
  171. queryWrapper.eq(storageId != null,"storage_id",storageId);//仓库id
  172. queryWrapper.eq("tenant_id",AuthUtil.getTenantId());
  173. queryWrapper.eq(createUser!=null,"create_user",createUser);
  174. queryWrapper.eq("bill_type",OrderTypeEnum.PURCHASE.getType());
  175. queryWrapper.eq("trade_type",OrderTypeEnum.DEALER.getType());
  176. queryWrapper.like(StringUtils.isNotBlank(billNo),"bill_no",billNo);
  177. queryWrapper.between(StringUtils.isNotBlank(createStartTime)&&StringUtils.isNotBlank(createEndTime),"create_time",createStartTime,createEndTime);
  178. queryWrapper.between(StringUtils.isNotBlank(businesStartDate)&&StringUtils.isNotBlank(businesEndDate),"busines_date",businesStartDate,businesEndDate);
  179. queryWrapper.between(StringUtils.isNotBlank(accountsCollectionStartDate)&&StringUtils.isNotBlank(accountsCollectionEndDate),"accounts_collection_date",accountsCollectionStartDate,accountsCollectionEndDate);
  180. queryWrapper.between(StringUtils.isNotBlank(dateOfStartArrival)&&StringUtils.isNotBlank(dateOfEndArrival),"date_of_arrival",dateOfStartArrival,dateOfEndArrival);
  181. queryWrapper.between(StringUtils.isNotBlank(requiredDeliveryStartDate)&&StringUtils.isNotBlank(requiredDeliveryEndDate),"required_delivery_date",requiredDeliveryStartDate,requiredDeliveryEndDate);
  182. queryWrapper.between(StringUtils.isNotBlank(requiredArrivalStartDate)&&StringUtils.isNotBlank(requiredArrivalEndDate),"required_arrival_date",requiredArrivalStartDate,requiredArrivalEndDate);
  183. queryWrapper.between(StringUtils.isNotBlank(creditStartDate)&&StringUtils.isNotBlank(creditEndDate),"credit_date",creditStartDate,creditEndDate);
  184. queryWrapper.orderByDesc("create_time");
  185. Page<Order> page=new Page<>(current,size);
  186. IPage<Order> pages = orderService.page(page,queryWrapper);
  187. List<Order> records = pages.getRecords();
  188. if(CollectionUtils.isNotEmpty(records))
  189. {
  190. records.forEach(e->{
  191. if(e.getBelongToCorpId()!=null)
  192. {
  193. R<CorpsDesc> corpMessage3 = corpsDescClient.getCorpMessage(e.getBelongToCorpId());
  194. if(corpMessage3.getData()!=null)
  195. {
  196. e.setBelongToCorpName(corpMessage3.getData().getCname());
  197. }
  198. }
  199. //制单人名字
  200. if(e.getCreateUser()!=null)
  201. {
  202. R<User> userR = userClient.userInfoById(e.getCreateUser());
  203. if(userR.isSuccess())
  204. {
  205. e.setCreateUserName(userR.getData().getRealName());
  206. }
  207. }
  208. //修改制单人名字
  209. if(e.getUpdateUser()!=null)
  210. {
  211. R<User> userR = userClient.userInfoById(e.getUpdateUser());
  212. if(userR.isSuccess())
  213. {
  214. e.setUpdateUserName(userR.getData().getRealName());
  215. }
  216. }
  217. //获取供应商中文名
  218. if (e.getCorpId() != null){
  219. R<CorpsDesc> corpMessage1 = corpsDescClient.getCorpMessage(e.getCorpId());
  220. if(corpMessage1.getData()!=null)
  221. {
  222. e.setStrCorpName(corpMessage1.getData().getCname());
  223. }
  224. }
  225. //获取采购商中文名
  226. if (e.getPurchaserId() != null){
  227. R<CorpsDesc> corpMessage2 = corpsDescClient.getCorpMessage(e.getPurchaserId());
  228. if(corpMessage2.getData()!=null)
  229. {
  230. e.setStrPurchaserName(corpMessage2.getData().getCname());
  231. }
  232. }
  233. //仓库信息
  234. StorageDesc storageDesc = iStorageClient.findById(e.getStorageId());
  235. if(storageDesc!=null)
  236. {
  237. e.setStorageName(storageDesc.getCname());
  238. }
  239. List<OrderItems> orderItemsList = orderItemsService.list(new LambdaQueryWrapper<OrderItems>().eq(OrderItems::getIsDeleted, 0).eq(OrderItems::getPid, e.getId()));
  240. //是否有子项
  241. Boolean flag=orderItemsService.count(new LambdaQueryWrapper<OrderItems>().eq(OrderItems::getPid,e.getId()))>0?true:false;
  242. if(CollectionUtils.isNotEmpty(orderItemsList))
  243. {
  244. //子项总件数
  245. BigDecimal orderQuantity = orderItemsList.stream().filter(it -> it.getOrderQuantity() != null)
  246. .map(OrderItems::getOrderQuantity)
  247. .reduce(BigDecimal.ZERO, BigDecimal::add);
  248. e.setOrderQuantity(orderQuantity);
  249. //已收重量
  250. BigDecimal actualWeight = orderItemsList.stream().filter(it -> it.getAmount() != null)
  251. .map(OrderItems::getAmount)
  252. .reduce(BigDecimal.ZERO, BigDecimal::add);
  253. e.setAmount(actualWeight);
  254. }
  255. });
  256. }
  257. return R.data(pages);
  258. }
  259. /* *//**
  260. * 自定义分页 销售或采购订单表
  261. *//*
  262. @GetMapping("/page")
  263. @ApiOperationSupport(order = 3)
  264. @ApiOperation(value = "分页", notes = "传入order")
  265. public R<IPage<OrderVO>> page(OrderVO order, Query query) {
  266. order.setIsDeleted(0);
  267. order.setTenantId(AuthUtil.getTenantId());
  268. order.setBillType(OrderTypeEnum.PURCHASE.getType());
  269. order.setTradeType(OrderTypeEnum.IMPORT.getType());
  270. IPage<OrderVO> pages = orderService.selectOrderPage(Condition.getPage(query), order);
  271. return R.data(pages);
  272. }*/
  273. /**
  274. * 新增 销售或采购订单表
  275. */
  276. /*@PostMapping("/save")
  277. @ApiOperationSupport(order = 4)
  278. @ApiOperation(value = "新增", notes = "传入order")
  279. public R<String> save(@Valid @RequestBody OrderSubmitDto submitDto) {
  280. return orderService.saveOrderMessage(submitDto);
  281. }*/
  282. /**
  283. * 修改 销售或采购订单表
  284. */
  285. /*@PostMapping("/update")
  286. @ApiOperationSupport(order = 5)
  287. @ApiOperation(value = "修改", notes = "传入order")
  288. public R<String> update(@Valid @RequestBody Order order) {
  289. if (order.getId() == null) {
  290. return R.fail(ERROR_MSG);
  291. }
  292. order.setIsDeleted(1);
  293. return R.status(orderService.updateById(order));
  294. }*/
  295. /**
  296. * 新增或修改 销售或采购订单表
  297. */
  298. @PostMapping("/submit")
  299. @ApiOperationSupport(order = 6)
  300. @ApiOperation(value = "新增或修改", notes = "传入order")
  301. public R<String> submit(@Valid @RequestBody OrderSubmitDto submitDto)
  302. {
  303. /*if(ObjectUtil.isEmpty(submitDto.getBillType())||ObjectUtil.isEmpty(submitDto.getSrcId())||ObjectUtil.isEmpty(submitDto.getBusinesDate()))
  304. {
  305. throw new ServiceException("来源、合同日期、贸易类型不能为空!");
  306. }*/
  307. submitDto.setOrderTypeEnum(OrderTypeEnum.PURCHASE);
  308. submitDto.setBillType(OrderTypeEnum.PURCHASE.getType());
  309. submitDto.setTradeType(OrderTypeEnum.DEALER.getType());
  310. return orderService.submitOrderMessage(submitDto);
  311. }
  312. /**
  313. * 删除 销售或采购订单表
  314. */
  315. @PostMapping("/remove")
  316. @ApiOperationSupport(order = 7)
  317. @ApiOperation(value = "删除", notes = "传入ids")
  318. public R<String> remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
  319. return R.status(orderService.removeByIds(Func.toLongList(ids)));
  320. }
  321. /**
  322. * 删除采购明细信息
  323. */
  324. @PostMapping("/removeByItem")
  325. @ApiOperationSupport(order = 8)
  326. @ApiOperation(value = "删除采购明细信息", notes = "传入order")
  327. public R<String> update(@Valid @RequestBody OrderItems items) {
  328. if (items.getId() == null) {
  329. return R.fail(ERROR_MSG);
  330. }
  331. return R.status(orderItemsService.removeById(items.getId()));
  332. }
  333. /**
  334. * 删除费用信息
  335. */
  336. @PostMapping("/removeByFees")
  337. @ApiOperationSupport(order = 8)
  338. @ApiOperation(value = "删除费用信息", notes = "传入order")
  339. public R<String> update(@Valid @RequestBody OrderFees order) {
  340. if (order.getId() == null) {
  341. return R.fail(ERROR_MSG);
  342. }
  343. return R.status(orderFeesService.removeById(order.getId()));
  344. }
  345. /**
  346. * 删除订单文件信息
  347. *
  348. * @param order
  349. * @return
  350. */
  351. @PostMapping("/removeByFiles")
  352. @ApiOperationSupport(order = 9)
  353. @ApiOperation(value = "删除文件信息", notes = "传入order")
  354. public R<String> update(@Valid @RequestBody OrderFiles order) {
  355. if (order.getId() == null) {
  356. return R.fail(ERROR_MSG);
  357. }
  358. return R.status(orderFilesService.removeById(order.getId()));
  359. }
  360. @GetMapping("getItemByPid")
  361. @ApiOperation(value = "查询采购订单的子明细", notes = "通过采购订单的id查询")
  362. public R getItemByPid(@RequestParam(value = "id",required = true)Long id)
  363. {
  364. LambdaQueryWrapper<OrderItems> lambdaQueryWrapper=new LambdaQueryWrapper<>();
  365. lambdaQueryWrapper.eq(OrderItems::getPid,id);
  366. List<OrderItems> itemsList = orderItemsService.list(lambdaQueryWrapper);
  367. return R.data(itemsList);
  368. }
  369. @GetMapping("getSysNo")
  370. @ApiOperation(value = "采购订单获取系统编号prefix=GN JK CK", notes = "采购订单获取系统编号prefix=GN JK CK")
  371. public R getSysNo(@RequestParam(value = "prefix",required = true)String prefix,
  372. @RequestParam(value = "tradeType",required = true)String tradeType)
  373. {
  374. return orderService.getSysNo(prefix,tradeType);
  375. }
  376. @GetMapping("getItemListByConditions")
  377. @ApiOperation(value = "收发单-获取商品明细", notes = "收发单-获取商品明细")
  378. public R getItemListByConditions(@RequestParam(name = "current", defaultValue = "1") Integer current,
  379. @RequestParam(name = "size", defaultValue = "10") Integer size,
  380. @RequestParam(name = "tradeType", required = true) String tradeType,
  381. @RequestParam(name = "orderNo", required = false) String orderNo,
  382. @RequestParam(name = "corpId", required = false) Long corpId,
  383. @RequestParam(name = "startDate", required = false) String startDate,
  384. @RequestParam(name = "endDate", required = false) String endDate
  385. )
  386. {
  387. Page<OrderDTO> page=new Page<>(current,size);
  388. IPage<OrderDTO> iPage = orderService.listOrderItem(page, tradeType, orderNo, corpId, startDate, endDate);
  389. if(CollectionUtils.isNotEmpty(iPage.getRecords()))
  390. {
  391. iPage.getRecords().forEach(e->{
  392. //商品信息
  393. R<GoodsDescVO> goodsDescVOR = goodsDescClient.selectGoodsMessage(e.getItemId());
  394. if(goodsDescVOR.isSuccess())
  395. {
  396. GoodsDescVO descVO = goodsDescVOR.getData();
  397. if(descVO!=null)
  398. {
  399. e.setPriceCategoryNames(descVO.getCname());
  400. }
  401. }
  402. //供应商信息
  403. if (e.getCorpId() != null){
  404. R<CorpsDesc> corpMessage = corpsDescClient.getCorpMessage(e.getCorpId());
  405. if(corpMessage.getData()!=null)
  406. {
  407. e.setCorpName(corpMessage.getData().getCname());
  408. }
  409. }
  410. });
  411. }
  412. return R.data(iPage);
  413. }
  414. /**
  415. * 更改打印时间和打印次数
  416. */
  417. @GetMapping("/print")
  418. @ApiOperationSupport(order = 11)
  419. @ApiOperation(value = "更改打印时间和打印次数", notes = "传入order")
  420. public R<Order> print(Order order) {
  421. if (order.getId() == null){
  422. throw new SecurityException("请选择要打印的单据");
  423. }
  424. Order service = orderService.getById(order.getId());
  425. service.setPrintNumber(service.getPrintNumber() +1);
  426. service.setPrintTime(new Date());
  427. return R.status(orderService.updateById(service));
  428. }
  429. /**
  430. * 确认或取消订单
  431. */
  432. @GetMapping("/dealerSubmit")
  433. @ApiOperationSupport(order = 12)
  434. @ApiOperation(value = "确认或取消订单", notes = "传入order")
  435. public R<Order> dealerSubmit(Order order) {
  436. if (order.getDealer() != 1 && order.getDealer() != 2){
  437. throw new SecurityException("缺少必要的参数");
  438. }
  439. if (order.getId() == null){
  440. throw new SecurityException("缺少必要的参数");
  441. }
  442. return orderService.dealerSubmit(order);
  443. }
  444. }