Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
PoffyZhang 1 year ago
parent
commit
632776aeef
1 changed files with 9 additions and 5 deletions
  1. +9
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java

+ 9
- 5
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java View File

@@ -96,6 +96,13 @@ public class ConstructionPlanManage {
.throwMessage("获取登录用户失败!");

ProjectDTO projectInfo = dto.getProjectInfo();
Long projectInfoId = projectInfo.getId();
Project oldProject = projectService.getById(projectInfoId);

// 判断 项目当前状态 是不是 方案待申报
VUtils.isTrue(!ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode().equals(oldProject.getStatus()) ||
!ProjectStatusEnum.NOT_APPROVED.getCode().equals(oldProject.getStage()))
.throwMessage("提交失败 该项目不是 方案待申报状态或者未立项阶段");

if(StringUtils.isNotBlank(user.getRegionCode())){
projectInfo.setAreaCode(user.getRegionCode());
@@ -124,6 +131,8 @@ public class ConstructionPlanManage {

Project constructProject = new Project();
BeanUtils.copyProperties(projectInfo,constructProject);
constructProject.setStatus(oldProject.getStatus());
constructProject.setStage(oldProject.getStage());

String regionCode = user.getRegionCode();

@@ -147,11 +156,6 @@ public class ConstructionPlanManage {
return "因为建设方案流程被禁用了 直接跳过!";
}

// 判断 项目当前状态 是不是 方案待申报
VUtils.isTrue(!ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode().equals(constructProject.getStatus()) ||
!ProjectStatusEnum.NOT_APPROVED.getCode().equals(constructProject.getStage()))
.throwMessage("提交失败 该项目不是 方案待申报状态或者未立项阶段");

ProcessStartParamsVo params = new ProcessStartParamsVo();
params.setUser(declaredProjectManage.buildUser(employeeCode));
params.setProcessUsers(Collections.emptyMap());


Loading…
Cancel
Save