|
|
@@ -317,6 +317,7 @@ public class ProjectLibManage { |
|
|
|
project.setVersion(oldProject.getVersion() + 1); |
|
|
|
// 标记为建设方案申报 |
|
|
|
project.setIsConstruct(Boolean.TRUE); |
|
|
|
project.setIsBackReject(Boolean.FALSE); |
|
|
|
// 保存初步方案项目ID |
|
|
|
if (Boolean.TRUE.equals(oldProject.getIsConstruct())) { |
|
|
|
// 重新提交 |
|
|
@@ -384,6 +385,7 @@ public class ProjectLibManage { |
|
|
|
project.setId(null); |
|
|
|
project.setCreateOn(LocalDateTime.now()); |
|
|
|
project.setUpdateOn(LocalDateTime.now()); |
|
|
|
project.setIsBackReject(Boolean.TRUE); |
|
|
|
stateMachineUtils.pass(project); |
|
|
|
projectService.save(project); |
|
|
|
|
|
|
@@ -410,6 +412,8 @@ public class ProjectLibManage { |
|
|
|
project.setId(null); |
|
|
|
project.setCreateOn(LocalDateTime.now()); |
|
|
|
project.setUpdateOn(LocalDateTime.now()); |
|
|
|
//都是在驳回 重新提交时用的 |
|
|
|
project.setIsBackReject(Boolean.TRUE); |
|
|
|
if (Objects.nonNull(stageCode)) { |
|
|
|
project.setStage(stageCode); |
|
|
|
} |
|
|
@@ -500,7 +504,7 @@ public class ProjectLibManage { |
|
|
|
return project; |
|
|
|
} |
|
|
|
|
|
|
|
public Project saveProjectWithVersionAndPass(Project oldProject, String instanceId, Integer instType) { |
|
|
|
public Project saveProjectWithVersionAndPass(Project oldProject, String instanceId, Integer instType,Boolean isBackReject) { |
|
|
|
Project project = new Project(); |
|
|
|
VUtils.isTrue(Objects.isNull(oldProject)) |
|
|
|
.throwMessage("项目不存在!"); |
|
|
@@ -513,6 +517,7 @@ public class ProjectLibManage { |
|
|
|
project.setUpdateOn(LocalDateTime.now()); |
|
|
|
// 标识保存的项目信息是否为建设方案申报项目 |
|
|
|
project.setIsConstruct(Boolean.TRUE); |
|
|
|
project.setIsBackReject(isBackReject); |
|
|
|
stateMachineUtils.pass(project); |
|
|
|
|
|
|
|
if (projectService.save(project)) { |
|
|
@@ -1020,8 +1025,11 @@ public class ProjectLibManage { |
|
|
|
return res; |
|
|
|
} |
|
|
|
|
|
|
|
//只查 当前版本 和历史被驳回|退回的版本 |
|
|
|
List<Project> historyProjects = projectService.list(Wrappers.lambdaQuery(Project.class) |
|
|
|
.eq(Project::getProjectCode, project.getProjectCode()) |
|
|
|
.and(q1->q1.eq(Project::getNewest, Boolean.TRUE) |
|
|
|
.or(q2->q2.eq(Project::getIsBackReject,Boolean.TRUE))) |
|
|
|
.orderByDesc(Project::getCreateOn)); |
|
|
|
|
|
|
|
if (CollUtil.isEmpty(historyProjects)) { |
|
|
|