From bd3b23b214c7090d83c91f9b9a172d4f548033dd Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 27 十月 2025 16:44:45 +0800
Subject: [PATCH] 13

---
 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