From ca42a5047cb15ae63035f15a971a8e1ec858851f Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 20 十二月 2023 16:24:04 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/ManLocDetlMapper.xml |   46 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 35 insertions(+), 11 deletions(-)

diff --git a/src/main/resources/mapper/ManLocDetlMapper.xml b/src/main/resources/mapper/ManLocDetlMapper.xml
index 046561c..fb85403 100644
--- a/src/main/resources/mapper/ManLocDetlMapper.xml
+++ b/src/main/resources/mapper/ManLocDetlMapper.xml
@@ -256,17 +256,41 @@
         select top 1 * from man_loc_detl
         where loc_no = #{locNo}
         and matnr = #{matnr}
-        <if test="batch!=null and batch!='' ">
-            and batch = #{batch}
-        </if>
-        <!--        <choose>-->
-        <!--            <when test="batch != null and batch != ''">-->
-        <!--                and batch = #{batch}-->
-        <!--            </when>-->
-        <!--            <otherwise>-->
-        <!--                and (batch IS NULL OR batch = '')-->
-        <!--            </otherwise>-->
-        <!--        </choose>-->
+<!--        <if test="batch!=null and batch!='' ">-->
+<!--            and batch = #{batch}-->
+<!--        </if>-->
+        <choose>
+            <when test="batch != null and batch != ''">
+                and batch = #{batch}
+            </when>
+            <otherwise>
+                and (batch IS NULL OR batch = '')
+            </otherwise>
+        </choose>
+        <choose>
+            <when test="csocode != null and csocode != ''">
+                and csocode = #{csocode}
+            </when>
+            <otherwise>
+                and (csocode IS NULL OR csocode = '')
+            </otherwise>
+        </choose>
+        <choose>
+            <when test="isoseq != null and isoseq != ''">
+                and isoseq = #{isoseq}
+            </when>
+            <otherwise>
+                and (isoseq IS NULL OR isoseq = '')
+            </otherwise>
+        </choose>
+        <choose>
+            <when test="containerCode != null and containerCode != ''">
+                and container_code = #{containerCode}
+            </when>
+            <otherwise>
+                and (container_code IS NULL OR container_code = '')
+            </otherwise>
+        </choose>
     </select>
 
     <select id="listByOutPage" resultMap="BaseResultMap">

--
Gitblit v1.9.1