|
|
@@ -255,7 +255,9 @@ public class ProjectLibManage { |
|
|
|
project.setSponsor(employeeCode); |
|
|
|
String projectCode = generateProjectCodeUtil.generateProjectCode(projectDto); |
|
|
|
project.setProjectCode(projectCode); |
|
|
|
projectService.save(project); |
|
|
|
if(projectService.save(project)){ |
|
|
|
saveApplication(projectDto,project,null); |
|
|
|
} |
|
|
|
} else { |
|
|
|
//否则是重新提交的 新生成一个新版本的项目 |
|
|
|
project = newProjectWithVersion(projectDto); |
|
|
@@ -309,13 +311,16 @@ public class ProjectLibManage { |
|
|
|
} else { |
|
|
|
project.setPrePlanProjectId(oldProject.getId()); |
|
|
|
} |
|
|
|
projectService.save(project); |
|
|
|
if(projectService.save(project)){ |
|
|
|
saveApplication(projectDto,project,null); |
|
|
|
|
|
|
|
// 将旧的项目版本置为不是最新 |
|
|
|
projectService.update(Wrappers.lambdaUpdate(Project.class) |
|
|
|
.set(Project::getNewest, Boolean.FALSE) |
|
|
|
.ne(Project::getId, project.getId()) |
|
|
|
.eq(Project::getProjectCode, project.getProjectCode())); |
|
|
|
} |
|
|
|
|
|
|
|
// 将旧的项目版本置为不是最新 |
|
|
|
projectService.update(Wrappers.lambdaUpdate(Project.class) |
|
|
|
.set(Project::getNewest, Boolean.FALSE) |
|
|
|
.ne(Project::getId, project.getId()) |
|
|
|
.eq(Project::getProjectCode, project.getProjectCode())); |
|
|
|
} else { |
|
|
|
//否则是被驳回,重新提交的 新生成一个新版本的项目 |
|
|
|
project = newProjectWithVersion(projectDto); |
|
|
|