From dec8951aae400e54f6ee83a8f95867dba9da8af1 Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期五, 23 五月 2025 17:17:33 +0800
Subject: [PATCH] [钣金计划大表] 优化:焊缝统计导出Excel样式

---
 aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java
index 742e2bf..49a8da2 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java
@@ -118,6 +118,14 @@
         plan.setOrgCode(factory);
         plan.setMajor(major);
         List<ApsGasPipelineCapacityPlan> templatePlans = apsGasPipelineCapacityPlanMapper.selectApsGasPipelineCapacityPlanList(plan);
+        templatePlans.forEach(p -> {
+            p.setCreateBy(SecurityUtils.getUsername());
+            p.setCreateTime(new Date());
+            p.setUpdateBy(null);
+            p.setUpdateTime(null);
+//                apsGasPipelineCapacityPlanMapper.insertApsGasPipelineCapacityPlan(p);
+        });
+
         while (dtStart.before(dtEnd)) {
             String year = dtStart.get(Calendar.YEAR) + "";
             String month = (dtStart.get(Calendar.MONTH) + 1) + "";
@@ -128,14 +136,12 @@
                     major
             );
             templatePlans.forEach(p -> {
+                p.setId(null);
                 p.setYear(year);
                 p.setMonth(month);
-                p.setCreateBy(SecurityUtils.getUsername());
-                p.setCreateTime(new Date());
-                p.setUpdateBy(null);
-                p.setUpdateTime(null);
-                apsGasPipelineCapacityPlanMapper.insertApsGasPipelineCapacityPlan(p);
+//                apsGasPipelineCapacityPlanMapper.insertApsGasPipelineCapacityPlan(p);
             });
+            apsGasPipelineCapacityPlanMapper.insert(templatePlans);
 
             dtStart.add(Calendar.MONTH, 1);
         }

--
Gitblit v1.9.3