From b5130c2e6d60c7f23e37f7c620375bc4e253caa3 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 18 十月 2022 14:52:20 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/ViewStockUseMapper.xml |   62 +++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/ViewStockUseMapper.xml b/src/main/resources/mapper/ViewStockUseMapper.xml
index 5cfb94c..cc723f6 100644
--- a/src/main/resources/mapper/ViewStockUseMapper.xml
+++ b/src/main/resources/mapper/ViewStockUseMapper.xml
@@ -50,5 +50,67 @@
 	]]>
 </where>
 </select>
+    <select id="selectWorkCountIn" resultType="com.zy.asrs.entity.ViewWorkCountInView">
+		SELECT *
+		FROM (
+		select
+			ROW_NUMBER() OVER(Order by a.oneday desc) as row
+		, *
+		FROM(
+		SELECT * FROM asr_wrkin_count_view
+		         WHERE
+		         1 = 1 AND
+		         (oneday >= #{start}
+		         AND
+				oneday &lt; #{end})
+
+		         <if test="matnr != null and matnr !=''">
+					 and matnr = #{matnr}
+				 </if>
+
+		        ) a ) b
+		WHERE 1=1 and b.row between ((#{curr}-1)*#{limit}+1) and (#{curr}*#{limit})
+
+	</select>
+	<select id="selectWorkCountInTotal" resultType="java.lang.Integer">
+		SELECT COUNT(*) FROM asr_wrkin_count_view
+		WHERE 1= 1 AND
+		(oneday >= #{start}
+		AND
+		oneday &lt; #{end})
+		<if test="matnr != null and matnr !='' ">
+			and matnr = #{matnr}
+		</if>
+	</select>
+	<select id="selectWorkCountOut" resultType="com.zy.asrs.entity.ViewWorkCountInView">
+		SELECT *
+		FROM (
+				 select
+					 ROW_NUMBER() OVER(Order by a.oneday desc) as row
+		, *
+				 FROM(
+						 SELECT * FROM asr_wrkout_count_view
+		WHERE
+		1 = 1 AND
+		(oneday > #{start}
+		AND
+		oneday &lt; #{end})
+
+		<if test="matnr != null and matnr !=''">
+			and matnr = #{matnr}
+		</if>
+		) a ) b
+		WHERE 1=1 and b.row between ((#{curr}-1)*#{limit}+1) and (#{curr}*#{limit})
+	</select>
+	<select id="selectWorkCountOutTotal" resultType="java.lang.Integer">
+		SELECT COUNT(*) FROM asr_wrkout_count_view
+		WHERE 1= 1 AND
+		(oneday > #{start}
+		AND
+		oneday &lt; #{end})
+		<if test="matnr != null and matnr !='' ">
+			and matnr = #{matnr}
+		</if>
+	</select>
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1