From 01caaf27c85dc4243a83ba3cae25817fd9296708 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 31 Oct 2023 15:23:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task/EarlyWarningInstanceNotStartTask.java | 2 +- .../pmapi/sys/manage/EarlyWarningManage.java | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java index d9a53ab..10c64d6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java @@ -394,7 +394,7 @@ public class EarlyWarningInstanceNotStartTask { //需要发通知的项目 List needToWaringProjects = needNextProjects.stream() .filter(p -> { - //初验 + //超时未审批 if(Duration.between(p.getCreateOn(),LocalDateTime.now()).toMinutes() >= time * 60 && //time * 60 Duration.between(p.getCreateOn(),LocalDateTime.now()).toMinutes() <= time * 60 + 1){ //time * 60 return Boolean.TRUE; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/EarlyWarningManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/EarlyWarningManage.java index 0603be4..3b385bd 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/EarlyWarningManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/EarlyWarningManage.java @@ -78,6 +78,10 @@ public class EarlyWarningManage { WarningOperationTypeEnum.getByCode(biz),timeout); records.setRuleType(WarningRuleTypeEnum.OPERATION_WARNING.getCode()); break; + case RENEWAL_FUND: + content = convertContent(noticeContent,project.getProjectName(),timeout); + records.setRuleType(WarningRuleTypeEnum.RENEWAL_FUND.getCode()); + break; default: log.info("匹配不到 规则类型"); return; @@ -124,6 +128,20 @@ public class EarlyWarningManage { } /** + * 续建项目资金 + * @param noticeContent + * @param projectName + * @param timeout + * @return + */ + private String convertContent(String noticeContent, String projectName, Integer timeout) { + noticeContent = noticeContent.replace("{projectName}",projectName) + .replace("{time}",String.valueOf(timeout)); + log.info("通知内容 :{}",noticeContent); + return noticeContent; + } + + /** * 转换出 通知的内容 * @param noticeContent * @param projectName