From b499a7e1dbcc4b9dbcdcaa46bbf5c24271bf6698 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 11 八月 2025 16:54: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/ReportingWork.xml |   19 ++++++++++++++++---
 1 files changed, 16 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 1639412..7996713 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -140,7 +140,9 @@
             odpd.reporting_work_num as completed,
             odpd.broken_num as onceBroken,
             if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag, -- 鍒ゆ柇鏄惁宸茬粡瀹屾垚锛屽凡缁忓畬鎴愪笉搴忓彿鍜屽悓搴忓彿鏁伴噺鐩稿悓鎵嶈兘鎻愪氦
-            od.other_columns
+        if(ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'')!='',
+            ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),''),
+            od.building_number) as s01Value
         FROM
             sd.order_detail AS od
         LEFT JOIN sd.order_glass_detail AS ogd
@@ -206,7 +208,10 @@
         ogd.`group`,
         if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag, -- 鍒ゆ柇鏄惁宸茬粡瀹屾垚锛屽凡缁忓畬鎴愪笉搴忓彿鍜屽悓搴忓彿鏁伴噺鐩稿悓鎵嶈兘鎻愪氦
         od.other_columns,
-        ogd.id as 'glassId',IFNULL(rws.reviewed_state,0) as reviewed_state
+        ogd.id as 'glassId',IFNULL(rws.reviewed_state,0) as reviewed_state,
+        if(ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'')!='',
+        ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),''),
+        od.building_number) as s01Value
 
         FROM
         sd.order_detail AS od
@@ -430,6 +435,9 @@
             ifnull(f.completed_quantity,0) as thisQuantitySum ,-- 鏈伐搴忓畬宸ュ拰
             if(c.quantity-f.completed_quantity = 0 ,true,false) as saveFlag,
             e.other_columns,
+        if(ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'')!='',
+        ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),''),
+        od.building_number) as s01Value
         IF(count(pl.id)>0,'宸茶ˉ鐗�','') as patchStatusOther,
 
             <if test="nextProcess != null and nextProcess != ''">  -- 闈炴渶鍚庝竴閬撳伐搴�
@@ -438,7 +446,7 @@
                     -ifnull(g.completed_quantity,0))
                     >
                    a.completed_quantity,
-                a.completed_quantity,
+                (a.completed_quantity+ a.breakage_quantity),
                    (f.completed_quantity
                        -ifnull(g.completed_quantity,0))
                     )  as minQuantity -- 淇敼鏈�灏忔暟
@@ -922,6 +930,11 @@
 
                           SELECT * FROM sd.basic_data
                           WHERE basic_type='product' AND basic_category='process' AND basic_name='閽㈠寲'
+
+                          UNION
+
+                          SELECT * FROM sd.basic_data
+                          WHERE basic_type='product' AND basic_category='process' AND basic_name='鐑集'
                       ) AS combined_results;
     </select>
 

--
Gitblit v1.8.0