From ea7d61a6f4828e40ff5f8e01f38f171eb22cd11e Mon Sep 17 00:00:00 2001 From: Kelvin Date: Sun, 5 Jan 2025 16:27:24 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=85=A5=E5=BA=93=E4=BB=BB=E5=8A=A1):?= =?UTF-8?q?=20=E5=B0=86=E5=BA=93=E4=BD=8D=E4=BF=A1=E6=81=AF=E5=A1=AB?= =?UTF-8?q?=E5=85=85=E8=87=B3=E6=96=99=E7=AE=B1=EF=BC=8C=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=9D=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/wm/controller/WmsInTaskController.java | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java index 42911f5..bcc929a 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java @@ -135,6 +135,11 @@ public class WmsInTaskController extends BaseController { // 将料箱rfid绑定至任务 wmsInTask.setBoxRfid(rfid); + // 将库位信息填充至,料箱 + UcmCtBase ucmCtBase = ucmCtBaseService.selectUcmCtBaseByCode(wmsInTask.getBoxRfid()); + ucmCtBase.setAttr1(wmsInTask.getCellTgt().toString()); + ucmCtBaseService.updateUcmCtBase(ucmCtBase); + wmsInTaskService.updateWmsInTask(wmsInTask); return AjaxResult.success(wmsInTask); } @@ -194,10 +199,6 @@ public class WmsInTaskController extends BaseController { // 入库类型为整刀回库 if (Objects.equals(wmsInTask.getPlanTypeId(), "9")) { - // 将库位信息填充至,料箱 - UcmCtBase ucmCtBase = ucmCtBaseService.selectUcmCtBaseByCode(wmsInTask.getBoxRfid()); - ucmCtBase.setAttr1(wmsInTask.getCellTgt().toString()); - ucmCtBaseService.updateUcmCtBase(ucmCtBase); // 插入台账数据 wmsInPlanDetailEntityList.forEach(planDetailEntity -> { BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId()); @@ -301,10 +302,6 @@ public class WmsInTaskController extends BaseController { }); mdItemService.updateMdItem(mbbBdMrlMitm); } else if (Objects.equals(wmsInTask.getPlanTypeCode(), "CGRK")) { - // 将库位信息填充至,料箱 - UcmCtBase ucmCtBase = ucmCtBaseService.selectUcmCtBaseByCode(wmsInTask.getBoxRfid()); - ucmCtBase.setAttr1(wmsInTask.getCellTgt().toString()); - ucmCtBaseService.updateUcmCtBase(ucmCtBase); // 插入台账数据 wmsInPlanDetailEntityList.forEach(planDetailEntity -> { BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId()); @@ -321,10 +318,6 @@ public class WmsInTaskController extends BaseController { baseKnifeService.updateBaseKnife(baseKnife); }); } else if (Objects.equals(wmsInTask.getPlanTypeCode(), "GJHK")) { - // 将库位信息填充至,料箱 - UcmCtBase ucmCtBase = ucmCtBaseService.selectUcmCtBaseByCode(wmsInTask.getBoxRfid()); - ucmCtBase.setAttr1(wmsInTask.getCellTgt().toString()); - ucmCtBaseService.updateUcmCtBase(ucmCtBase); // 插入台账数据 wmsInPlanDetailEntityList.forEach(planDetailEntity -> { BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId());