From 20bd270fbecc8356a17b1b429eb97abe1a48700e Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期三, 09 七月 2025 16:43:37 +0800
Subject: [PATCH] 1

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

diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index 954e8fe..7390c17 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -92,7 +92,14 @@
         where 1=1
         and loc_no = #{locNo}
         and matnr = #{matnr}
-        <include refid="batchSeq"></include>
+        <choose>
+            <when test="batch != null and batch != ''">
+                and sku = #{batch}
+            </when>
+            <otherwise>
+                and (sku IS NULL OR sku = '')
+            </otherwise>
+        </choose>
     </update>
 
     <sql id="stockOutCondition">

--
Gitblit v1.9.1