From 1b230d7961b2d5068298f0cba13287cabd2fd649 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 17 七月 2024 18:47:35 +0800
Subject: [PATCH] #
---
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