From 07aad9ee40befc60e1e6e231ec36b98bff294796 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期二, 12 八月 2025 10:07:23 +0800
Subject: [PATCH] 修改装箱打印

---
 north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml b/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
index 190f012..836847a 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
@@ -118,7 +118,7 @@
                 and fol.type regexp #{finishedOperateLog.type}
             </if>
             <if test="finishedOperateLog.remarks != null and finishedOperateLog.remarks != ''">
-                and fol.remarks regexp #{finishedOperateLog.remarksr}
+                and fol.remarks regexp #{finishedOperateLog.remarks}
             </if>
             <if test="finishedOperateLog.area != null and finishedOperateLog.area != ''">
                 and fol.area regexp #{finishedOperateLog.area}
@@ -192,7 +192,7 @@
                 and fol.type regexp #{finishedOperateLog.type}
             </if>
             <if test="finishedOperateLog.remarks != null and finishedOperateLog.remarks != ''">
-                and fol.remarks regexp #{finishedOperateLog.remarksr}
+                and fol.remarks regexp #{finishedOperateLog.remarks}
             </if>
             <if test="finishedOperateLog.area != null and finishedOperateLog.area != ''">
                 and fol.area regexp #{finishedOperateLog.area}
@@ -801,7 +801,7 @@
                 and  o.delivery_address regexp #{finishedOperateLog.order.deliveryAddress}
             </if>
             <if test="finishedOperateLog.remarks != null and finishedOperateLog.remarks != ''">
-                and fol.remarks regexp #{finishedOperateLog.remarksr}
+                and fol.remarks regexp #{finishedOperateLog.remarks}
             </if>
         </where>
         group by fol.remarks,od.order_id
@@ -850,7 +850,7 @@
                 and  o.delivery_address regexp #{finishedOperateLog.order.deliveryAddress}
             </if>
             <if test="finishedOperateLog.remarks != null and finishedOperateLog.remarks != ''">
-                and fol.remarks regexp #{finishedOperateLog.remarksr}
+                and fol.remarks regexp #{finishedOperateLog.remarks}
             </if>
         </where>
         group by fol.remarks,od.order_id,fol.process_id) as zu
@@ -883,6 +883,7 @@
         select kkk.*,rw.teams_groups_name as teams_groups_name2 from(select  o.order_id,
                                                                              o.customer_name,
                                                                              o.project,
+                                                                             o.batch,
                                                                              fol.remarks,
                                                                              SUM(fol.quantity) as quantity,
                                                                              ROUND( sum(od.width * od.height * fol.quantity) / 1000000, 2 ) as area,
@@ -935,11 +936,11 @@
             ifnull(od.building_number,ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'')) as building_number,
             od.width,
             od.height,
-            fol.quantity,
+            sum(fol.quantity) as quantity,
             od.product_name,
             od.product_id,
-            ROUND( od.width * od.height * fol.quantity / 1000000, 2 ) as area,
-            ROUND( od.width * od.height * fol.quantity / 1000000, 2 )*#{thickness}*2.5 as weight
+            ROUND(sum(od.width * od.height * fol.quantity / 1000000) , 2 ) as area,
+            ROUND(sum(od.width * od.height * fol.quantity / 1000000) , 2 )*#{thickness}*2.5 as weight
         FROM
             ( SELECT * FROM mm.finished_operate_log aa WHERE aa.operate_type = '鍏ュ簱' AND aa.STATUS != '宸蹭綔搴�' ) fol
                 LEFT JOIN sd.order_detail od ON fol.order_id = od.order_id
@@ -947,6 +948,7 @@
                 LEFT JOIN sd.`order` o ON o.order_id = fol.order_id
         WHERE
             o.order_id=#{orderId} and fol.remarks=#{remarks} and od.product_id=#{productId}
+        group by od.order_id,od.order_number
         ORDER BY
             fol.operate_time DESC
 

--
Gitblit v1.8.0