Przeglądaj źródła

Merge branch '20230731_ls2_operation+early_warning+safety_risk+portrait' of http://git.ningdatech.com/liushuai/project-management into dev

master
PoffyZhang 1 rok temu
rodzic
commit
3db7c9de11
2 zmienionych plików z 6 dodań i 5 usunięć
  1. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java
  2. +3
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/EarlyWarningManage.java

+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java Wyświetl plik

@@ -129,7 +129,7 @@ public class EarlyWarningInstanceNotStartTask {
}
}

if(Duration.between(LocalDateTime.now(),p.getUpdateOn()).toMinutes() >= time || //time * 60
if(Duration.between(LocalDateTime.now(),p.getUpdateOn()).toMinutes() >= time && //time * 60
Duration.between(LocalDateTime.now(),p.getUpdateOn()).toMinutes() <= time + 1){ //time * 60
return Boolean.TRUE;
}
@@ -246,13 +246,13 @@ public class EarlyWarningInstanceNotStartTask {
Operation operation = operationMap.get(p.getProjectCode());
if(WarningOperationTypeEnum.CHUYAN.getCode().equals(biz)){
//初验
if(Duration.between(LocalDateTime.now(),operation.getInitialInspectionDate()).toMinutes() >= time || //time * 60
if(Duration.between(LocalDateTime.now(),operation.getInitialInspectionDate()).toMinutes() >= time && //time * 60
Duration.between(LocalDateTime.now(),operation.getInitialInspectionDate()).toMinutes() <= time + 1){ //time * 60
return Boolean.TRUE;
}
}else if(WarningOperationTypeEnum.ZHONGYAN.getCode().equals(biz)){
//终验
if(Duration.between(LocalDateTime.now(),operation.getFinalInspectionDate()).toMinutes() >= time || //time * 60
if(Duration.between(LocalDateTime.now(),operation.getFinalInspectionDate()).toMinutes() >= time && //time * 60
Duration.between(LocalDateTime.now(),operation.getFinalInspectionDate()).toMinutes() <= time + 1){ //time * 60
return Boolean.TRUE;
}


+ 3
- 2
pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/EarlyWarningManage.java Wyświetl plik

@@ -21,9 +21,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Objects;

/**
@@ -131,6 +129,7 @@ public class EarlyWarningManage {
private String convertContent(String noticeContent, String projectName, InstTypeEnum instTypeEnum, Integer timeout) {
noticeContent = noticeContent.replace("{projectName}",projectName)
.replace("{flowType}",Objects.nonNull(instTypeEnum) ? instTypeEnum.getDesc() : "{flowType}")
.replace("{stepName}",Objects.nonNull(instTypeEnum) ? instTypeEnum.getDesc() : "{stepName}")
.replace("{time}",String.valueOf(timeout));
log.info("通知内容 :{}",noticeContent);
return noticeContent;
@@ -139,6 +138,7 @@ public class EarlyWarningManage {
private String convertContent(String noticeContent, String projectName, WarningFlowTypeEnum warningFlowTypeEnum, Integer timeout) {
noticeContent = noticeContent.replace("{projectName}",projectName)
.replace("{flowType}",Objects.nonNull(warningFlowTypeEnum) ? warningFlowTypeEnum.getDesc() : "{flowType}")
.replace("{stepName}",Objects.nonNull(warningFlowTypeEnum) ? warningFlowTypeEnum.getDesc() : "{stepName}")
.replace("{time}",String.valueOf(timeout));
log.info("通知内容 :{}",noticeContent);
return noticeContent;
@@ -147,6 +147,7 @@ public class EarlyWarningManage {
private String convertContent(String noticeContent, String projectName, WarningOperationTypeEnum operationTypeEnum, Integer timeout) {
noticeContent = noticeContent.replace("{projectName}",projectName)
.replace("{flowType}",Objects.nonNull(operationTypeEnum) ? operationTypeEnum.getDesc() : "{flowType}")
.replace("{stepName}",Objects.nonNull(operationTypeEnum) ? operationTypeEnum.getDesc() : "{stepName}")
.replace("{time}",String.valueOf(timeout));
log.info("通知内容 :{}",noticeContent);
return noticeContent;


Ładowanie…
Anuluj
Zapisz