From 184e9d1d4ce1c33a47e5cc66478b10539a2cc4e7 Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期二, 20 五月 2025 15:32:08 +0800
Subject: [PATCH] 完善钣金计划大表

---
 aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateProcessShopStatMapper.xml |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateProcessShopStatMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateProcessShopStatMapper.xml
index 149a884..fe180ee 100644
--- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateProcessShopStatMapper.xml
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateProcessShopStatMapper.xml
@@ -131,4 +131,42 @@
         )
         </foreach>
     </insert>
+
+
+    <!--閽i噾璁″垝澶ц〃 宸ュ崟鍩虹淇℃伅鏌ヨ-->
+    <select id="selectPlatePlanBaseTable" resultType="com.aps.core.domain.ApsPlate.ApsPlateProcessShopPlanStat">
+        with a as(
+            select ap.document_number, string_agg(pr.process_name,',') as remained_process
+            from aps_plate_plan as ap
+                     left join aps_process_route as pr on ap.document_number=pr.work_order_no
+            where cast(pr.process_number as numeric) > cast(ap.process_number as numeric)
+            group by ap.document_number
+        )
+        select
+            app.id,
+            app.main_part_number,
+            app.customer,
+            app.business_type,
+            app.document_number,
+            app.item_number,
+            app.drawing_no,
+            app.version_number,
+            app.low_order_code,
+            app.production_quantity,
+            app.requirement_type,
+            app.document_status,
+            app.approve_on,
+            app.process_number,
+            app.work_center,
+            app.department,
+            app.op_status,
+            app.next_op_name,
+            app.order_create_time,
+            app.start_work_date,
+            app.production_base,
+            a.remained_process
+        from aps_plate_plan as app
+                 left join a on app.document_number=a.document_number
+        where app.del_flag='0';
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3