From 1d9e31b5fa8ac60d5aef37471b9cb2b5c5d3d9ce Mon Sep 17 00:00:00 2001 From: Kelvin Date: Fri, 20 Dec 2024 10:05:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=A7=E8=A1=8C=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wm/controller/WmsInTaskController.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 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 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); });