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 | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 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 73a18fe..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
@@ -4,10 +4,13 @@
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.google.common.collect.Lists;
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;
import com.ruoyi.projectManagement.mapper.InfoMapper;
@@ -18,7 +21,7 @@
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
-import javax.validation.constraints.NotNull;
+import jakarta.validation.constraints.NotNull;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
@@ -56,16 +59,29 @@
}
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();
+ }
+
+ @Transactional
+ public void updateById(@NotNull Info info){
+ infoMapper.updateById(info);
}
public SaveInfoDto getInfoById(@NotNull Long id) {
@@ -99,7 +115,7 @@
private List<PlanStageDto> getPlanStageList(@NotNull Long planId) {
List<PlanNode> planNodeByPlanId = planService.getPlanNodeByPlanId(planId);
- return planNodeByPlanId.stream().map(it -> new PlanStageDto(it.getId(), it.getName(), PlanStageEnum.TO_BEGIN)).collect(Collectors.toList());
+ return planNodeByPlanId.stream().map(it -> new PlanStageDto(it.getId(), it.getName(), PlanStageEnum.TO_BEGIN, it.getSort(), it.getEstimatedDuration())).collect(Collectors.toList());
}
--
Gitblit v1.9.3