From 46ebb4f42bf48f33375cdc7f364f512c0c595110 Mon Sep 17 00:00:00 2001
From: sfd <sun.sunshine@163.com>
Date: 星期二, 13 五月 2025 14:43:25 +0800
Subject: [PATCH] 钣金工单计划管理 查询添加删除标记,添加排产计划管理

---
 aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanOrderManagerMapper.xml |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 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 52fe91e..048bbaa 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,9 +47,10 @@
             require.start_date,
             require.complete_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>  
+            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'
             <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>
@@ -116,12 +117,13 @@
                require.update_time
         from
              aps_plate_standard_require require
-            left join aps_plate_standard_require_bom_order_detail detail on detail.require_id = require.id
+            left join aps_plate_standard_require_bom_order_detail detail on detail.require_id = require.id and detail.del_flag = '0'
     </sql>
 
     <select id="selectApsPlanStandardRequire" parameterType="String" resultMap="ApsPlateStandardRequireResult">
         <include refid="selectApsPlateStandardRequireVo"/>
         <where>
+            require.del_flag = '0'
             <if test="workOrderNo != null  and workOrderNo != ''"> and detail.doc_no = #{workOrderNo}</if>
         </where>
     </select>
@@ -138,9 +140,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