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;