From 67cb49032b0efff478b2432713d62c305e4e53ce Mon Sep 17 00:00:00 2001
From: ZY <zc857179121@qq.com>
Date: 星期三, 30 十月 2024 17:42:34 +0800
Subject: [PATCH] 1

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

diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml
index 7b50892..47ec31a 100644
--- a/src/main/resources/mapper/OrderDetlMapper.xml
+++ b/src/main/resources/mapper/OrderDetlMapper.xml
@@ -101,6 +101,14 @@
         where 1=1
         and order_no = #{orderNo}
         and matnr = #{matnr}
+        <choose>
+            <when test="batch != null and batch != ''">
+                and batch = #{batch}
+            </when>
+            <otherwise>
+                and (batch IS NULL OR batch = '')
+            </otherwise>
+        </choose>
         <if test="threeCode!=null and threeCode!='' ">
             and three_code = #{threeCode}
         </if>

--
Gitblit v1.9.1