Browse Source

预警 任务 改成小时

tags/24080901
PoffyZhang 1 year ago
parent
commit
4bfca46ddf
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java

+ 6
- 6
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java View File

@@ -132,8 +132,8 @@ public class EarlyWarningInstanceNotStartTask {
log.info("projectId :{}",p.getId());
log.info("秒数差 :{}",Duration.between(p.getUpdateOn(),LocalDateTime.now()).getSeconds());

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


Loading…
Cancel
Save