From 088c51472985d0325141ca8ffd406d2e8b25a5d3 Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期二, 13 五月 2025 16:13:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanOrderManagerMapper.xml |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanOrderManagerMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanOrderManagerMapper.xml
index d2104b0..6f64152 100644
--- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanOrderManagerMapper.xml
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanOrderManagerMapper.xml
@@ -47,14 +47,14 @@
             require.start_date,
             require.complete_date,
             plan.order_create_time
-            from aps_plate_standard_require_bom_order_detail detail
-            left join aps_plate_standard_require require  on detail.require_id =require.id
-            left join aps_plate_plan plan on detail.doc_no = plan.document_number
-        where detail.del_flag='0'
+        from aps_plate_standard_require_bom_order_detail detail
+        left join aps_plate_standard_require require on detail.require_id = require.id and require.del_flag = '0'
+        left join aps_plate_plan plan on detail.doc_no = plan.document_number and plan.del_flag = '0'
+        where detail.del_flag='0' and require.del_flag = '0' and plan.del_flag = '0'
             <if test="workOrderNo != null  and workOrderNo != ''"> and detail.doc_no = #{workOrderNo}</if>
-            <if test="requireTrackId != null  and requireTrackId != ''"> and detail.require_track_id = #{requireTrackId} </if>
-            <if test="mainPartNumber != null  and mainPartNumber != ''"> and plan.main_part_number = #{mainPartNumber} </if>
-            <if test="hasDelayRisk != null  and hasDelayRisk != ''"> and require.has_delay_risk = #{hasDelayRisk} </if>
+            <if test="requireTrackId != null  and requireTrackId != ''"> and detail.require_track_id = '${requireTrackId}'</if>
+            <if test="mainPartNumber != null  and mainPartNumber != ''"> and plan.main_part_number = #{mainPartNumber}</if>
+            <if test="hasDelayRisk != null  and hasDelayRisk != ''"> and require.has_delay_risk = #{hasDelayRisk}</if>
     </select>
 
 
@@ -137,9 +137,11 @@
             min(require.start_date) as start_date,
             min(require.complete_date) as end_date
         from aps_plate_standard_require_bom_order_detail detail
-            left join aps_plate_standard_require require on detail.require_id = require.id
-            left join aps_plate_plan plan on detail.doc_no = plan.document_number
-        where plan.id in
+            left join aps_plate_standard_require require on detail.require_id = require.id and require.del_flag = '0'
+            left join aps_plate_plan plan on detail.doc_no = plan.document_number and plan.del_flag = '0'
+        where
+            detail.del_flag = '0' and
+            plan.id in
         <foreach collection="planIds" item="planId" open="(" separator="," close=")">
             #{planId}
         </foreach>

--
Gitblit v1.9.3