From 215a413fa2bb598cc70c71a0c9691925f814f90b Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 07 八月 2024 09:07:47 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/pp/Report.xml | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 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 340de15..949549f 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -1203,8 +1203,8 @@
if(od.shape=1,'鏅舰',if(od.shape=2,'寮傚舰','')) as shape,
sum( pd.thickness ) as thickness,
od.edging_type,
- rwd.completed_quantity,
- ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*rwd.completed_quantity/1000000,2) as area,
+ opd.reporting_work_num as completed_quantity,
+ ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*opd.reporting_work_num/1000000,2) as area,
od.product_name,
JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code
FROM
@@ -1226,9 +1226,12 @@
sd.product_detail
WHERE
detail_type = "glass"
- ) AS pd ON pd.prod_id = od.product_id
- AND pd.glass_sort = rwd.technology_number
- where rw.reviewed_state=1 and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
+ ) AS pd ON pd.prod_id = od.product_id AND pd.glass_sort = rwd.technology_number
+ LEFT JOIN sd.order_process_detail AS opd ON opd.order_id = o.order_id
+ AND opd.process_id = rw.process_id
+ AND opd.order_number = ogd.order_number
+ AND opd.technology_number = ogd.technology_number
+ where opd.reporting_work_num > 0 and rw.reviewed_state=1 and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
and position(#{selectProcesses} in rw.this_process)
<if test="teamOutputDTO.thisProcess != null and teamOutputDTO.thisProcess != ''">
and rw.this_process regexp #{teamOutputDTO.thisProcess}
@@ -1250,16 +1253,16 @@
</if>
GROUP BY
- rwd.order_number,
rw.this_process,
rw.teams_groups_name,
rw.process_id,
- rw.reporting_work_id
+ rwd.order_number
ORDER BY
rw.this_process,
+ rw.process_id,
+ rwd.order_number,
rw.reporting_work_time,
- rw.teams_groups_name,
- rw.process_id
+ rw.teams_groups_name
limit #{offset},#{pageSize};
</select>
@@ -1286,9 +1289,12 @@
sd.product_detail
WHERE
detail_type = "glass"
- ) AS pd ON pd.prod_id = od.product_id
- AND pd.glass_sort = rwd.technology_number
- where rw.reviewed_state=1 and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
+ ) AS pd ON pd.prod_id = od.product_id AND pd.glass_sort = rwd.technology_number
+ LEFT JOIN sd.order_process_detail AS opd ON opd.order_id = o.order_id
+ AND opd.process_id = rw.process_id
+ AND opd.order_number = ogd.order_number
+ AND opd.technology_number = ogd.technology_number
+ where opd.reporting_work_num > 0 and rw.reviewed_state=1 and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
and position(#{selectProcesses} in rw.this_process)
<if test="teamOutputDTO.thisProcess != null and teamOutputDTO.thisProcess != ''">
and rw.this_process regexp #{teamOutputDTO.thisProcess}
--
Gitblit v1.8.0