From 69b16c271110dfceb8b38e835dad0fdc0730a90b Mon Sep 17 00:00:00 2001
From: tqs <56479841@qq.com>
Date: 星期二, 05 十二月 2023 08:17:58 +0800
Subject: [PATCH] #

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

diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml
index 570a39a..58d4f69 100644
--- a/src/main/resources/mapper/LocDetlMapper.xml
+++ b/src/main/resources/mapper/LocDetlMapper.xml
@@ -158,13 +158,13 @@
         select * from
         (
             select
-            ROW_NUMBER() over (order by sum(a.anfme) desc) as row
+            ROW_NUMBER() over (order by a.maktx) as row
             , a.matnr
             , sum(a.anfme) as anfme
             from man_loc_detl a
             where 1=1
             <include refid="stockOutCondition"></include>
-            group by a.matnr
+            group by a.matnr, a.maktx
         ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
     </select>
 
@@ -206,7 +206,7 @@
     </select>
 
     <select id="getStockByDocType34" resultType="java.lang.Double">
-        select ISNULL(count(anfme),0) as anfme from man_loc_detl where matnr = #{matnr}
+        select ISNULL(sum(anfme),0) as anfme from man_loc_detl where matnr = #{matnr}
         -- and doc_id = 34
     </select>
 

--
Gitblit v1.9.1