Przeglądaj źródła

modify:

1. 立项备案通过阶段状态码修改;
tags/24082801^0
WendyYang 2 miesięcy temu
rodzic
commit
7958d726c6
3 zmienionych plików z 35 dodań i 50 usunięć
  1. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectChangeStopHelper.java
  2. +3
    -8
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/DeclaredRecordManage.java
  3. +30
    -40
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/status/ProjectStatus.java

+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectChangeStopHelper.java Wyświetl plik

@@ -110,7 +110,7 @@ public class ProjectChangeStopHelper {
.build();
projectStatusChangeService.save(projectStatusChange);
project.setStatus(status.getCode());
project.setStage(status.getStage().getCode());
project.setStage(status.getStage());
projectService.updateById(project);
List<Purchase> purchases = purchaseService.listByProjectId(project.getId());
List<PurchaseStatusChange> purchaseStatusChanges = CollUtils.convert(purchases,
@@ -163,7 +163,7 @@ public class ProjectChangeStopHelper {
.build());
Integer currStatus = change.getBeforeStatus();
projectWrapper.set(Project::getStatus, currStatus);
projectWrapper.set(Project::getStage, ProjectStatus.getNoNull(currStatus).getStage().getCode());
projectWrapper.set(Project::getStage, ProjectStatus.getNoNull(currStatus).getStage());
projectService.update(projectWrapper);
List<Purchase> purchases = purchaseService.listByProjectId(projectId);
if (!purchases.isEmpty()) {


+ 3
- 8
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/DeclaredRecordManage.java Wyświetl plik

@@ -250,14 +250,9 @@ public class DeclaredRecordManage {
item.setReviewAmount(w.getReviewAmount());
item.setApprovedAmount(w.getApprovalAmount());
item.setCreateTime(w.getCreateOn());
ProjectStatus projectStatus = getDeclaredRecordStatus(w.getStatus());
item.setStatus(projectStatus.getCode());
if (projectStatus.equals(ProjectStatus.DECLARED_APPROVED_RECORD_PASSED)) {
// 特殊处理
item.setStage(ProjectStatus.PROJECT_APPROVED.getCode());
} else {
item.setStage(projectStatus.getStageCode());
}
ProjectStatus status = getDeclaredRecordStatus(w.getStatus());
item.setStatus(status.getCode());
item.setStage(status.getStage());
return item;
}).collect(Collectors.toList());
return PageVo.of(data, page.getTotal());


+ 30
- 40
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/status/ProjectStatus.java Wyświetl plik

@@ -23,82 +23,72 @@ public enum ProjectStatus implements IStatus<Integer, String> {
/**
* 项目阶段:未立项
*/
NOT_APPROVED(10000, "未立项"),
TO_BE_DECLARED(10015, "待申报"),
NOT_APPROVED(10000, "未立项", 10000),
TO_BE_DECLARED(10015, "待申报", 10000),

/**
* 合规性审查
*/
ON_COMPLIANCE_REVIEW(10030, "合规性审查中"),
COMPLIANCE_REVIEW_FAILED(10031, "合规性审查不通过"),
ON_COMPLIANCE_REVIEW(10030, "合规性审查中", 10000),
COMPLIANCE_REVIEW_FAILED(10031, "合规性审查不通过", 10000),

/**
* 项目评审
*/
WITHOUT_PROJECT_REVIEW(10040, "待项目评审"),
ON_PROJECT_REVIEW(10041, "项目评审中"),
PROJECT_REVIEW_FAILED(10042, "项目评审不通过"),
WITHOUT_PROJECT_REVIEW(10040, "待项目评审", 10000),
ON_PROJECT_REVIEW(10041, "项目评审中", 10000),
PROJECT_REVIEW_FAILED(10042, "项目评审不通过", 10000),

ON_ANNUAL_PLAN(10010, "年度计划中"),
ON_ANNUAL_PLAN(10010, "年度计划中", 10000),

/**
* 信产项目备案
*/
DECLARED_APPROVED_TO_BE_RECORD(10022, "待立项备案"),
DECLARED_APPROVED_RECORD_AUDITING(10023, "立项备案审核中"),
DECLARED_APPROVED_RECORD_FAILED(10024, "立项备案审核不通过"),
DECLARED_APPROVED_RECORD_PASSED(10025, "立项备案审核通过"),
DECLARED_APPROVED_TO_BE_RECORD(10022, "待立项备案", 10000),
DECLARED_APPROVED_RECORD_AUDITING(10023, "立项备案审核中", 10000),
DECLARED_APPROVED_RECORD_FAILED(10024, "立项备案审核不通过", 10000),
DECLARED_APPROVED_RECORD_PASSED(10025, "立项备案审核通过", 20000),

/**
* 项目阶段:已立项
*/
PROJECT_APPROVED(20000, "已立项"),
TO_BE_PURCHASED(20001, "待采购"),
ON_PURCHASING(20007, "采购中"),
PROJECT_APPROVED(20000, "已立项", 20000),
TO_BE_PURCHASED(20001, "待采购", 20000),
ON_PURCHASING(20007, "采购中", 20000),

ON_ADAPTING(20010, "适配改造中"),
ON_ADAPTING(20010, "适配改造中", 20000),

TO_BE_FIRST_INSPECTED(20008, "待上传初验材料"),
ON_PILOT_RUNNING(20009, "试运行中"),
TO_BE_FIRST_INSPECTED(20008, "待上传初验材料", 20000),
ON_PILOT_RUNNING(20009, "试运行中", 20000),

ON_FINALLY_INSPECTED(20004, "终验审核中"),
FINALLY_INSPECTED_FAILED(20005, "终验审核不通过"),
ON_FINALLY_INSPECTED(20004, "终验审核中", 20000),
FINALLY_INSPECTED_FAILED(20005, "终验审核不通过", 20000),

/**
* 项目终止
*/
STOPPED(40000, "项目终止"),
ON_STOPPED_APPLY(40001, "项目终止中"),
STOPPED_PASSED(40002, "项目终止"),
STOPPED(40000, "项目终止", 40000),
ON_STOPPED_APPLY(40001, "项目终止中", 40000),
STOPPED_PASSED(40002, "项目终止", 40000),

/**
* 项目变更
*/
CHANGE(50000, "项目变更"),
ON_CHANGE_APPLY(50001, "项目变更中"),
CHANGE(50000, "项目变更", 50000),
ON_CHANGE_APPLY(50001, "项目变更中", 50000),

/**
* 项目阶段:已归档
*/
ARCHIVED(30000, "已归档"),
ACCEPTED(30001, "已验收");
ARCHIVED(30000, "已归档", 30000),
ACCEPTED(30001, "已验收", 30000);

private final Integer code;
private final String desc;
private final Integer stage;

/**
* 项目阶段增量
*/
private static final Integer STAGE_INCR = 10000;


public ProjectStatus getStage() {
int stageCode = this.getCode() - this.getCode() % STAGE_INCR;
return getNoNull(stageCode);
}

public Integer getStageCode() {
return getStage().getCode();
public boolean isStage() {
return this.getCode().equals(this.getStage());
}

public static String getDesc(Integer code) {


Ładowanie…
Anuluj
Zapisz