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());