From 50fef108406fc3a00bce562d68ddb693340c28a4 Mon Sep 17 00:00:00 2001 From: Stang <32996823@qq.com> Date: Tue, 12 Nov 2024 09:38:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E7=BD=AE=E6=AC=A1=E6=95=B0=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../md/controller/BaseKnifeController.java | 26 +++++++++---------- .../service/impl/WmsOutTaskServiceImpl.java | 2 +- 2 files changed, 14 insertions(+), 14 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 8c3e32a..1e73c8f 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 @@ -609,7 +609,7 @@ public class BaseKnifeController extends BaseController WmsOutPlan outPlan = wmsOutPlanMapper.selectWmsOutPlanByPlanCode(zdTask.getAttr4()); if (outPlan == null){ WmsOutPlan outPlanTemp = new WmsOutPlan(); - outPlanTemp.setPlanCode(zdTask.getAttr4()); + outPlanTemp.setPlanCode(zdTask.getAttr4() == null ? zdTask.getCode() : zdTask.getAttr4()); outPlanTemp.setWmsBusinessTypeId(12L); outPlanTemp.setPlanState("1"); outPlanTemp.setPlanType("ZDCK"); @@ -697,7 +697,7 @@ public class BaseKnifeController extends BaseController // 更新重置次数 outPlanFlag = false; - baseKnife.setResetCount(resetCount); + baseKnife.setResetCount(resetCount - 1); baseKnifeService.updateBaseKnife(baseKnife); } @@ -709,16 +709,16 @@ public class BaseKnifeController extends BaseController // 出库计划明细 for (int j = 0; j < outPlanDetail.getPlannedQuantity(); j++) { WmsOutPlanDetailEntity wmsOutPlanDetailEntity = new WmsOutPlanDetailEntity(); - wmsOutPlanDetailEntity.setBaseKnifeId(baseKnifeListOutPlan.get(i++).getBaseKnifeId()); - wmsOutPlanDetailEntity.setAreaCode(baseKnifeListOutPlan.get(i++).getAreaCode()); - wmsOutPlanDetailEntity.setItemOrProduct(baseKnifeListOutPlan.get(i++).getItemOrProduct()); - wmsOutPlanDetailEntity.setKnifeCode(baseKnifeListOutPlan.get(i++).getKnifeCode()); - wmsOutPlanDetailEntity.setKnifeName(baseKnifeListOutPlan.get(i++).getKnifeName()); - wmsOutPlanDetailEntity.setPlanSheet(baseKnifeListOutPlan.get(i++).getPlanSheet()); - wmsOutPlanDetailEntity.setKnifeLife(baseKnifeListOutPlan.get(i++).getKnifeLife()); - wmsOutPlanDetailEntity.setResetCount(baseKnifeListOutPlan.get(i++).getResetCount()); - wmsOutPlanDetailEntity.setKnifeUnit(baseKnifeListOutPlan.get(i++).getKnifeUnit()); - wmsOutPlanDetailEntity.setSafeStock(baseKnifeListOutPlan.get(i++).getKnifeType()); + wmsOutPlanDetailEntity.setBaseKnifeId(baseKnifeListOutPlan.get(i).getBaseKnifeId()); + wmsOutPlanDetailEntity.setAreaCode(baseKnifeListOutPlan.get(i).getAreaCode()); + wmsOutPlanDetailEntity.setItemOrProduct(baseKnifeListOutPlan.get(i).getItemOrProduct()); + wmsOutPlanDetailEntity.setKnifeCode(baseKnifeListOutPlan.get(i).getKnifeCode()); + wmsOutPlanDetailEntity.setKnifeName(baseKnifeListOutPlan.get(i).getKnifeName()); + wmsOutPlanDetailEntity.setPlanSheet(baseKnifeListOutPlan.get(i).getPlanSheet()); + wmsOutPlanDetailEntity.setKnifeLife(baseKnifeListOutPlan.get(i).getKnifeLife()); + wmsOutPlanDetailEntity.setResetCount(baseKnifeListOutPlan.get(i).getResetCount()); + wmsOutPlanDetailEntity.setKnifeUnit(baseKnifeListOutPlan.get(i).getKnifeUnit()); + wmsOutPlanDetailEntity.setSafeStock(baseKnifeListOutPlan.get(i).getKnifeType()); wmsOutPlanDetailEntity.setStandardQuantity(baseKnifeListOutPlan.get(i++).getStandardQuantity()); wmsOutPlanDetailEntity.setWmsOutPlanDetailId(outPlanDetail.getWmsOutPlanDetailId()); wmsOutPlanDetailEntity.setCreateBy(getUsername()); @@ -761,7 +761,7 @@ public class BaseKnifeController extends BaseController wmsInPlanTemp.setState("1"); wmsInPlanTemp.setSourceType("SGLR"); wmsInPlanTemp.setCellCode(zdTask.getAttr3()); - wmsInPlanTemp.setPlanCode(zdTask.getAttr4()); + wmsInPlanTemp.setPlanCode(zdTask.getAttr4() == null ? zdTask.getCode() : zdTask.getAttr4()); wmsInPlanTemp.setRelBillCode("组装单据"); wmsInPlanTemp.setPlanTypeId("13"); wmsInPlanTemp.setCreateBy(getUsername()); diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java index efd6801..570e15f 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java @@ -102,7 +102,7 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService { hashMap.put("resetCount", nowWmsOutPlanDetailEntity.getResetCount()); // 寿命预警 - if (nowWmsOutPlanDetailEntity.getKnifeLife() <= mdItem.getAttr2()) + if ("PRODUCT".equals(nowWmsOutPlanDetailEntity.getItemOrProduct()) && nowWmsOutPlanDetailEntity.getKnifeLife() <= mdItem.getAttr2()) hashMap.put("knifeWarning", true); else hashMap.put("knifeWarning", false);