|
|
@@ -915,28 +915,29 @@ public class ProjectLibManage { |
|
|
|
* 重新提交工作流时 舍弃在原有项目修改 |
|
|
|
* 新增一个新的项目 新的版本号 |
|
|
|
*/ |
|
|
|
public Project newProjectWithVersion(ProjectDTO projectDto, Boolean isConstruct) { |
|
|
|
Project oldProject = projectService.getNoNull(projectDto.getId()); |
|
|
|
Project project = new Project(); |
|
|
|
BeanUtil.copyProperties(oldProject, project, CopyOptions.create() |
|
|
|
public Project newProjectWithVersion(ProjectDTO reqProj, Boolean isConstruct) { |
|
|
|
Project oldProj = projectService.getNoNull(reqProj.getId()); |
|
|
|
Project newProj = new Project(); |
|
|
|
BeanUtil.copyProperties(oldProj, newProj, CopyOptions.create() |
|
|
|
.setIgnoreError(Boolean.TRUE).setIgnoreNullValue(Boolean.TRUE)); |
|
|
|
BeanUtil.copyProperties(projectDto, project, CopyOptions.create() |
|
|
|
BeanUtil.copyProperties(reqProj, newProj, CopyOptions.create() |
|
|
|
.setIgnoreError(Boolean.TRUE).setIgnoreNullValue(Boolean.TRUE)); |
|
|
|
project.setVersion(oldProject.getVersion() + 1); |
|
|
|
project.setId(null); |
|
|
|
project.setCreateOn(LocalDateTime.now()); |
|
|
|
project.setUpdateOn(LocalDateTime.now()); |
|
|
|
project.setIsBackReject(Boolean.FALSE); |
|
|
|
projectStateMachineUtil.pass(project); |
|
|
|
projectService.save(project); |
|
|
|
|
|
|
|
oldProject.setIsBackReject(Boolean.TRUE); |
|
|
|
projectService.updateById(oldProject); |
|
|
|
projectService.reverseNewest(project.getProjectCode(), project.getId()); |
|
|
|
saveApplication(projectDto, project, isConstruct); |
|
|
|
savePaymentPlans(project, projectDto.getPaymentPlanList()); |
|
|
|
saveGovSystemReplaceInfos(project, projectDto.getSystemReplaceInfos()); |
|
|
|
return project; |
|
|
|
newProj.setVersion(oldProj.getVersion() + 1); |
|
|
|
newProj.setId(null); |
|
|
|
newProj.setNewest(Boolean.TRUE); |
|
|
|
newProj.setCreateOn(LocalDateTime.now()); |
|
|
|
newProj.setUpdateOn(LocalDateTime.now()); |
|
|
|
newProj.setIsBackReject(Boolean.FALSE); |
|
|
|
projectStateMachineUtil.pass(newProj); |
|
|
|
projectService.save(newProj); |
|
|
|
|
|
|
|
oldProj.setIsBackReject(Boolean.TRUE); |
|
|
|
projectService.updateById(oldProj); |
|
|
|
projectService.reverseNewest(newProj.getProjectCode(), newProj.getId()); |
|
|
|
saveApplication(reqProj, newProj, isConstruct); |
|
|
|
savePaymentPlans(newProj, reqProj.getPaymentPlanList()); |
|
|
|
saveGovSystemReplaceInfos(newProj, reqProj.getSystemReplaceInfos()); |
|
|
|
return newProj; |
|
|
|
} |
|
|
|
|
|
|
|
private void saveGovSystemReplaceInfos(Project project, List<GovSystemReplaceInfoDTO> govSystemReplaceInfos) { |
|
|
|