From 9bcb7fe6ed1b97da7cd8b8f5af3e5c08a2bc7ff0 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期五, 19 九月 2025 08:50:07 +0800
Subject: [PATCH] 1

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

diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index 7390c17..fbc5a32 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -53,10 +53,10 @@
     <sql id="batchSeq">
         <choose>
             <when test="batch != null and batch != ''">
-                and batch = #{batch}
+                and sku = #{batch}
             </when>
             <otherwise>
-                and (batch IS NULL OR batch = '')
+                and (sku IS NULL OR sku = '')
             </otherwise>
         </choose>
     </sql>
@@ -67,7 +67,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>
     </select>
 
     <delete id="deleteItem">

--
Gitblit v1.9.1