|
|
@@ -213,7 +213,6 @@ public class ProjectLibManage { |
|
|
|
String employeeCode, Project oldProject) { |
|
|
|
|
|
|
|
Project project = saveConstructProjectNewVersion(projectDto,instanceId,employeeCode,oldProject); |
|
|
|
Long newProjectId = project.getId(); |
|
|
|
|
|
|
|
// 将旧的项目状态、阶段置为null,版本置为不是最新 |
|
|
|
oldProject.setNewest(Boolean.FALSE); |
|
|
@@ -224,17 +223,6 @@ public class ProjectLibManage { |
|
|
|
.set(Project::getStatus,null) |
|
|
|
.eq(Project::getId,oldProject.getId()); |
|
|
|
projectService.update(updateWrapper); |
|
|
|
|
|
|
|
// 关联旧的项目的审核实例到新的项目ID |
|
|
|
List<Long> allVersionProjectIds = projectService.getAllVersionProjectId(project); |
|
|
|
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.in(ProjectInst::getProjectId, allVersionProjectIds)) |
|
|
|
.stream().map(p -> { |
|
|
|
p.setProjectId(newProjectId); |
|
|
|
return p; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
projectInstService.updateBatchById(projectInstList); |
|
|
|
|
|
|
|
//保存项目和实例的关系 |
|
|
|
ProjectInst projectInst = new ProjectInst(); |
|
|
|
projectInst.setProjectId(project.getId()); |
|
|
@@ -332,7 +320,9 @@ public class ProjectLibManage { |
|
|
|
project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); |
|
|
|
project.setInstCode(instanceId); |
|
|
|
project.setSponsor(employeeCode); |
|
|
|
// 项目编号不变,版本号加1 |
|
|
|
project.setProjectCode(oldProject.getProjectCode()); |
|
|
|
project.setVersion(oldProject.getVersion()); |
|
|
|
// 标记为建设方案申报 |
|
|
|
project.setIsConstruct(Boolean.TRUE); |
|
|
|
// 保存初步方案项目ID |
|
|
|