From 65c305f9e8af6fdb4f80b85484b1170f068aa1fa Mon Sep 17 00:00:00 2001
From: zc <zc>
Date: 星期三, 10 九月 2025 10:43:27 +0800
Subject: [PATCH] 1

---
 src/main/resources/mapper/OrderDetlMapper.xml |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml
index 14f5809..c1224ca 100644
--- a/src/main/resources/mapper/OrderDetlMapper.xml
+++ b/src/main/resources/mapper/OrderDetlMapper.xml
@@ -80,9 +80,14 @@
         where 1=1
         and order_no = #{orderNo}
         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>
     </select>
 
     <select id="selectWorkingDetls" resultMap="BaseResultMap">

--
Gitblit v1.9.1