From 0474a145d356ad5f539b05ddc74129b73fe60b41 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期三, 30 三月 2022 11:11:12 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/LocDetlMapper.xml | 35 ++++++++++++++++++++++++++++-------
1 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index 0bfd94c..be017a9 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -26,13 +26,7 @@
<result column="appe_time" property="appeTime" />
</resultMap>
-
- <select id="selectItem" resultMap="BaseResultMap">
- select top 1 *
- from asr_loc_detl
- where 1=1
- and loc_no = #{locNo}
- and matnr = #{matnr}
+ <sql id="batchSeq">
<choose>
<when test="batch != null and batch != ''">
and batch = #{batch}
@@ -41,8 +35,35 @@
and (batch IS NULL OR batch = '')
</otherwise>
</choose>
+ </sql>
+
+ <select id="selectItem" resultMap="BaseResultMap">
+ select top 1 *
+ from asr_loc_detl
+ where 1=1
+ and loc_no = #{locNo}
+ and matnr = #{matnr}
+ <include refid="batchSeq"></include>
</select>
+ <delete id="deleteItem">
+ delete from asr_loc_detl
+ where 1=1
+ and loc_no = #{locNo}
+ and matnr = #{matnr}
+ <include refid="batchSeq"></include>
+ </delete>
+
+ <update id="updateAnfme">
+ update asr_loc_detl
+ set anfme = #{anfme}
+ , modi_time = getdate()
+ where 1=1
+ and loc_no = #{locNo}
+ and matnr = #{matnr}
+ <include refid="batchSeq"></include>
+ </update>
+
<sql id="stockOutCondition">
<if test="loc_no!=null and loc_no!='' ">
and a.loc_no like '%' + #{loc_no} + '%'
--
Gitblit v1.9.1