From 81e3a9603003a5f4b2ca6320493d4918aaa9ae49 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期四, 10 八月 2023 13:17:02 +0800
Subject: [PATCH] #BUG修复
---
src/main/resources/mapper/LocDetlMapper.xml | 38 +++++++++++++++++++++++++++++++++++---
1 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index b86e724..82b0450 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -443,7 +443,7 @@
</choose>
order by
- DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme
+ a.manu,DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme
desc,
NEWID(),
case
@@ -509,6 +509,9 @@
<if test="owner != null and owner !='' ">
and t.owner like '%' + #{owner} + '%'
</if>
+ <if test="payment != null and payment !='' ">
+ and t.payment = #{payment}
+ </if>
</sql>
<select id="selectAllOwner" resultType="com.zy.asrs.entity.result.LocDetlAll" parameterType="com.zy.asrs.entity.result.LocDetlDTO">
@@ -536,7 +539,7 @@
SELECT ROW_NUMBER() over(order by matnr) as row,* FROM (
SELECT * FROM asr_loc_detl_all
) t
- WHERE 1=1 and t.payment = 0
+ WHERE 1=1
<include refid="selectAllSql"></include>
) a
WHERE a.row BETWEEN ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
@@ -549,11 +552,40 @@
SELECT ROW_NUMBER() over(order by matnr) as row,* FROM (
SELECT * FROM asr_loc_detl_all
) t
- WHERE 1=1 and t.payment = 0
+ WHERE 1=1
<include refid="selectAllSql"></include>
) a
</select>
+ <select id="getStockStatisAll" resultType="com.zy.asrs.entity.result.LocDetlAll">
+ select * from
+ (
+ select
+ ROW_NUMBER() over (order by sum(a.anfme) desc) as row
+ , a.matnr
+ , sum(a.anfme) as anfme
+ from asr_loc_detl_all a
+ where 1=1
+ <include refid="stockOutCondition"></include>
+ group by a.matnr
+ ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+ </select>
+
+ <select id="getStockStatisCountAll" parameterType="java.util.Map" resultType="java.lang.Integer">
+ select count(1) as count from
+ (
+ select
+ a.matnr
+ from asr_loc_detl_all a
+ where 1=1
+ <include refid="stockOutCondition"></include>
+ group by a.matnr
+ ) b
+ </select>
+
+ <select id="sumAll" resultType="java.lang.Double">
+ SELECT SUM(anfme) FROM asr_loc_detl_all
+ </select>
</mapper>
--
Gitblit v1.9.1