From ebd793bbc910b095aaa15d9e733324bbeb8b94a9 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 12 一月 2026 08:13:08 +0800
Subject: [PATCH] 1

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

diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index 0e0eab5..ad33ebc 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -44,6 +44,7 @@
         <result column="appe_user" property="appeUser" />
         <result column="appe_time" property="appeTime" />
         <result column="memo" property="memo" />
+        <result column="owner" property="owner" />
     </resultMap>
 
     <sql id="batchSeq">
@@ -110,6 +111,9 @@
         </if>
         <if test="batch!=null and batch!='' ">
             and a.batch like '%' + #{batch} + '%'
+        </if>
+        <if test="owner!=null and owner!='' ">
+            and a.owner = #{owner}
         </if>
         <if test="startTime!=null and endTime!=null">
             and a.modi_time between #{startTime} and #{endTime}
@@ -188,6 +192,23 @@
         ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
     </select>
 
+    <select id="getStockStatisDate" resultType="com.zy.asrs.entity.LocDetl">
+        select * from
+        (
+        select
+        ROW_NUMBER() over (order by a.anfme,a.batch desc) as row
+        , a.matnr
+        , a.loc_no as locNo
+        , a.batch
+        , a.anfme
+        , a.modi_time as modiTime
+        from asr_loc_detl a
+        where 1=1
+        <include refid="stockOutCondition"></include>
+        group by a.matnr,a.batch,a.anfme, a.loc_no, a.modi_time
+        ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+    </select>
+
     <select id="getStockStatisOut" resultType="com.zy.asrs.entity.LocDetl">
         select * from
         (
@@ -219,6 +240,18 @@
      ) b
     </select>
 
+    <select id="getStockStatisDateCount" parameterType="java.util.Map" resultType="java.lang.Integer">
+        select count(1) as count from
+        (
+        select
+        a.matnr
+        from asr_loc_detl a
+        where 1=1
+        <include refid="stockOutCondition"></include>
+        group by a.matnr
+        ) b
+    </select>
+
     <select id="getStockStatisOutCount" parameterType="java.util.Map" resultType="java.lang.Integer">
         select count(1) as count from
         (

--
Gitblit v1.9.1