|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WrkMastService wrkMastService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @GetMapping("/order/delete/v1") | 
|---|
|  |  |  | @AppAuth(memo = "订单信息删除") | 
|---|
|  |  |  | public synchronized R orderDelete(@RequestHeader(required = false) String appkey, | 
|---|
|  |  |  | @RequestParam String orderNo, | 
|---|
|  |  |  | HttpServletRequest request) { | 
|---|
|  |  |  | auth(appkey, orderNo, request); | 
|---|
|  |  |  | if (Cools.isEmpty(orderNo)) { | 
|---|
|  |  |  | return R.parse(BaseRes.PARAM); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | openService.orderDelete(orderNo); | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/tagSync/v1") | 
|---|
|  |  |  | @AppAuth(memo = "物料分类同步") | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private Double total; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String orderNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String customer; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public MatDto() { | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public MatDto(String matnr, String maknx, String batch, String specs, String manu, String memo, Double count, Double total) { | 
|---|
|  |  |  | 
|---|
|  |  |  | this.total = total; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public MatDto(String matnr, String maknx, String batch, String specs, String manu, String memo, Double count, Double total,String orderNo,String customer) { | 
|---|
|  |  |  | this.matnr = matnr; | 
|---|
|  |  |  | this.maknx = maknx; | 
|---|
|  |  |  | this.batch = batch; | 
|---|
|  |  |  | this.specs = specs; | 
|---|
|  |  |  | this.manu = manu; | 
|---|
|  |  |  | this.memo = memo; | 
|---|
|  |  |  | this.count = count; | 
|---|
|  |  |  | this.total = total; | 
|---|
|  |  |  | this.orderNo = orderNo; | 
|---|
|  |  |  | this.customer = customer; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public MatDto(String matNo, String maknx, Double count) { | 
|---|
|  |  |  | this.matnr = matNo; | 
|---|
|  |  |  | this.maknx = maknx; | 
|---|
|  |  |  | 
|---|
|  |  |  | List<LocDetlByTimeDTO> selectTimeLocDetl(TimeSelectParam param); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void syncTag(List<TagParam> param); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void orderDelete(String orderNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void orderDelete(String orderNo) { | 
|---|
|  |  |  | Order order = orderService.selectByNo(orderNo); | 
|---|
|  |  |  | if (order == null) { | 
|---|
|  |  |  | throw new CoolException("未查询到对应订单信息"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (order.getSettle() != 1){ | 
|---|
|  |  |  | throw new CoolException("该订单已有对应任务,禁止删除"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<OrderDetl> OrderDetl = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_no", orderNo)); | 
|---|
|  |  |  | if (!Cools.isEmpty(OrderDetl)) { | 
|---|
|  |  |  | orderDetlService.delete(new EntityWrapper<OrderDetl>().eq("order_no", orderNo)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | orderService.delete(new EntityWrapper<Order>().eq("order_no", orderNo)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | private StaDescService staDescService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WebSocketServer webSocketServer; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private OrderDetlService orderDetlService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/led/getTask") | 
|---|
|  |  |  | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | total = locDetl.getAnfme(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!Cools.isEmpty(wrkDetl.getOrderNo())){ | 
|---|
|  |  |  | OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("order_no", wrkDetl.getOrderNo()) | 
|---|
|  |  |  | .eq("matnr", wrkDetl.getMatnr()).eq("batch", wrkDetl.getBatch())); | 
|---|
|  |  |  | if (wrkMast.getIoType() == 101 || wrkMast.getIoType() == 1) { | 
|---|
|  |  |  | ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getBatch(), wrkDetl.getSpecs(), wrkDetl.getManu(), wrkDetl.getMemo(), wrkDetl.getAnfme(),total,orderDetl.getSuppCode(),orderDetl.getSku())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (wrkMast.getIoType() == 103 && (null == wrkDetl.getInspect() || 0 == wrkDetl.getInspect())) { | 
|---|
|  |  |  | ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getBatch(), wrkDetl.getSpecs(), wrkDetl.getManu(), wrkDetl.getMemo(), wrkDetl.getAnfme(),total,orderDetl.getSuppCode(),orderDetl.getSku())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (wrkMast.getIoType() == 107 || wrkMast.getIoType() == 104) { | 
|---|
|  |  |  | ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getBatch(), wrkDetl.getSpecs(), wrkDetl.getManu(), wrkDetl.getMemo(), wrkDetl.getAnfme(),total,orderDetl.getSuppCode(),orderDetl.getSku())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | if (wrkMast.getIoType() == 101 || wrkMast.getIoType() == 1) { | 
|---|
|  |  |  | ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getBatch(), wrkDetl.getSpecs(), wrkDetl.getManu(), wrkDetl.getMemo(), wrkDetl.getAnfme(),total)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | if (wrkMast.getIoType() == 107 || wrkMast.getIoType() == 104) { | 
|---|
|  |  |  | ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getBatch(), wrkDetl.getSpecs(), wrkDetl.getManu(), wrkDetl.getMemo(), wrkDetl.getAnfme(),total)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | commands.add(ledCommand); | 
|---|