| | |
| | | wrkMastService.insert(wrkMast); |
| | | |
| | | for (OrderDetl orderDetl : param.getCombMats()) { |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", orderDetl.getMatnr())); |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>() |
| | | .eq("supp_code", orderDetl.getStandby1()) |
| | | .eq("matnr", orderDetl.getMatnr())); |
| | | if (mat == null) { |
| | | throw new CoolException("保存工作档失败,物料信息不存在:" + orderDetl.getMatnr()); |
| | | } |
| | |
| | | for (CombParam.CombMat combMat : combParam.getCombMats()) { |
| | | List<LocDetl> locDetlList = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | .eq("loc_no", combParam.getLocNo()) |
| | | .eq(!Cools.isEmpty(combMat.getStandby1()), "supp_code", combMat.getStandby1()) |
| | | .eq("matnr", combMat.getMatnr())); |
| | | if (locDetlList.isEmpty()) { |
| | | return R.error("未查询到库存数据"); |
| | |
| | | wrkMast.setModiUser(userId); |
| | | wrkMastService.insert(wrkMast); |
| | | |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", combMat.getMatnr())); |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>() |
| | | .eq(!Cools.isEmpty(combMat.getStandby1()), "supp_code", combMat.getStandby1()) |
| | | .eq("matnr", combMat.getMatnr())); |
| | | if (mat == null) { |
| | | throw new CoolException("保存工作档失败,物料信息不存在:" + combMat.getMatnr()); |
| | | } |
| | |
| | | // elem.getBoxType1(), elem.getBoxType2(), elem.getBoxType3()); |
| | | OrderDetlPakin detls = orderDetlPakinService.selectOne(new EntityWrapper<OrderDetlPakin>() |
| | | .eq("order_id", order.getId()) |
| | | .eq("supp_code", elem.getStandby1()) |
| | | .eq("matnr", elem.getMatnr())); |
| | | if (Objects.isNull(elem.getBoxType1())) { |
| | | throw new CoolException("格层编码不能为空!!"); |
| | |
| | | } |
| | | }); |
| | | |
| | | Set<String> matnrs = detlDtos.stream().map(DetlDto::getMatnr).collect(Collectors.toSet()); |
| | | List<Mat> mats = matService.selectList(new EntityWrapper<Mat>().in("matnr", matnrs)); |
| | | Set<Long> tagIds = mats.stream().map(Mat::getTagId).collect(Collectors.toSet()); |
| | | List<Mat> tempMats = new ArrayList<>(); |
| | | for (DetlDto detlDto : detlDtos) { |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>() |
| | | .eq("matnr", detlDto.getMatnr()) |
| | | .eq("supp_code", detlDto.getStandby1())); |
| | | tempMats.add(mat); |
| | | } |
| | | |
| | | // Set<String> matnrs = tempMats.stream().map(Mat::getMatnr).collect(Collectors.toSet()); |
| | | Set<Long> tagIds = tempMats.stream().map(Mat::getTagId).collect(Collectors.toSet()); |
| | | if (tagIds.size() > 1) { |
| | | throw new CoolException("组托物料类型不一致,只有相同的物料分类才可以组托!!"); |
| | | } |
| | |
| | | orderDetl.setUpdateBy(userId); |
| | | orderDetl.setUpdateTime(now); |
| | | Wrapper wrapper = new EntityWrapper<OrderDetl>().eq("order_no", orderNo) |
| | | .eq(!Cools.isEmpty(orderDetl.getStandby1()), "supp_code", orderDetl.getStandby1()) |
| | | .eq("matnr", orderDetl.getMatnr()); |
| | | if (!Cools.isEmpty(orderDetl.getBatch())) { |
| | | wrapper.eq("batch", orderDetl.getBatch()); |
| | |
| | | .eq("area_id", basAreas.getId()) |
| | | .eq("frozen", 0) |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type) |
| | | // .eq("loc_no", params.getTarSite()) |
| | | .orderAsc(Arrays.asList("loc_no")) |
| | | .last("OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY")); |
| | | if (Objects.isNull(locCache)) { |
| | |
| | | if (container.getMixMax() < detlDtos.size()) { |
| | | throw new CoolException("超出容器最大混装数量,当前容器最大数量为:" + container.getMixMax() + "!!"); |
| | | } |
| | | Set<String> matnrs = detlDtos.stream().map(DetlDto::getMatnr).collect(Collectors.toSet()); |
| | | List<Mat> mats = matService.selectList(new EntityWrapper<Mat>().in("matnr", matnrs)); |
| | | Set<Long> tagIds = mats.stream().map(Mat::getTagId).collect(Collectors.toSet()); |
| | | List<Mat> tempMats = new ArrayList<>(); |
| | | for (DetlDto detlDto : detlDtos) { |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", detlDto.getMatnr()) |
| | | .eq("supp_code", detlDto.getStandby1())); |
| | | tempMats.add(mat); |
| | | } |
| | | Set<Long> tagIds = tempMats.stream().map(Mat::getTagId).collect(Collectors.toSet()); |
| | | if (tagIds.size() > 1) { |
| | | throw new CoolException("组托物料类型不一致,只有相同的物料分类才可以组托!!"); |
| | | } |
| | |
| | | .eq("dev_no", basStation.getDevNo()) |
| | | .eq("matnr", combMat.getMatnr()) |
| | | .eq("batch", combMat.getBatch()) |
| | | .eq("standby1", combMat.getStandby1())); |
| | | .eq(!Cools.isEmpty(combMat.getStandby1()), "standby1", combMat.getStandby1())); |
| | | if (Cools.isEmpty(basStationDetl)) { |
| | | basStationDetl = new BasStationDetl(); |
| | | Mat mat = matService.selectByMatnr(combMat.getMatnr()); |
| | |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectOne(new EntityWrapper<OrderDetlPakin>() |
| | | .eq("order_id", orderPakin.getId()) |
| | | .eq("matnr", combMat.getMatnr()) |
| | | .eq("batch", combMat.getBatch()) |
| | | .eq("standby1", combMat.getStandby1())); |
| | | .eq(!Cools.isEmpty(combMat.getBatch()),"batch", combMat.getBatch()) |
| | | .eq(!Cools.isEmpty(combMat.getStandby1()), "supp_code", combMat.getStandby1())); |
| | | if (Cools.isEmpty(orderDetlPakin)) { |
| | | throw new CoolException("检索单据明细数据失败"); |
| | | } |
| | |
| | | // 更新入库通知档 ioStatus ===>> Y |
| | | Wrapper<WaitPakin> wrapper = new EntityWrapper<WaitPakin>() |
| | | .eq("zpallet", pakin.getZpallet()); |
| | | |
| | | WaitPakin setParam = new WaitPakin(); |
| | | setParam.setLocNo(locNo); |
| | | setParam.setIoStatus("Y"); |
| | |
| | | if (container.getMixMax() > sets.size()) { |
| | | //余下可混放种类 |
| | | long suplus = Math.round((container.getMixMax() - sets.size()) * 10000) / 10000; |
| | | Mat mats = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", matnr)); |
| | | Mat mats = matService.selectOne(new EntityWrapper<Mat>() |
| | | .eq("supp_code", supId) |
| | | .eq("matnr", matnr)); |
| | | if (Objects.isNull(mats)) { |
| | | throw new CoolException("物料不存在!!"); |
| | | } |
| | |
| | | if (!taskDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | |
| | | } |
| | | |
| | | for (WaitPakin pakin : pakins) { |