From 09073d8b84d438d57d237d93d6dac4df5f838c57 Mon Sep 17 00:00:00 2001
From: mrzhssss <pro6@qq.com>
Date: 星期二, 29 十一月 2022 11:33:21 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/LocDetlMapper.xml |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index dfff812..b188922 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -48,11 +48,11 @@
 
     <sql id="batchSeq">
         <choose>
-            <when test="batch != null and batch != ''">
+            <when test="batch != null">
                 and batch = #{batch}
             </when>
             <otherwise>
-                and (batch IS NULL OR batch = '')
+                and (batch IS NULL)
             </otherwise>
         </choose>
     </sql>
@@ -99,6 +99,9 @@
         </if>
         <if test="startTime!=null and endTime!=null">
             and a.modi_time between #{startTime} and #{endTime}
+        </if>
+        <if test="crnNo!=null and crnNo!='' ">
+            and b.crn_no=#{crnNo}
         </if>
     </sql>
 
@@ -207,11 +210,11 @@
 <!--                and (a.batch IS NULL OR a.batch = '')-->
 <!--            </otherwise>-->
 <!--        </choose>-->
-        <if test="batch != null and batch != ''">
+        <if test="batch != null">
             and a.batch = #{batch}
         </if>
         <if test="orderNo != null and orderNo != ''">
-            and a.orderNo = #{orderNo}
+            and a.order_no = #{orderNo}
         </if>
 
         <if test="locNos != null and locNos.size > 0">
@@ -310,5 +313,11 @@
             batch LIKE '%[a-z]%'
     </select>
 
+    <select id="selectLocDetlSumQty" resultType="double">
+        select SUM(anfme) anfme
+        from asr_loc_detl
+        where loc_no=#{locNo}
+    </select>
+
 
 </mapper>

--
Gitblit v1.9.1