From d3cb0e841e6585aa84a45f18bb30965db8d1a6aa Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 08 一月 2025 15:48:40 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/MatMapper.xml |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/MatMapper.xml b/src/main/resources/mapper/MatMapper.xml
index 5f89c82..28a995c 100644
--- a/src/main/resources/mapper/MatMapper.xml
+++ b/src/main/resources/mapper/MatMapper.xml
@@ -55,9 +55,10 @@
         LEFT JOIN (
             select
             matnr,
-            sum(anfme) as amount
+            sum(anfme) as amount,
+            batch
             from man_loc_detl
-            group by matnr
+            group by matnr,batch
         ) as mld on mld.matnr = mm.matnr
         WHERE 1=1
         and (mm.memo is null or mm.memo != '鎵撳寘涓婄嚎')
@@ -68,6 +69,9 @@
         <if test="maktx != null and maktx != ''">
             and mm.maktx like concat('%',#{maktx},'%')
         </if>
+        <if test="batch != null and batch != ''">
+            and mld.batch like concat('%',#{batch},'%')
+        </if>
         ORDER BY mm.create_time DESC
     </select>
 

--
Gitblit v1.9.1