From 7eefd146ab0997a5d26bdd66dff63b515b8f58c7 Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期六, 11 三月 2023 08:39:29 +0800
Subject: [PATCH] erp
---
src/main/resources/mapper/LocDetlMapper.xml | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index dfff812..2fdc9e2 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -48,11 +48,11 @@
<sql id="batchSeq">
<choose>
- <when test="batch != null and batch != ''">
+ <when test="batch != null">
and batch = #{batch}
</when>
<otherwise>
- and (batch IS NULL OR batch = '')
+ and (batch IS NULL)
</otherwise>
</choose>
</sql>
@@ -99,6 +99,9 @@
</if>
<if test="startTime!=null and endTime!=null">
and a.modi_time between #{startTime} and #{endTime}
+ </if>
+ <if test="crnNo!=null and crnNo!='' ">
+ and b.crn_no=#{crnNo}
</if>
</sql>
@@ -207,11 +210,11 @@
<!-- and (a.batch IS NULL OR a.batch = '')-->
<!-- </otherwise>-->
<!-- </choose>-->
- <if test="batch != null and batch != ''">
+ <if test="batch != null">
and a.batch = #{batch}
</if>
<if test="orderNo != null and orderNo != ''">
- and a.orderNo = #{orderNo}
+ and a.order_no = #{orderNo}
</if>
<if test="locNos != null and locNos.size > 0">
@@ -295,6 +298,12 @@
count(anfme) as count
from asr_loc_detl
where 1=1
+ <if test="batch != null and batch != ''">
+ and batch = #{batch}
+ </if>
+ <if test="matnr != null and matnr != ''">
+ and matnr = #{matnr}
+ </if>
group by matnr,batch
</select>
<select id="sum" resultType="java.lang.Integer">
@@ -310,5 +319,11 @@
batch LIKE '%[a-z]%'
</select>
+ <select id="selectLocDetlSumQty" resultType="double">
+ select SUM(anfme) anfme
+ from asr_loc_detl
+ where loc_no=#{locNo}
+ </select>
+
</mapper>
--
Gitblit v1.9.1