| | |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setCrnNo(staDesc.getCrnNo()); |
| | | wrkMast.setMk(locMast.getMk()); |
| | | if (!wrkMastService.insert(wrkMast)) { |
| | | throw new CoolException("保存工作档失败,出库库位号:" + param.getLocNo()); |
| | | } |
| | |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setAppeUser(userId); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setMk(locMast.getMk()); |
| | | wrkMastService.insert(wrkMast); |
| | | |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", combMat.getMatnr())); |
| | |
| | | if (param.getBarcode().length() != 8) { |
| | | throw new CoolException("条码长度不是8位===>>" + param.getBarcode()); |
| | | } |
| | | if (param.getCombMats().size() > 1) { |
| | | // if (param.getCombMats().size() > 1) { |
| | | // throw new CoolException("不允许混料===>>" + param.getBarcode()); |
| | | // } |
| | | HashMap<String, Object> containMatnrMap = new HashMap<>(); |
| | | for (CombParam.CombMat mat : param.getCombMats()) { |
| | | if(!containMatnrMap.containsKey(mat.getMatnr())) { |
| | | containMatnrMap.put(mat.getMatnr(), 1); |
| | | } |
| | | } |
| | | |
| | | if (containMatnrMap.size() > 1) { |
| | | throw new CoolException("不允许混料===>>" + param.getBarcode()); |
| | | } |
| | | |
| | | |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", param.getBarcode())); |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", param.getBarcode())); |
| | |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setBarcode(locMast.getBarcode()); |
| | | wrkMast.setMk(locMast.getMk()); |
| | | if (!wrkMastService.insert(wrkMast)) { |
| | | throw new CoolException("保存工作档失败,出库库位号:" + locDetl.getLocNo()); |
| | | } |