From 4dcb5e299757924aef0edc4d608d2305dbedc780 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期四, 18 九月 2025 08:59:33 +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 |   22 ++++++++++++++++------
 1 files changed, 16 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 f8bac5c..cd09cdb 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -448,17 +448,17 @@
                    a.completed_quantity,
                 (a.completed_quantity+ a.breakage_quantity),
                    (f.completed_quantity
-                       -ifnull(g.completed_quantity,0))
+                       -ifnull(g.completed_quantity,0) + a.breakage_quantity)
                     )  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,
-                (a.completed_quantity-(ifnull(c.inventory_quantity,0)
-                    -ifnull(c.received_quantity,0)))
+                 &gt;= a.completed_quantity,a.completed_quantity,
+                (ifnull(c.inventory_quantity,0)
+                -ifnull(c.received_quantity,0))
                 )
                 as minQuantity -- 淇敼鏈�灏忔暟
             </if>
@@ -1114,4 +1114,14 @@
         GROUP BY rw.reporting_work_id
         ORDER BY rw.reporting_work_id desc
     </select>
+
+    <select id="mesSelectWorkBasicDeviceMp">
+        SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM  sd.basic_data as bd left join  `basic_data_produce` as bdp
+        on bd.id=bdp.basic_category
+        where bd.basic_category="process" and bdp.basic_type="device" and bd.basic_name = #{process}
+    </select>
+
+    <select id="mesSelectWorkBasicTeamsMp">
+        select id,login_name,user_name,address from erp_user_info.`user`
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0