From 7cf4ad5510203fc864fe4f8b3c44da58db768366 Mon Sep 17 00:00:00 2001 From: Stang <32996823@qq.com> Date: Mon, 18 Nov 2024 17:46:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=9F=A5=E8=AF=A2=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=E5=9F=BA=E7=A1=80=E7=89=A9=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../md/controller/BaseKnifeController.java | 4 ++ .../md/service/impl/BaseKnifeServiceImpl.java | 9 ++- .../resources/mapper/md/BaseKnifeMapper.xml | 63 +------------------ 3 files changed, 15 insertions(+), 61 deletions(-) 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}