Explorar el Código

预警通知

tags/24080901
PoffyZhang hace 1 año
padre
commit
01caaf27c8
Se han modificado 2 ficheros con 19 adiciones y 1 borrados
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java
  2. +18
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/EarlyWarningManage.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java Ver fichero

@@ -394,7 +394,7 @@ public class EarlyWarningInstanceNotStartTask {
//需要发通知的项目
List<ProjectRenewalFundDeclaration> 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;


+ 18
- 0
pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/EarlyWarningManage.java Ver fichero

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


Cargando…
Cancelar
Guardar