From 7b26abe9d5e833901783613bbb3cfa27fa75a346 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期一, 20 十一月 2023 20:17:41 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/LocDetlMapper.xml |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index 2d0859d..b0dabf7 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -44,6 +44,7 @@
         <result column="appe_user" property="appeUser" />
         <result column="appe_time" property="appeTime" />
         <result column="memo" property="memo" />
+        <result column="stock_freeze" property="stockFreeze" />
     </resultMap>
 
     <sql id="batchSeq">
@@ -63,6 +64,14 @@
         where 1=1
         and loc_no = #{locNo}
         and matnr = #{matnr}
+        <choose>
+            <when test="suppCode != null and suppCode != ''">
+                and supp_code = #{suppCode}
+            </when>
+<!--            <otherwise>-->
+<!--                and (supp_code IS NULL OR supp_code = '')-->
+<!--            </otherwise>-->
+        </choose>
         <include refid="batchSeq"></include>
     </select>
 
@@ -72,6 +81,7 @@
         and loc_no = #{locNo}
         and matnr = #{matnr}
         <include refid="batchSeq"></include>
+        <include refid="locdetlCondition"></include>
     </delete>
 
     <update id="updateAnfme">
@@ -81,8 +91,21 @@
         where 1=1
         and loc_no = #{locNo}
         and matnr = #{matnr}
+        <include refid="locdetlCondition"></include>
         <include refid="batchSeq"></include>
     </update>
+
+    <sql id="locdetlCondition">
+        <if test="threeCode!=null and threeCode!='' ">
+            and three_code = #{threeCode}
+        </if>
+        <if test="suppCode!=null and suppCode!='' ">
+            and supp_code = #{suppCode}
+        </if>
+        <if test="deadTime!=null and deadTime!='' ">
+            and dead_time = #{deadTime}
+        </if>
+    </sql>
 
     <sql id="stockOutCondition">
         <if test="loc_no!=null and loc_no!='' ">
@@ -347,4 +370,13 @@
         where 1=1
         and loc_no = #{locNo}
     </select>
+
+    <update id="updateStockFreeze">
+        update asr_loc_detl
+        set stock_freeze = #{stockFreeze}
+        , modi_time = getdate()
+        where 1=1
+        and loc_no = #{locNo}
+        and matnr = #{matnr}
+    </update>
 </mapper>

--
Gitblit v1.9.1