From f1079d561df741a3f80c61ceaabc2c9564ea1c92 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Thu, 3 Aug 2023 11:58:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E7=89=88=E6=9C=AC=20?= =?UTF-8?q?=E5=8F=AA=E7=9C=8B=20=E5=BD=93=E5=89=8D=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=92=8C=E9=80=80=E5=9B=9E=20=E9=A9=B3=E5=9B=9E=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectdeclared/manage/FinalAcceptanceManage.java | 6 ++++-- .../pmapi/projectdeclared/manage/ReviewByDeptJointManage.java | 3 --- .../ningdatech/pmapi/projectlib/manage/ProjectLibManage.java | 10 +++++++++- .../com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java | 3 +++ .../com/ningdatech/pmapi/projectlib/model/entity/Project.java | 4 ++++ .../ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java | 3 +++ .../ningdatech/pmapi/todocenter/manage/TodoCenterManage.java | 1 + 7 files changed, 24 insertions(+), 6 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java index d2e15d5..5fa6eb9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java @@ -238,7 +238,8 @@ public class FinalAcceptanceManage { //保存终验项目 //生成新版本 并且进入下一状态 - projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode()); + projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId, + InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode(),Boolean.TRUE); //发送给第一个审批人消息 noticeManage.sendFirtUser(projectInfo,model.getFormName(),instanceId, @@ -298,7 +299,8 @@ public class FinalAcceptanceManage { //保存终验项目 //生成新版本 并且进入下一状态 - projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode()); + projectInfo = projectLibManage.saveProjectWithVersionAndPass(projectInfo,instanceId, + InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode(),Boolean.TRUE); //发送给第一个审批人消息 noticeManage.sendFirtUser(projectInfo,model.getFormName(),instanceId, diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java index c318a54..577c0c5 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java @@ -102,9 +102,6 @@ public class ReviewByDeptJointManage { //保存项目信息 projectInfo = projectLibManage.saveProjectWithVersion(projectInfo,instanceId,ProjectProcessStageEnum.DEPARTMENT_JOINT_APPROVAL_PROCESS.getCode()); -// if(!modifyProject(projectInfo, instanceId)){ -// return Boolean.FALSE; -// } //发送给第一个审批人消息 noticeManage.sendFirtUser(projectInfo,model.getFormName(),instanceId, diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 559ab06..4f5afa6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -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 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)) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java index 8c38403..06edaf1 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java @@ -317,4 +317,7 @@ public class ProjectDTO implements Serializable { @ApiModelProperty("项目类型 01首次建设;02迭代升级;03结转建设;04新运维;05续运维") private String baseProjType; + + @ApiModelProperty("是否退回|驳回的项目版本") + private Boolean isBackReject = Boolean.FALSE; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java index 6856b51..fcb7571 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java @@ -483,4 +483,8 @@ public class Project implements Serializable { @ApiModelProperty("区县预审本级主管单位盖章审核日期") private String countrySealAuditDate; + + @ApiModelProperty("是否退回|驳回的项目版本") + private Boolean isBackReject; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java index 21ded6a..edaab44 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java @@ -395,6 +395,9 @@ public class ProjectDetailVO { @ApiModelProperty("审批详情") private ProcessProgressDetailVo process; + @ApiModelProperty("是否退回|驳回的项目版本") + private Boolean isBackReject; + public String getVersionStr() { if (Objects.nonNull(this.newest) && this.newest) { this.versionStr = "当前版本"; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 25c3b0f..04d8341 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -1106,6 +1106,7 @@ public class TodoCenterManage { project.setId(null); project.setCreateOn(LocalDateTime.now()); project.setUpdateOn(LocalDateTime.now()); + project.setIsBackReject(Boolean.TRUE); projectService.save(project); ProjectInst oldInst = projectInstService.getOne(Wrappers.lambdaUpdate(ProjectInst.class)