From 82bcd0328dddbaad65933e2fada22bc68e82b3d5 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期六, 26 八月 2023 10:07:46 +0800
Subject: [PATCH] # 导入订单增加单据类型

---
 src/main/resources/mapper/ViewStockUseMapper.xml |   73 +++++++++++++++++++++++++++++++++++-
 1 files changed, 71 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/ViewStockUseMapper.xml b/src/main/resources/mapper/ViewStockUseMapper.xml
index 7f04cf5..2362f2e 100644
--- a/src/main/resources/mapper/ViewStockUseMapper.xml
+++ b/src/main/resources/mapper/ViewStockUseMapper.xml
@@ -57,12 +57,30 @@
 			ROW_NUMBER() OVER(Order by a.oneday desc) as row
 		, *
 		FROM(
-		SELECT * FROM asr_wrkin_count_view) a ) b
+		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 *
@@ -71,11 +89,62 @@
 					 ROW_NUMBER() OVER(Order by a.oneday desc) as row
 		, *
 				 FROM(
-						 SELECT * FROM asr_wrkout_count_view) a ) b
+						 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>
+	<sql id="checkReportCondition">
+		<if test="matnr!=null and matnr!='' ">
+			and matnr like '%' + #{matnr} + '%'
+		</if>
+		<if test="maktx!=null and maktx!='' ">
+			and maktx like '%' + #{maktx} + '%'
+		</if>
+		<if test="specs!=null and specs!='' ">
+			and specs like '%' + #{specs} + '%'
+		</if>
+		<if test="batch!=null and batch!='' ">
+			and batch like '%' + #{batch} + '%'
+		</if>
+		<if test="zpallet!=null and zpallet!='' ">
+			and zpallet like '%' + #{zpallet} + '%'
+		</if>
+		<if test="locNo!=null and locNo!='' ">
+			and locNo like '%' + #{locNo} + '%'
+		</if>
+		<if test="staNo!=null and staNo!='' ">
+			and staNo like '%' + #{staNo} + '%'
+		</if>
+
+	</sql>
+    <select id="selectCheckReport" resultType="com.zy.asrs.entity.result.CheckReport">
+		SELECT  * FROM (
+		SELECT ROW_NUMBER() OVER(Order by appeTime desc ) as row , * FROM asr_check_report WHERE 1 = 1
+		<include refid="checkReportCondition"></include>  ) as a WHERE a.row between #{curr} and #{limit}
+	</select>
+	<select id="selectCheckReportCount" resultType="java.lang.Integer">
+
+		SELECT COUNT(*) FROM asr_check_report WHERE 1 = 1
+		<include refid="checkReportCondition"></include>
 	</select>
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1