From a95b19ecce30a3e0ba732738367cffb0f01a260a Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 12 五月 2025 23:25:57 +0800
Subject: [PATCH] 班组产量报表添加合片工序判断
---
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml | 39 ++++++++++++++++++++++++++++++++++-----
1 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
index 91b3660..a4787b4 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -1020,10 +1020,12 @@
<select id="getFootSum">
SELECT
- SUM(rw.this_completed_quantity) AS thisCompletedQuantity,
- ROUND(SUM(ogd.child_width * ogd.child_height * rw.this_completed_quantity / 1000000), 2) AS completedArea,
- SUM(rw.this_worn_quantity) AS thisWornQuantity,
- ROUND(SUM(ogd.child_width * ogd.child_height * rw.this_worn_quantity / 1000000), 2) AS wornArea
+ SUM(rwd.completed_quantity) AS thisCompletedQuantity,
+ ROUND(SUM(ogd.child_width * ogd.child_height * rwd.completed_quantity / 1000000), 2) AS completedArea,
+ SUM(rwd.breakage_quantity) AS thisWornQuantity,
+ ROUND(SUM(ogd.child_width * ogd.child_height * rwd.breakage_quantity / 1000000), 2) AS wornArea,
+ CEILING(count(rw.reporting_work_id)/#{pageSize}) as 'pageTotal',
+ count(distinct rw.reporting_work_id) as 'total'
FROM reporting_work AS rw
LEFT JOIN reporting_work_detail AS rwd ON rw.reporting_work_id = rwd.reporting_work_id
LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = rw.order_id
@@ -1060,10 +1062,37 @@
<if test="reportingWork.teamsGroupsName != null and reportingWork.teamsGroupsName != ''">
and rw.teams_groups_name regexp #{reportingWork.teamsGroupsName}
</if>
-
</select>
<select id="selectReviewedState">
select reviewed_state from pp.reporting_work where reporting_work_id=#{reportingWorkId};
</select>
+
+ <select id="qualityReviewSearchMp" resultMap="reportingWorkMap">
+ select rw.reporting_work_id,
+ rw.reporting_work_time,
+ rw.process_id,
+ o.project,
+ o.customer_name,
+ rw.this_process,
+ ifnull(rw.this_completed_quantity,0) as this_completed_quantity,
+ rw.this_worn_quantity,
+ rw.teams_groups_name,
+ rw.device_name,
+ rw.previous_process,
+ rw.next_process,
+ rw.quality_inspector,
+ rw.quality_ins_time,
+ dd.quality_ins_status
+ from sd.order as o
+ left join sd.order_glass_detail as ogd on ogd.order_id = o.order_id
+ left join reporting_work as rw on rw.order_id = ogd.order_id and rw.production_id = ogd.production_id
+
+ right join damage_details as dd on dd.reporting_work_id=rw.reporting_work_id
+ where rw.reviewed_state != 2
+ and dd.quality_ins_status = 1
+ and rw.reviewed_state!=-1
+ GROUP BY rw.reporting_work_id
+ ORDER BY rw.reporting_work_id desc
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0