From 7a0baad26835f2a11bad1a178f88503f862b72e4 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 24 八月 2021 13:44:54 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/WaitMatinMapper.xml | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/WaitMatinMapper.xml b/src/main/resources/mapper/WaitMatinMapper.xml
index b0cb92d..02eafe9 100644
--- a/src/main/resources/mapper/WaitMatinMapper.xml
+++ b/src/main/resources/mapper/WaitMatinMapper.xml
@@ -27,4 +27,45 @@
</resultMap>
+ <sql id="condition">
+ <if test="loc_no!=null and loc_no!='' ">
+ and a.loc_no like '%' + #{loc_no} + '%'
+ </if>
+ <if test="mat_no!=null and mat_no!='' ">
+ and a.mat_no like '%' + #{mat_no} + '%'
+ </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 a.modi_time between #{startTime} and #{endTime}
+ </if>
+ </sql>
+
+ <select id="getHeadPage" resultMap="BaseResultMap">
+ select * from
+ (
+ select distinct bill_no, bill_type, appe_time,
+ ROW_NUMBER() over (order by appe_time) as row
+ from ints_wait_matin
+ <include refid="condition"></include>
+ ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+ </select>
+
+ <select id="getHeadPageCount" parameterType="java.util.Map" resultType="java.lang.Integer">
+ select count(1) from
+ (
+ select distinct bill_no, bill_type, appe_time,
+ ROW_NUMBER() over (order by appe_time) as row
+ from ints_wait_matin
+ <include refid="condition"></include>
+ ) t
+ </select>
+
</mapper>
--
Gitblit v1.9.1