From 32700bf6d8abe8935e3dad6433584ac7cf03f87c Mon Sep 17 00:00:00 2001
From: admin <841110950@qq.com>
Date: 星期一, 30 八月 2021 08:40:03 +0800
Subject: [PATCH] 1.0.4
---
src/main/resources/mapper/WaitMatoutMapper.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/WaitMatoutMapper.xml b/src/main/resources/mapper/WaitMatoutMapper.xml
index cfcda26..88472f8 100644
--- a/src/main/resources/mapper/WaitMatoutMapper.xml
+++ b/src/main/resources/mapper/WaitMatoutMapper.xml
@@ -27,4 +27,54 @@
</resultMap>
+ <sql id="condition">
+ <if test="bill_no!=null and bill_no!='' ">
+ and bill_no like '%' + #{bill_no} + '%'
+ </if>
+ <if test="bill_type!=null and bill_type!='' ">
+ and bill_type like '%' + #{bill_type} + '%'
+ </if>
+ <if test="mat_name!=null and mat_name!='' ">
+ and a.mat_name like '%' + #{mat_name} + '%'
+ </if>
+ <if test="qty!=null and qty!='' ">
+ and a.qty = #{qty}
+ </if>
+ <if test="altme!=null and altme!='' ">
+ and a.unit like '%' + #{unit} + '%'
+ </if>
+ <if test="startTime!=null and endTime!=null">
+ and appe_time between #{startTime} and #{endTime}
+ </if>
+ </sql>
+
+
+ <select id="getHeadPage" resultMap="BaseResultMap">
+ select * from
+ (
+ select *,
+ ROW_NUMBER() over (order by appe_time desc) as row
+ from (
+ select distinct bill_no, bill_type, appe_time
+ from ints_wait_matout
+ where 1=1
+ <include refid="condition"></include>
+ ) r
+ ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+ </select>
+ <select id="getHeadPageCount" parameterType="java.util.Map" resultType="integer">
+
+ select count(1) from
+ (
+ select *,
+ ROW_NUMBER() over (order by appe_time desc) as row
+ from (
+ select distinct bill_no, bill_type, appe_time
+ from ints_wait_matout
+ where 1=1
+ <include refid="condition"></include>
+ ) r
+ ) t
+ </select>
+
</mapper>
--
Gitblit v1.9.1