Browse Source

历史版本 只看 当前版本和退回 驳回的

tags/24080901
PoffyZhang 1 year ago
parent
commit
f1079d561d
7 changed files with 24 additions and 6 deletions
  1. +4
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java
  2. +0
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java
  3. +9
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  4. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java
  5. +4
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java
  6. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java
  7. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 4
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java View File

@@ -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,


+ 0
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java View File

@@ -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,


+ 9
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java View File

@@ -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)) {


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java View File

@@ -317,4 +317,7 @@ public class ProjectDTO implements Serializable {

@ApiModelProperty("项目类型 01首次建设;02迭代升级;03结转建设;04新运维;05续运维")
private String baseProjType;

@ApiModelProperty("是否退回|驳回的项目版本")
private Boolean isBackReject = Boolean.FALSE;
}

+ 4
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java View File

@@ -483,4 +483,8 @@ public class Project implements Serializable {

@ApiModelProperty("区县预审本级主管单位盖章审核日期")
private String countrySealAuditDate;

@ApiModelProperty("是否退回|驳回的项目版本")
private Boolean isBackReject;

}

+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java View File

@@ -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 = "当前版本";


+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -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)


Loading…
Cancel
Save