Browse Source

建设方案驳回重新申报修改

tags/24080901
CMM 1 year ago
parent
commit
04a067b1c3
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java

+ 11
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java View File

@@ -97,7 +97,10 @@ public class ConstructionPlanManage {

ProjectDTO projectInfo = dto.getProjectInfo();
Long projectInfoId = projectInfo.getId();
VUtils.isTrue(Objects.isNull(projectInfoId)).throwMessage("提交失败 缺少项目ID!");
Project oldProject = projectService.getById(projectInfoId);
VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!");
VUtils.isTrue(StringUtils.isBlank(projectInfo.getConstructionPlanFile())).throwMessage("提交失败 请提交建设方案!");

// 判断 项目当前状态 是不是 方案待申报
VUtils.isTrue(!ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode().equals(oldProject.getStatus()) ||
@@ -172,7 +175,14 @@ public class ConstructionPlanManage {
log.info("建设方案项目申报成功 【{}】", instanceId);

// 保存建设项目相关
Project buildProject = projectLibManage.saveConstructProjectInDeclared(projectInfo,instanceId,employeeCode,oldProject);
Project buildProject;
if (dto.getRestart()){
// 如果是重新提交,不用生成新版本
modifyProject(oldProject, instanceId, oldProject.getConstructionPlanFile());
buildProject = oldProject;
}else {
buildProject = projectLibManage.saveConstructProjectInDeclared(projectInfo,instanceId,employeeCode,oldProject);
}

//发送给第一个审批人消息
noticeManage.sendFirtUser(buildProject,model.getFormName(),instanceId,


Loading…
Cancel
Save