| | |
| | | throw new CoolException(param.getBarcode() + "数据已经在库"); |
| | | } |
| | | |
| | | //判断托盘是否已经在工作档 |
| | | if (wrkMastService.selectCount(new EntityWrapper<WrkMast>() |
| | | .eq("barcode", param.getBarcode())) > 0) { |
| | | throw new CoolException(param.getBarcode() + "数据已经在任务档中"); |
| | | } |
| | | |
| | | //判断是否存在料箱码 => 存在料箱码则要求提交上来的物料list必须全部都有料箱码 |
| | | boolean hasContainerCode = false; |
| | | int containerCodeCount = 0;//料箱码数量 |
| | | for (CombParam.CombMat combMat : param.getCombMats()) { |
| | | if (combMat.getContainerCode() != null) { |
| | | if(!Cools.isEmpty(combMat.getContainerCode())){ |
| | | //if (combMat.getContainerCode() != null) { |
| | | hasContainerCode = true; |
| | | containerCodeCount++; |
| | | continue; |
| | |
| | | // 生成入库通知档 |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | param.getCombMats().forEach(elem -> { |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(), elem.getCsocode(), elem.getIsoseq(),elem.getContainerCode()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(), elem.getCsocode(), elem.getIsoseq(),elem.getContainerCode(),elem.getProddate(),elem.getDeadline()); |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(),detlDto.getCsocode(),detlDto.getIsoseq(),detlDto.getContainerCode()); |
| | | assert one != null; |
| | |
| | | waitPakin.setAppeTime(now); |
| | | waitPakin.setModiUser(userId); |
| | | waitPakin.setModiTime(now); |
| | | |
| | | waitPakin.setProddate(detlDto.getProddate()); |
| | | waitPakin.setDeadline(detlDto.getDeadline()); |
| | | waitPakin.setThreeCode(detlDto.getCsocode()); |
| | | waitPakin.setDeadTime(detlDto.getIsoseq()); |
| | | waitPakin.setSuppCode(detlDto.getContainerCode()); |
| | |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(),elem.getCsocode(),elem.getIsoseq(),elem.getContainerCode()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(),elem.getCsocode(),elem.getIsoseq(),elem.getContainerCode(),elem.getProddate(),elem.getDeadline()); |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(),detlDto.getCsocode(),detlDto.getIsoseq(),detlDto.getContainerCode()); |
| | | assert one != null; |
| | |
| | | waitPakin.setAppeTime(now); |
| | | waitPakin.setModiUser(userId); |
| | | waitPakin.setModiTime(now); |
| | | |
| | | waitPakin.setProddate(detlDto.getProddate()); |
| | | waitPakin.setDeadline(detlDto.getDeadline()); |
| | | waitPakin.setThreeCode(detlDto.getCsocode()); |
| | | waitPakin.setDeadTime(detlDto.getIsoseq()); |
| | | waitPakin.setSuppCode(detlDto.getContainerCode()); |