From 3d9d42019ffd4fd16eeb0dc032c084cec9a8c69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=A4=E9=94=A6=E7=A7=91?= <32996823@qq.com> Date: Thu, 19 Dec 2024 16:57:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=87=86=E5=A4=87=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ktg/mes/md/controller/BaseKnifeController.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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());