From 2dd645b5346f510d1207346347f1fa70a204d9d3 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 05 十一月 2026 16:11:34 +0800
Subject: [PATCH] 1. 完成项目管理全流程优化,补充阶段推进、汇报统计及生命周期记录。 2. 完成业务与项目数据关联,支持查看项目进度、详情及相关附件。 3. 完成采购审批流程接入,支持配置审批人员及采购业务审批。 4. 精简用户、角色、部门、菜单和字典,完善操作日志及附件下载。

---
 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..4a5aed5 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("椤圭洰寮�濮嬪悗锛岄」鐩熀鏈俊鎭�佽礋璐d汉鍜岄」鐩粡鐞嗗潎涓嶅彲淇敼");
+            }
             infoMapper.updateById(info);
         }
         return info.getId();

--
Gitblit v1.9.3