diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java index 7e22997..6fb7fa7 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java @@ -476,7 +476,9 @@ public class BaseKnifeController extends BaseController { // 更新需要组装的数量 和 生产准备中已准备好的数量 zdTaskMap.put(techBom.getKnifeCode(), knifeHaveQuantity); - countMap.put(techBom.getKnifeCode(), countMap.get(techBom.getKnifeCode()) + techBom.getKnifeCount()); + countMap.put(techBom.getKnifeCode(), countMap.get(techBom.getKnifeCode()) + lockedBaseKnifeIds.size()); + + msg = msg + "【已预订" + lockedBaseKnifeIds.size() + "把整刀】"; } else { operLog.setJsonResult("基础物料不足进行组装工具:" + techBom.getKnifeCode()); operLogService.insertOperlog(operLog); @@ -485,7 +487,7 @@ public class BaseKnifeController extends BaseController { } else { // 更新需要组装的数量 和 生产准备中已准备好的数量 zdTaskMap.put(techBom.getKnifeCode(), knifeHaveQuantity); - countMap.put(techBom.getKnifeCode(), countMap.get(techBom.getKnifeCode()) + techBom.getKnifeCount()); + countMap.put(techBom.getKnifeCode(), countMap.get(techBom.getKnifeCode()) + knifeNeedQuantity); } } else { operLog.setJsonResult("暂无记录整刀bom项:" + techBom.getKnifeCode()); @@ -561,7 +563,9 @@ public class BaseKnifeController extends BaseController { // 更新需要组装的数量 和 生产准备中已准备好的数量 zdTaskMap.put(techBom.getKnifeCode(), knifeHaveQuantity); - countMap.put(techBom.getKnifeCode(), countMap.get(techBom.getKnifeCode()) + techBom.getKnifeCount()); + countMap.put(techBom.getKnifeCode(), countMap.get(techBom.getKnifeCode()) + lockedBaseKnifeIds.size()); + + msg = msg + "【已预订" + lockedBaseKnifeIds.size() + "把整刀】"; } else { operLog.setJsonResult("基础物料不足进行组装工具:" + techBom.getKnifeCode()); operLogService.insertOperlog(operLog); @@ -570,7 +574,7 @@ public class BaseKnifeController extends BaseController { } else { // 更新需要组装的数量 和 生产准备中已准备好的数量 zdTaskMap.put(techBom.getKnifeCode(), knifeHaveQuantity); - countMap.put(techBom.getKnifeCode(), countMap.get(techBom.getKnifeCode()) + knifeCount.get()); + countMap.put(techBom.getKnifeCode(), countMap.get(techBom.getKnifeCode()) + knifeNeedQuantity); } } else { operLog.setJsonResult("暂无记录整刀bom项:" + techBom.getKnifeCode()); @@ -617,7 +621,7 @@ public class BaseKnifeController extends BaseController { productionArrangements.setCreateTime(DateUtils.getNowDate()); productionArrangementsMapper.insertProductionArrangements(productionArrangements); - if (!msg.contains("缺少物料已生成组装任务!")) { + if (!msg.contains("缺少物料已生成组装任务!") && !msg.contains("已预订")) { // 生成出库计划单 WmsOutPlan outPlan = new WmsOutPlan(); outPlan.setPlanCode(productionArrangements.getPlanSheet());