From 8055633b05407b508a79dc0add7c267a678f8e54 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 17 七月 2024 15:28:40 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml |   10 +++++++---
 1 files changed, 7 insertions(+), 3 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 6633131..0bc70d2 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -153,9 +153,12 @@
         left join (
                 select ifnull(sum(a.patch_num),0) as patch_num,a.process_id,a.technology_number,a.order_sort
                 from patch_log as a
-                where a.process_id=#{processIdStr}
+                right join  reporting_work
+                on a.reporting_work_id=reporting_work.reporting_work_id
+                where
+                reporting_work.this_process = #{process}
+                and a.process_id=#{processIdStr}
                 and a.technology_number =  #{technologyStr}
-                and a.patch_processes = #{process}
                 and a.review_status = 1
                 group by a.process_id,a.order_sort,a.technology_number
             ) as patch
@@ -465,8 +468,9 @@
             and f.this_process = b.this_process
             and f.order_number = a.order_number
             and f.technology_number = a.technology_number
+
         <if test="nextProcess != null and nextProcess != ''">
-            left join (select ifnull(sum(completed_quantity),0) as completed_quantity ,
+            left join (select sum(ifnull(completed_quantity,0)+ifnull(breakage_quantity,0)) as completed_quantity ,
                             rw.process_id,
                             rwd.order_number,
                             rwd.technology_number,

--
Gitblit v1.8.0