From 290b752cab63b7e813dcb493b5110b09829eff58 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 22 九月 2025 17:11:44 +0800
Subject: [PATCH] 13
---
src/main/resources/mapper/OrderDetlMapper.xml | 33 ++++++++++++++++++++++++---------
1 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml
index b1ffd1a..66c456b 100644
--- a/src/main/resources/mapper/OrderDetlMapper.xml
+++ b/src/main/resources/mapper/OrderDetlMapper.xml
@@ -85,15 +85,30 @@
where 1=1
and order_no = #{orderNo}
and matnr = #{matnr}
- <if test="batch!=null and batch!='' ">
- and batch = #{batch}
- </if>
- <if test="csocode!=null and csocode!='' ">
- and three_code = #{csocode}
- </if>
- <if test="isocode!=null and isocode!='' ">
- and dead_time = #{isocode}
- </if>
+ <choose>
+ <when test="batch != null and batch != ''">
+ and batch = #{batch}
+ </when>
+ <otherwise>
+ and (batch IS NULL OR batch = '')
+ </otherwise>
+ </choose>
+ <choose>
+ <when test="csocode != null and csocode != ''">
+ and three_code = #{csocode}
+ </when>
+ <otherwise>
+ and (three_code IS NULL OR three_code = '')
+ </otherwise>
+ </choose>
+ <choose>
+ <when test="isocode != null and isocode != ''">
+ and dead_time = #{isocode}
+ </when>
+ <otherwise>
+ and (dead_time IS NULL OR dead_time = '')
+ </otherwise>
+ </choose>
</select>
<select id="selectItemNoneOfBatch" resultMap="BaseResultMap">
--
Gitblit v1.9.1