| | |
| | | // 生成入库通知档 |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | param.getCombMats().forEach(elem -> { |
| | | DetlDto detlDto = new DetlDto(elem.getMatNo(), elem.getBatch(), elem.getCount()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme()); |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch()); |
| | | assert one != null; |
| | |
| | | } |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | waitPakin.sync(mat); |
| | | waitPakin.setBatch(detlDto.getBatch()); |
| | | waitPakin.setZpallet(param.getBarcode()); // 托盘码 |
| | | waitPakin.setIoStatus("N"); // 入出状态 |
| | | waitPakin.setAnfme(detlDto.getAnfme()); // 数量 |
| | |
| | | param.getCombMats().forEach(elem -> { |
| | | |
| | | // 订单明细数量校验 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatNo(), elem.getBatch()); |
| | | if (elem.getCount() > orderDetl.getEnableQty()) { |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatnr(), elem.getBatch()); |
| | | if (elem.getAnfme() > orderDetl.getEnableQty()) { |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法"); |
| | | } |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), elem.getMatNo(), elem.getBatch(), elem.getCount())) { |
| | | if (!orderDetlService.increase(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme())) { |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | |
| | | DetlDto detlDto = new DetlDto(elem.getMatNo(), elem.getBatch(), elem.getCount()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme()); |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch()); |
| | | assert one != null; |