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 cb795fe..fe52ad1 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 @@ -173,21 +173,22 @@ 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()); - // 计算消耗寿命 - int consumeLife = baseKnife.getKnifeLife() - (planDetailEntity.getConsumeLife() % 100); - baseKnife.setKnifeLife(consumeLife); - // 计算重置次数 - int resetCount = baseKnife.getResetCount() - (planDetailEntity.getConsumeLife() / 100); - baseKnife.setResetCount(resetCount); // 设置状态为 解锁 baseKnife.setIsLocked(0); // 设置工具状态 已入库 baseKnife.setKnifeFineState(1); - if (StringUtils.isNotEmpty(planDetailEntity.getRfid())) { - baseKnife.setRfid(planDetailEntity.getRfid()); - } + // 状态为生效 + baseKnife.setIsValid(0); + // 设置库位信息 + baseKnife.setAreaCode(wmStorageArea.getAreaCode()); + baseKnife.setAreaName(wmStorageArea.getAreaName()); // 更新台账状态 baseKnifeService.updateBaseKnife(baseKnife); });