From dbec8a881baf27254a13f1f9c7b0167b9f064ab5 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 15 三月 2024 15:36:09 +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 |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 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 851f45a..3a56730 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -126,8 +126,9 @@
             od.shape,
             fc.quantity -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as quantity,
             fc.quantity -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as completedQuantity,
-            odpd.reporting_work_num_count as completed,
-            odpd.broken_num as onceBroken
+            odpd.reporting_work_num as completed,
+            odpd.broken_num as onceBroken,
+            if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag -- 鍒ゆ柇鏄惁宸茬粡瀹屾垚锛屽凡缁忓畬鎴愪笉搴忓彿鍜屽悓搴忓彿鏁伴噺鐩稿悓鎵嶈兘鎻愪氦
         FROM
             sd.order_detail AS od
         LEFT JOIN sd.order_glass_detail AS ogd
@@ -170,9 +171,10 @@
             od.shape,
             odpds.reporting_work_num -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as quantity,
             odpds.reporting_work_num -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as completedQuantity,
-            odpd.reporting_work_num_count as completed,
+            odpd.reporting_work_num as completed,
             odpd.broken_num as onceBroken,
-            ogd.`group`
+            ogd.`group`,
+            if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag -- 鍒ゆ柇鏄惁宸茬粡瀹屾垚锛屽凡缁忓畬鎴愪笉搴忓彿鍜屽悓搴忓彿鏁伴噺鐩稿悓鎵嶈兘鎻愪氦
 
 
         FROM
@@ -363,6 +365,7 @@
             a.completed_quantity as 'completedQuantity', -- 瀹屽伐鏁�
             a.breakage_quantity as 'breakageQuantity', -- 鐮存崯鏁�
             f.completed_quantity as thisQuantitySum ,-- 鏈伐搴忓畬宸ュ拰
+            if(c.quantity-f.completed_quantity = 0 ,true,false) as saveFlag,
             <if test="nextProcess != null and nextProcess != ''">  -- 闈炴渶鍚庝竴閬撳伐搴�
                 ifnull(g.completed_quantity,0) as nextQuantitySum,  -- 鍚庡伐搴忓凡瀹屾垚
                 if((f.completed_quantity
@@ -375,8 +378,8 @@
                     )  as minQuantity -- 淇敼鏈�灏忔暟
             </if>
             <if test="nextProcess == null or nextProcess == ''">  -- 鏈�鍚庝竴閬撳伐搴�
-              c.received_quantity, -- 宸插叆搴撴暟閲�
-              c.inventory_quantity, -- 搴撳瓨鏁伴噺
+#               c.received_quantity, -- 宸插叆搴撴暟閲�
+#               c.inventory_quantity, --   搴撳瓨鏁伴噺
               if(ifnull(inventory_quantity,0)
                  -ifnull(c.received_quantity,0)
                  &gt;= a.completed_quantity,0,

--
Gitblit v1.8.0