From 5b8e5b46252b165d8cc3b9303c4a0227c00dbdc0 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期三, 09 七月 2025 16:43:03 +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 3d9f5b9..954e8fe 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 sku = #{batch} + and batch = #{batch} </when> <otherwise> - and (sku IS NULL OR sku = '') + and (batch IS NULL OR batch = '') </otherwise> </choose> </sql> @@ -75,7 +75,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> </delete> <update id="updateAnfme"> -- Gitblit v1.9.1