Pārlūkot izejas kodu

滞后预警规则配置修改

tags/24090101
CMM pirms 2 mēnešiem
vecāks
revīzija
6fa593cfe9
3 mainītis faili ar 37 papildinājumiem un 25 dzēšanām
  1. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java
  2. +27
    -21
      hz-pm-api/src/test/java/com/hz/pm/api/warning/DelayWarningTest.java
  3. +9
    -3
      hz-pm-api/src/test/resources/application-dev.yml

+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java Parādīt failu

@@ -24,7 +24,7 @@ public enum WarningFlowTypeEnum {
*/
APPROVED_PROJECT_NOT_PURCHASED(1, "已立项未采购", ProjectStatus.TO_BE_PURCHASED, "project/declareManage/projectManages/purchaseResults"),
PURCHASED_UNMODIFIED(2, "已采购未改造完成", ProjectStatus.ON_ADAPTING, "project/declareManage/projectManages/adaptiveTransformation"),
MODIFIED_NOT_FINAL_INSPECTION(3, "已改造完成未终验", ProjectStatus.ON_PILOT_RUNNING, "project/declareManage/projectManages/finalInspectionDeclare");
MODIFIED_NOT_FINAL_INSPECTION(3, "已改造完成未终验", ProjectStatus.TO_BE_FIRST_INSPECTED, "project/declareManage/projectManages/finalInspectionDeclare");

private Integer code;
private String desc;


+ 27
- 21
hz-pm-api/src/test/java/com/hz/pm/api/warning/DelayWarningTest.java Parādīt failu

@@ -138,31 +138,37 @@ public class DelayWarningTest extends AppTests {
switch (flowType) {
// 已立项未采购 获取 立项时间
case APPROVED_PROJECT_NOT_PURCHASED:{
Map<String, ProjectStatusChange> approvedProjectNotPurchasedMap = projectStatusChangeService.listLastEventMap(projectCodes,
ProjectStateChangeEvent.DECLARED_RECORD_PASS);
if (CollUtil.isNotEmpty(approvedProjectNotPurchasedMap)){
projectStatusChangeMap.putAll(approvedProjectNotPurchasedMap);
stepName = TaskConstant.StepName.PURCHASE;
stepName = TaskConstant.StepName.PURCHASE;
if (CollUtil.isNotEmpty(projectCodes)) {
Map<String, ProjectStatusChange> approvedProjectNotPurchasedMap = projectStatusChangeService.listLastEventMap(projectCodes,
ProjectStateChangeEvent.DECLARED_RECORD_PASS);
if (CollUtil.isNotEmpty(approvedProjectNotPurchasedMap)) {
projectStatusChangeMap.putAll(approvedProjectNotPurchasedMap);
}
}
}
break;
// 已采购未改造完成 获取合同签订时间
case PURCHASED_UNMODIFIED:{
Map<String, ProjectStatusChange> purchasedUnmodifiedMap = projectStatusChangeService.listLastEventMap(projectCodes,
ProjectStateChangeEvent.SUBMIT_PURCHASE_CONTRACT_RECORD);
if (CollUtil.isNotEmpty(purchasedUnmodifiedMap)){
projectStatusChangeMap.putAll(purchasedUnmodifiedMap);
stepName = TaskConstant.StepName.ADAPT_MODIFY;
stepName = TaskConstant.StepName.ADAPT_MODIFY;
if (CollUtil.isNotEmpty(projectCodes)) {
Map<String, ProjectStatusChange> purchasedUnmodifiedMap = projectStatusChangeService.listLastEventMap(projectCodes,
ProjectStateChangeEvent.SUBMIT_PURCHASE_CONTRACT_RECORD);
if (CollUtil.isNotEmpty(purchasedUnmodifiedMap)) {
projectStatusChangeMap.putAll(purchasedUnmodifiedMap);
}
}
}
break;
// 已改造完成未终验 获取单位确认时间
case MODIFIED_NOT_FINAL_INSPECTION:{
Map<String, ProjectStatusChange> modifiedNotFinalInspectionMap = projectStatusChangeService.listLastEventMap(projectCodes,
ProjectStateChangeEvent.SUBMIT_PURCHASE_ORG_CONFIRM);
if (CollUtil.isNotEmpty(modifiedNotFinalInspectionMap)){
projectStatusChangeMap.putAll(modifiedNotFinalInspectionMap);
stepName = TaskConstant.StepName.FINAL;
stepName = TaskConstant.StepName.FINAL;
if (CollUtil.isNotEmpty(projectCodes)) {
Map<String, ProjectStatusChange> modifiedNotFinalInspectionMap = projectStatusChangeService.listLastEventMap(projectCodes,
ProjectStateChangeEvent.SUBMIT_PURCHASE_ORG_CONFIRM);
if (CollUtil.isNotEmpty(modifiedNotFinalInspectionMap)) {
projectStatusChangeMap.putAll(modifiedNotFinalInspectionMap);
}
}
}
break;
@@ -308,8 +314,8 @@ public class DelayWarningTest extends AppTests {
if (!projectStatus.eq(project.getStatus())) {
checkCommited(delay, flowTypeEnum, projectCode);
// 其它几种 都没有 说明已经正常了
if (!delay.getProcessWarning() &&
!delay.getDeclaredWarning()) {
if (Boolean.FALSE.equals(delay.getProcessWarning()) &&
Boolean.FALSE.equals(delay.getDeclaredWarning())) {
delay.setNormal(Boolean.TRUE);
delay.setStatus(ProjectEarlyWarningStatusEnum.NORMAL.name());
}
@@ -346,8 +352,8 @@ public class DelayWarningTest extends AppTests {
if (!projectStatus.eq(project.getStatus())) {
checkCommited(declaredWarning, flowTypeEnum, projectCode);
// 其它几种 都没有 说明已经正常了
if (!declaredWarning.getProcessWarning() &&
!declaredWarning.getDelayWarning()) {
if (Boolean.FALSE.equals(declaredWarning.getProcessWarning()) &&
Boolean.FALSE.equals(declaredWarning.getDelayWarning())) {
declaredWarning.setNormal(Boolean.TRUE);
declaredWarning.setStatus(ProjectEarlyWarningStatusEnum.NORMAL.name());
}
@@ -424,8 +430,8 @@ public class DelayWarningTest extends AppTests {
//说明 已经审批通过了
processWarning.setProcessWarning(Boolean.FALSE);
//其它三种 都没有 说明已经正常了
if (!processWarning.getDeclaredWarning() &&
!processWarning.getDelayWarning()) {
if (Boolean.FALSE.equals(processWarning.getDeclaredWarning()) &&
Boolean.FALSE.equals(processWarning.getDelayWarning())) {
processWarning.setNormal(Boolean.TRUE);
processWarning.setStatus(ProjectEarlyWarningStatusEnum.NORMAL.name());
}


+ 9
- 3
hz-pm-api/src/test/resources/application-dev.yml Parādīt failu

@@ -217,11 +217,17 @@ mh-system-replace-sync:

thread-pool-util:
request:
core-pool-size: 5
max-pool-size: 10
core-pool-size: 2
max-pool-size: 4
queue-capacity: 100
keep-alive-seconds: 120
thread-name-prefix: request-executor-
scheduler:
core-pool-size: 2
thread-name-prefix: scheduler-executor-
thread-name-prefix: scheduler-executor-
random-invite:
thread-pool-properties:
core-pool-size: 2
thread-name-prefix: expert-invite-executor-
early-warning-without-submit:
open: true

Notiek ielāde…
Atcelt
Saglabāt