From 36fdaa56875cf05cd5dfdc09d4cf115126ea0098 Mon Sep 17 00:00:00 2001 From: Kelvin Date: Fri, 13 Dec 2024 14:37:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=85=A5=E5=BA=93=E4=BB=BB=E5=8A=A1):?= =?UTF-8?q?=20=E6=89=B9=E9=87=8F=E6=89=A7=E8=A1=8C=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wm/service/impl/WmsInTaskServiceImpl.java | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java index f06ee48..db62962 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java @@ -171,15 +171,35 @@ public class WmsInTaskServiceImpl implements IWmsInTaskService { baseKnifeQuery.setKnifeFineState(2); List baseKnifeList = baseKnifeService.selectBaseKnifeList(baseKnifeQuery); + // 获取库位信息 + WmStorageArea wmStorageArea = wmStorageAreaService.selectWmStorageAreaByAreaId(wmsInTask.getCellTgt()); for (int i = 0; i < wmsInTask.getActualInQuantity(); i++) { - BaseKnife baseKnife = baseKnifeList.get(i); - // 设置状态为 解锁 - baseKnife.setIsLocked(0); - // 设置工具状态 已入库 +// BaseKnife baseKnife = baseKnifeList.get(i); +// // 设置状态为 解锁 +// baseKnife.setIsLocked(0); +// // 设置工具状态 已入库 +// baseKnife.setKnifeFineState(1); +// // 更新台账状态 +// baseKnifeService.updateBaseKnife(baseKnife); + // 生成台账 + BaseKnife baseKnife = new BaseKnife(); + baseKnife.setMbbBdMrlId(mbbBdMrlMitm.getItemId()); + baseKnife.setKnifeCode(mbbBdMrlMitm.getItemCode()); + baseKnife.setKnifeName(mbbBdMrlMitm.getItemName()); + baseKnife.setKnifeUnit(mbbBdMrlMitm.getUnitName()); + baseKnife.setKnifeType(mbbBdMrlMitm.getItemTypeName()); + baseKnife.setAreaCode(wmStorageArea.getAreaCode()); + baseKnife.setSafeStock(mbbBdMrlMitm.getMinStock()); + baseKnife.setStandardQuantity("1"); + baseKnife.setKnifeLife(100); + // 设置台账状态 入库 baseKnife.setKnifeFineState(1); - // 更新台账状态 - baseKnifeService.updateBaseKnife(baseKnife); + baseKnife.setPlanSheet(""); + baseKnife.setResetCount(mbbBdMrlMitm.getAttr1()); + baseKnife.setItemOrProduct(mbbBdMrlMitm.getItemOrProduct()); + + baseKnifeService.insertBaseKnife(baseKnife); } } return 0;