From f76bf27bf93e523ae4572d9e10e9ca541c324185 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期二, 03 十一月 2026 17:18:55 +0800
Subject: [PATCH] 部分改动

---
 src/main/java/com/ruoyi/projectManagement/service/impl/handle/InfoHandleService.java |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/ruoyi/projectManagement/service/impl/handle/InfoHandleService.java b/src/main/java/com/ruoyi/projectManagement/service/impl/handle/InfoHandleService.java
index a5f2ff4..77b8ad2 100644
--- a/src/main/java/com/ruoyi/projectManagement/service/impl/handle/InfoHandleService.java
+++ b/src/main/java/com/ruoyi/projectManagement/service/impl/handle/InfoHandleService.java
@@ -9,6 +9,7 @@
 import com.ruoyi.basic.service.CustomerFollowUpFileService;
 import com.ruoyi.common.enums.PlanStageEnum;
 import com.ruoyi.common.enums.ReviewStatusEnum;
+import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.projectManagement.dto.InfoStageDto;
 import com.ruoyi.projectManagement.dto.PlanStageDto;
 import com.ruoyi.projectManagement.dto.SaveInfoDto;
@@ -58,13 +59,21 @@
         }
         info.setTeam(saveInfoDto.getTeamList());
         if (info.getId() == null) {
-            // 鐢熸垚瀵瑰簲鐨勯樁娈靛叧绯绘暟鎹�
-            info.setPlanStage(getPlanStageList(info.getProjectManagementPlanId()));
+            // 鏂伴」鐩樁娈电敱 project_management_phase 鐙珛缁存姢锛屼笉鍐嶇敓鎴愭棫璁″垝妯℃澘闃舵銆�
+            info.setPlanStage(Collections.emptyList());
+            if (StrUtil.isBlank(info.getCurrentPhase())) {
+                info.setCurrentPhase("鏈紑濮�");
+            }
             // 鎻掑叆榛樿鐘舵��
             info.setStatus(PlanStageEnum.TO_BEGIN.getCode());
             info.setReviewStatus(ReviewStatusEnum.PENDING_REVIEW.getCode());
             infoMapper.insert(info);
         } else {
+            Info existing = infoMapper.selectById(info.getId());
+            if (existing == null) throw new ServiceException("椤圭洰涓嶅瓨鍦�");
+            if (!StrUtil.isBlank(existing.getCurrentPhase()) && !"鏈紑濮�".equals(existing.getCurrentPhase())) {
+                throw new ServiceException("椤圭洰寮�濮嬪悗鍩烘湰淇℃伅鍜屽洟闃熶俊鎭凡閿佸畾锛屼粎鍙�氳繃浜哄憳璋冩暣鍔熻兘淇敼椤圭洰鎵ц浜�");
+            }
             infoMapper.updateById(info);
         }
         return info.getId();

--
Gitblit v1.9.3