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 |   49 +++++++++++++++++++++++++++++++++++++------------
 1 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/src/main/resources/mapper/ManLocDetlMapper.xml b/src/main/resources/mapper/ManLocDetlMapper.xml
index 395c9db..fb85403 100644
--- a/src/main/resources/mapper/ManLocDetlMapper.xml
+++ b/src/main/resources/mapper/ManLocDetlMapper.xml
@@ -34,6 +34,7 @@
         <result column="payment" property="payment" />
         <result column="real_anfme" property="realAnfme" />
         <result column="order_no" property="orderNo" />
+        <result column="container_code" property="containerCode" />
     </resultMap>
 
     <sql id="locDetlCondition">
@@ -44,7 +45,7 @@
             and mld.loc_no like concat('%',#{loc_no},'%')
         </if>
         <if test="locNo != null and locNo != ''">
-            and mld.loc_no like concat('%',#{loc_no},'%')
+            and mld.loc_no like concat('%',#{locNo},'%')
         </if>
         <if test="matnr != null and matnr != ''">
             and mld.matnr like concat('%',#{matnr},'%')
@@ -255,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