diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java index 5f6b4e1..a55e8f9 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java @@ -607,6 +607,10 @@ public class BaseKnifeController extends BaseController { // 对当前台账对象进行收录 baseKnifeHashMapMap.get(item.getMbbBdMrlId()).get(item.getAreaCode()).add(item); + + // 出库 + item.setKnifeFineState(2); + baseKnifeService.updateBaseKnife(item); }); // 生成出库计划明细 diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/BaseKnifeServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/BaseKnifeServiceImpl.java index 21a08e6..09c58b8 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/BaseKnifeServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/BaseKnifeServiceImpl.java @@ -55,7 +55,14 @@ public class BaseKnifeServiceImpl implements IBaseKnifeService { */ @Override public BaseKnife selectBaseKnifeByBaseKnifeId(Long baseKnifeId) { - return baseKnifeMapper.selectBaseKnifeByBaseKnifeId(baseKnifeId); + BaseKnife baseKnife = baseKnifeMapper.selectBaseKnifeByBaseKnifeId(baseKnifeId); + // 查询基础物料 + if ("PRODUCT".equals(baseKnife.getItemOrProduct())) { + BaseKnife baseKnifeWrapper = new BaseKnife(); + baseKnifeWrapper.setParentId(baseKnife.getBaseKnifeId()); + baseKnife.setBaseKnifeList(baseKnifeMapper.selectBaseKnifeList(baseKnifeWrapper)); + } + return baseKnife; } /** diff --git a/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml b/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml index bbce0ac..c08e86b 100644 --- a/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml +++ b/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml @@ -205,66 +205,9 @@ - + + where BK.BASE_KNIFE_ID = #{baseKnifeId}