소스 검색

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

tags/24080901
PoffyZhang 1 년 전
부모
커밋
3db7c9de11
2개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  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 파일 보기

@@ -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 파일 보기

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


불러오는 중...
취소
저장