From 7762642aceaf3ba55ee6ec37a2d99ad3c827e5ff Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期四, 18 十二月 2025 16:29:21 +0800
Subject: [PATCH] 在制品报表汇总修改
---
north-glass-erp/src/main/resources/mapper/pp/Report.xml | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/north-glass-erp/src/main/resources/mapper/pp/Report.xml b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
index 37cbad3..6a96bad 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -3460,8 +3460,13 @@
SELECT g.*
,GROUP_CONCAT(g.glass_child SEPARATOR '+') as childName
from( SELECT f.*,
- e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num as quantity,
- (e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num)*f.area as glassArea
+ if((e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity)>0,
+ (e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity),
+ 0
+ ) as quantity,
+ if((e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity)>0,
+ (e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity) ,
+ 0)*f.area as glassArea
from (SELECT a.order_id,
if(a.batch!="",CONCAT(a.project,'(',a.batch,')'),a.project) as project,
C.product_id,
@@ -3474,7 +3479,8 @@
b.id,
c.area,
d.glass_child,
- ifnull(cb.patchNumSum,0) as patchNumSum
+ ifnull(cb.patchNumSum,0) as patchNumSum,
+ fc.termination_quantity
FROM sd.`order` as a
LEFT JOIN sd.order_process_detail as b
@@ -3536,6 +3542,7 @@
) as h
+ where h.quantity >0
<choose>
<when test="optionVal == 1">
GROUP BY thisProcess
--
Gitblit v1.8.0