diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java index 43da978..57a5ef0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java @@ -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,