| | |
| | | throw new CoolException(param.getBarcode() + "数据正在进行入库"); |
| | | } |
| | | |
| | | //判断托盘是否已经在库 |
| | | if (locDetlService.selectCount(new EntityWrapper<LocDetl>() |
| | | .eq("zpallet", 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) { |
| | | hasContainerCode = true; |
| | | containerCodeCount++; |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | //判断料箱是否已经出现在入库通知档、库存中 |
| | | if (hasContainerCode) { |
| | | if (containerCodeCount != param.getCombMats().size()) { |
| | | throw new CoolException(param.getBarcode() + "托盘有" + (param.getCombMats().size()-containerCodeCount) + "个未扫描的料箱"); |
| | | } |
| | | |
| | | for (CombParam.CombMat combMat : param.getCombMats()) { |
| | | //判断料箱是否正在入库 |
| | | if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). |
| | | eq("supp_code", combMat.getContainerCode()).eq("io_status", "N")) > 0) { |
| | | throw new CoolException(combMat.getContainerCode() + "料箱正在进行入库"); |
| | | } |
| | | |
| | | //判断料箱是否已经在库 |
| | | if (locDetlService.selectCount(new EntityWrapper<LocDetl>() |
| | | .eq("supp_code", combMat.getContainerCode())) > 0) { |
| | | throw new CoolException(combMat.getContainerCode() + "料箱已经在库"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // todo: 不下线重新入库 |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(param.getBarcode()); |
| | | if (wrkMast != null && wrkMast.getWrkSts() == 18) { |