From 6fa593cfe9e4f578cc06966535bdb399a1579a88 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Sat, 31 Aug 2024 18:12:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=9E=E5=90=8E=E9=A2=84=E8=AD=A6=E8=A7=84?= =?UTF-8?q?=E5=88=99=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/enumeration/WarningFlowTypeEnum.java | 2 +- .../com/hz/pm/api/warning/DelayWarningTest.java | 48 ++++++++++++---------- hz-pm-api/src/test/resources/application-dev.yml | 12 ++++-- 3 files changed, 37 insertions(+), 25 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java index 6d47537..d0bb3d1 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java @@ -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; diff --git a/hz-pm-api/src/test/java/com/hz/pm/api/warning/DelayWarningTest.java b/hz-pm-api/src/test/java/com/hz/pm/api/warning/DelayWarningTest.java index 2a168bd..c362d6b 100644 --- a/hz-pm-api/src/test/java/com/hz/pm/api/warning/DelayWarningTest.java +++ b/hz-pm-api/src/test/java/com/hz/pm/api/warning/DelayWarningTest.java @@ -138,31 +138,37 @@ public class DelayWarningTest extends AppTests { switch (flowType) { // 已立项未采购 获取 立项时间 case APPROVED_PROJECT_NOT_PURCHASED:{ - Map 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 approvedProjectNotPurchasedMap = projectStatusChangeService.listLastEventMap(projectCodes, + ProjectStateChangeEvent.DECLARED_RECORD_PASS); + if (CollUtil.isNotEmpty(approvedProjectNotPurchasedMap)) { + projectStatusChangeMap.putAll(approvedProjectNotPurchasedMap); + } } } break; // 已采购未改造完成 获取合同签订时间 case PURCHASED_UNMODIFIED:{ - Map 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 purchasedUnmodifiedMap = projectStatusChangeService.listLastEventMap(projectCodes, + ProjectStateChangeEvent.SUBMIT_PURCHASE_CONTRACT_RECORD); + if (CollUtil.isNotEmpty(purchasedUnmodifiedMap)) { + projectStatusChangeMap.putAll(purchasedUnmodifiedMap); + } } } break; // 已改造完成未终验 获取单位确认时间 case MODIFIED_NOT_FINAL_INSPECTION:{ - Map 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 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()); } diff --git a/hz-pm-api/src/test/resources/application-dev.yml b/hz-pm-api/src/test/resources/application-dev.yml index b9d5c9e..5cf45e1 100644 --- a/hz-pm-api/src/test/resources/application-dev.yml +++ b/hz-pm-api/src/test/resources/application-dev.yml @@ -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- \ No newline at end of file + 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 \ No newline at end of file