From c7bf4b8773f888fd5be613b7bb6fb8ae4a47b028 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期二, 23 四月 2024 16:53:57 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/ManPakOutMapper.xml | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/ManPakOutMapper.xml b/src/main/resources/mapper/ManPakOutMapper.xml
index b199bc7..c89b305 100644
--- a/src/main/resources/mapper/ManPakOutMapper.xml
+++ b/src/main/resources/mapper/ManPakOutMapper.xml
@@ -2,4 +2,42 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zy.asrs.mapper.ManPakOutMapper">
+ <sql id="selectPakOutSql">
+ <if test="docnum != null and docnum != '' ">
+ and doc_num like '%' + #{docnum} + '%'
+ </if>
+ <if test="custName != null and custName != ''">
+ and cust_name like '%' + #{custName} + '%'
+ </if>
+ <if test="stime != null">
+ and create_time >= #{stime}
+ </if>
+ <if test="etime != null">
+ and create_time <= #{etime}
+ </if>
+ <if test="userId != null">
+ and (create_by = #{userId} or create_by is null)
+ </if>
+
+ </sql>
+
+ <select id="selectPakOut" resultType="com.zy.asrs.entity.param.PakOutDTO">
+ select * from (
+ SELECT status, doc_num,MAX(create_time) as create_time, cust_name as custName FROM man_pakout
+ where 1=1
+ <include refid="selectPakOutSql"></include>
+ GROUP BY doc_num,cust_name,status
+ ) t ORDER BY status
+ OFFSET ((#{curr}-1)*#{limit}) ROWS
+ FETCH NEXT #{limit} ROWS ONLY;
+
+ </select>
+ <select id="selectPakOutCount" resultType="java.lang.Integer">
+ select count(1) from (
+ SELECT status, doc_num,MAX(create_time) as create_time FROM man_pakout
+ where 1=1
+ <include refid="selectPakOutSql"></include>
+ GROUP BY doc_num,cust_name,status
+ ) t
+ </select>
</mapper>
--
Gitblit v1.9.1