From 521cb19f79a6a05b3fbab7403956bf039820a740 Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期三, 23 四月 2025 10:40:19 +0800
Subject: [PATCH] 定时任务增加 钣金批量保存

---
 aps-modules/aps-job/src/main/resources/mapper/job/ApsWorkOrderJobMapper.xml |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/aps-modules/aps-job/src/main/resources/mapper/job/ApsWorkOrderJobMapper.xml b/aps-modules/aps-job/src/main/resources/mapper/job/ApsWorkOrderJobMapper.xml
index 3ce7c26..a4ceb8c 100644
--- a/aps-modules/aps-job/src/main/resources/mapper/job/ApsWorkOrderJobMapper.xml
+++ b/aps-modules/aps-job/src/main/resources/mapper/job/ApsWorkOrderJobMapper.xml
@@ -322,4 +322,33 @@
              or mainitem_code like 'M14%'or mainitem_code like 'M15%' or mainitem_code like 'F%' or mainitem_code like 'Z%')
         );
     </insert>
+    <delete id="deleteAllPlatePlan" >
+        delete from aps_plate_plan where del_flag in ('0','1')
+    </delete>
+    <insert id="batchInsertPlatePlan">
+        insert into aps_plate_plan
+        (
+            document_number,main_part_number,main_part_drawing_number,
+            customer,business_type,requirement_type,
+            document_status,item_number,drawing_no,
+            version_number,production_quantity,good_products_quantity,
+            process_number,work_center,department,
+            plan_start_day,plan_end_day,next_process_deparment,
+            is_suspended,is_outsourcing,account,
+            id,create_time,del_flag,plant,order_status
+        )
+        select
+            doc_no,mainitem_code,mainitem_figure,
+            customer_name,business_type,demand_type,
+            doc_status,item_code,item_figure,
+            item_figure_version,pruduct_qty,work_qty,
+            op_num,work_center,dept,
+            start_date,complete_date,next_dept,
+            is_hold_release,is_out_source,org_code,
+            order_id,now(),'0',org_code,doc_status
+        from aps_work_order_job
+        where ( doc_status in (0,1,2,4)
+                and (mainitem_code like 'M03%' or mainitem_code like 'M04%'or mainitem_code like 'A75%')
+              );
+    </insert>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3