From 938f981db8389b161199d2099649defd781be664 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期六, 09 九月 2023 11:18:01 +0800
Subject: [PATCH] #拣货单

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

diff --git a/src/main/resources/mapper/ManPakOutMapper.xml b/src/main/resources/mapper/ManPakOutMapper.xml
index b199bc7..17daba0 100644
--- a/src/main/resources/mapper/ManPakOutMapper.xml
+++ b/src/main/resources/mapper/ManPakOutMapper.xml
@@ -2,4 +2,30 @@
 <!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>
+
+
+    </sql>
+
+    <select id="selectPakOut" resultType="com.zy.asrs.entity.param.PakOutDTO">
+        select * from (
+          SELECT ROW_NUMBER() over (order by doc_num) as row,  doc_num,MAX(create_time) as create_time FROM man_pakout
+           where 1=1
+            <include refid="selectPakOutSql"></include>
+          GROUP BY doc_num
+      ) t where t.row BETWEEN ((#{curr}-1)*#{limit}+1) and (#{curr}*#{limit})
+        ORDER BY create_time DESC
+
+    </select>
+    <select id="selectPakOutCount" resultType="java.lang.Integer">
+        select count(1) from (
+          SELECT ROW_NUMBER() over (order by doc_num) as row,  doc_num,MAX(create_time) as create_time FROM man_pakout
+       where 1=1
+        <include refid="selectPakOutSql"></include>
+          GROUP BY doc_num
+      ) t
+    </select>
 </mapper>

--
Gitblit v1.9.1