From cc8efc81d2d35bed40e47d0a5b0920a4b6f8095f Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期四, 23 十月 2025 11:04:05 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/pp/Report.xml | 77 ++++++++++++++++++++++++++++++++++++++
1 files changed, 77 insertions(+), 0 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 1973d02..611924e 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -64,6 +64,7 @@
<result column="glass_child" property="glassChild"/>
<result column="process_id" property="processId"/>
<result column="code" property="code"/>
+ <result column="responsible_personnel" property="responsiblePersonnel"/>
</resultMap>
@@ -261,6 +262,7 @@
dd.responsible_team,
dd.breakage_type,
dd.breakage_reason,
+ dd.responsible_personnel,
ROUND((dd.breakage_quantity)) as breakage_quantity,
round(ogd.child_width * ogd.child_height * (dd.breakage_quantity) / 1000000, 2) as area,
rw.this_process,
@@ -310,6 +312,9 @@
<if test="crossProcessBreakingDTO.orderId != null and crossProcessBreakingDTO.orderId != ''">
and o.order_id regexp #{crossProcessBreakingDTO.orderId}
</if>
+ <if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''">
+ and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel}
+ </if>
GROUP BY dd.id
order by dd.id desc
limit #{offset},#{pageSize}
@@ -358,6 +363,9 @@
</if>
<if test="crossProcessBreakingDTO.orderId != null and crossProcessBreakingDTO.orderId != ''">
and o.order_id regexp #{crossProcessBreakingDTO.orderId}
+ </if>
+ <if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''">
+ and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel}
</if>
order by dd.id desc
</select>
@@ -1420,6 +1428,7 @@
rw.this_process,
rw.teams_groups_name,
o.project,
+ o.order_id,
rw.process_id,
fc.order_number,
MAX(ogd.child_width) AS width,
@@ -3256,4 +3265,72 @@
</select>
+
+ <select id="selectProcessCompletedMp">
+ SELECT
+ #{selectProcesses} as process,
+ hz.project,hz.batch,
+ SUM(quantity) as quantity,
+ SUM(childArea)as childArea,
+ SUM(actualArea) as actualArea,
+ SUM(completeNum) as completeNum,
+ SUM(completeArea) as completeArea,
+ SUM(incompleteNum) as incompleteNum,
+ SUM(incompleteArea) as incompleteArea,
+ hz.glass_child
+ from (
+ select DATE(o.create_time) as create_time,
+ DATE(o.delivery_date) as delivery_date,
+ o.order_id,
+ fc.process_id,
+ o.customer_name,
+ o.project,
+ o.batch,
+ od.order_number,
+ ogd.technology_number,
+ ogd.glass_child,
+ ogd.child_width,
+ ogd.child_height,
+ fc.quantity - ifnull(fc.termination_quantity,0) as quantity,
+ ROUND(ogd.child_width * ogd.child_height / 1000000, 2) as childArea,
+ ROUND(ogd.child_width * ogd.child_height * (fc.quantity- ifnull(fc.termination_quantity,0)) / 1000000, 2) as actualArea,
+ odpd.reporting_work_num as completeNum,
+ ROUND(ogd.child_width * ogd.child_height * odpd.reporting_work_num / 1000000,
+ 2) as completeArea,
+ fc.quantity - odpd.reporting_work_num - ifnull(fc.termination_quantity,0) as incompleteNum,
+ ROUND(ogd.child_width * ogd.child_height * (fc.quantity - odpd.reporting_work_num- ifnull(fc.termination_quantity,0)) / 1000000,
+ 2) as incompleteArea,
+ od.product_name
+
+ from sd.order_detail AS od
+ LEFT JOIN sd.order_glass_detail AS ogd
+ ON od.order_id = ogd.order_id
+ AND od.order_number = ogd.order_number
+ LEFT JOIN flow_card AS fc
+ ON fc.order_id = ogd.order_id
+ and fc.production_id = ogd.production_id
+ AND fc.order_number = ogd.order_number
+ AND fc.technology_number = ogd.technology_number
+ left join sd.order_process_detail as odpd
+ ON odpd.order_id = fc.order_id
+ AND odpd.order_number = fc.order_number
+ AND odpd.technology_number = fc.technology_number
+ and odpd.process_id = fc.process_id
+ left join sd.`order` as o
+ on o.order_id = od.order_id
+ where o.create_order>0
+ and odpd.process = #{selectProcesses}
+ and o.create_time >= #{selectTime1}
+ AND o.create_time < #{selectTime2}
+ and position(#{orderId} in od.order_id)
+ and position(#{inputProject} in o.project)
+ and GREATEST(fc.quantity - odpd.reporting_work_num, 0)>0
+ and fc.quantity-ifnull(fc.termination_quantity,0)>0
+ GROUP BY fc.process_id, fc.order_number, fc.technology_number
+ order by fc.process_id, fc.order_number, fc.technology_number
+ ) as hz
+ GROUP BY hz.project,hz.batch,glass_child
+ </select>
+
+
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0