From 25cc86fd8a2fb3b2bb6b385cba0adaf89ff3dcdc Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 18 十二月 2025 16:39:32 +0800
Subject: [PATCH] 流程卡进度打印部分代码

---
 north-glass-erp/src/main/resources/mapper/pp/DamageDetails.xml |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/pp/DamageDetails.xml b/north-glass-erp/src/main/resources/mapper/pp/DamageDetails.xml
index 4f0dd57..ac4583a 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/DamageDetails.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/DamageDetails.xml
@@ -9,11 +9,15 @@
     left join pp.reporting_work as b
     on a.reporting_work_id = b.reporting_work_id
     left join patch_log as c
-    on a.reporting_work_id = c.reporting_work_id and a.process_id = c.process_id and a.order_number = c.order_sort
+    on a.reporting_work_id = c.reporting_work_id
+           and a.process_id = c.process_id
+           and a.order_number = c.order_sort
+           and a.technology_number = c.technology_number
     WHERE a.process_id = #{processId}
     <if test="needOrderNumber!=null">
     and a.order_number = #{orderNumber}
     </if>
+    and a.available=0
     and a.technology_number =#{technologyNumber}
     and a.breakage_quantity>0
     and b.reviewed_state>=0
@@ -25,7 +29,7 @@
                            SELECT REGEXP_SUBSTR(#{behindProcess}, '[^,]+', 1, n) AS process
                            FROM cte
                            WHERE REGEXP_SUBSTR(#{behindProcess}, '[^,]+', 1, n) IS NOT NULL)
-    and c.review_status = 0
+    and ifnull(c.review_status,0) = 0
 
 </select>
     <select id="getNotReview">
@@ -41,9 +45,10 @@
   <if test="orderNumber!= null || orderNumber!=''">
       and a.order_number = #{orderNumber}
   </if>
+    and a.available=0
     and a.technology_number = #{technologyNumber}
     and a.breakage_quantity>0
-    and c.review_status = 0
+    and ifnull(c.review_status,0) = 0
 
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0