From e5ea2c30e33f280ffc8a0ce78224ef99fb6679b1 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期二, 30 十二月 2025 08:16:06 +0800
Subject: [PATCH] 在制品报表导出修改
---
north-glass-erp/src/main/resources/mapper/pp/Report.xml | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 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 0494867..64b23dc 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -3651,10 +3651,12 @@
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,
+ 0,e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity) as quantity,
+ round(if(e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity<0,0,
+ e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity)*f.area/1000000,2) as glassArea
from (SELECT a.order_id,
- a.project,
+ if(a.batch!="",CONCAT(a.project,'(',a.batch,')'),a.project) as project,
C.product_id,
b.order_number,
b.process_id,
@@ -3663,9 +3665,10 @@
d.`group` ,
b.broken_num,
b.id,
- c.area,
+ d.child_width * d.child_height as 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
@@ -3698,17 +3701,18 @@
and fc.technology_number = d.technology_number
where a.processing_card>0
and a.warehousing!=2
- <if test="terminationVal != '1' and terminationVal != 1">
+ <if test=" terminationVal != '1' and terminationVal != 1">
and termination_status !=1
</if>
- and (c.quantity-b.reporting_work_num_count)>0
GROUP BY b.process_id, b.order_number,
b.technology_number) as f
LEFT JOIN sd.order_process_detail as e
on e.id=(f.id-1) and e.process_id = f.process_id and e.order_number = f.order_number and e.technology_number =f.technology_number
where
e.id is not null
- and (e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num)>0 ) as g
+ and (e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num)>0 group by f.process_id, f.order_number,
+ f.technology_number ORDER BY f.process_id, f.order_number,
+ f.technology_number) as g
<choose>
<when test="laminating == 'stepB'">
GROUP BY g.process_id, g.order_number, g.technology_number
@@ -3726,6 +3730,7 @@
) as h
+ where h.quantity >0
<choose>
<when test="inputVal == 1">
GROUP BY thisProcess
--
Gitblit v1.8.0