|
|
@@ -213,10 +213,8 @@ public class ProjectLibManage { |
|
|
|
String employeeCode, Project oldProject) { |
|
|
|
|
|
|
|
Project project = saveConstructProjectNewVersion(projectDto,instanceId,employeeCode,oldProject); |
|
|
|
Long newProjectId = project.getId(); |
|
|
|
|
|
|
|
// 将旧的项目状态、阶段置为null,版本置为不是最新,项目编号设置为新的项目编号 |
|
|
|
oldProject.setProjectCode(project.getProjectCode()); |
|
|
|
// 将旧的项目状态、阶段置为null,版本置为不是最新 |
|
|
|
oldProject.setNewest(Boolean.FALSE); |
|
|
|
projectService.updateById(oldProject); |
|
|
|
|
|
|
@@ -225,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()); |
|
|
@@ -333,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() + 1); |
|
|
|
// 标记为建设方案申报 |
|
|
|
project.setIsConstruct(Boolean.TRUE); |
|
|
|
// 保存初步方案项目ID |
|
|
@@ -738,15 +727,15 @@ public class ProjectLibManage { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取建设方案申报项目详情 |
|
|
|
* 获取项目初步方案详情 |
|
|
|
* @param projectId |
|
|
|
* @return com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO |
|
|
|
* @author CMM |
|
|
|
* @since 2023/07/12 11:43 |
|
|
|
*/ |
|
|
|
public ProjectDetailVO getConstructProjectDetail(Long projectId) { |
|
|
|
public ProjectDetailVO getPrePlanProjectDetail(Long projectId) { |
|
|
|
// 查询建设方案申报前最新的项目申报信息 |
|
|
|
Project projectInfo = projectService.getNewConstructProject(projectId); |
|
|
|
Project projectInfo = projectService.getById(projectId); |
|
|
|
if (Objects.isNull(projectInfo)) { |
|
|
|
return null; |
|
|
|
} |
|
|
|