Kaynağa Gözat

实施信息

master
PoffyZhang 1 yıl önce
ebeveyn
işleme
f2fb4b091c
1 değiştirilmiş dosya ile 7 ekleme ve 7 silme
  1. +7
    -7
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java

+ 7
- 7
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java Dosyayı Görüntüle

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

if(Duration.between(LocalDateTime.now(),p.getUpdateOn()).toMinutes() >= time && //time * 60
Duration.between(LocalDateTime.now(),p.getUpdateOn()).toMinutes() <= time + 1){ //time * 60
if(Duration.between(LocalDateTime.now(),p.getUpdateOn()).getSeconds() >= time * 60 && //time * 60
Duration.between(LocalDateTime.now(),p.getUpdateOn()).getSeconds() <= time * 60 + 119){ //time * 60
return Boolean.TRUE;
}
return Boolean.FALSE;
@@ -217,7 +217,7 @@ public class EarlyWarningInstanceNotStartTask {
.eq(Project::getAreaCode, areaCode)
.eq(Project::getNewest, Boolean.TRUE)
.eq(Project::getStatus,projectStutas));
log.info("needNextProjects :{}",needNextProjects.size());
List<String> projectCodes = needNextProjects.stream().map(Project::getProjectCode).collect(Collectors.toList());

List<Operation> operations = operationService.list(Wrappers.lambdaQuery(Operation.class)
@@ -246,14 +246,14 @@ 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
Duration.between(LocalDateTime.now(),operation.getInitialInspectionDate()).toMinutes() <= time + 1){ //time * 60
if(Duration.between(LocalDateTime.now(),operation.getInitialInspectionDate()).getSeconds() >= time * 60 && //time * 60
Duration.between(LocalDateTime.now(),operation.getInitialInspectionDate()).getSeconds() <= time * 60 + 119){ //time * 60
return Boolean.TRUE;
}
}else if(WarningOperationTypeEnum.ZHONGYAN.getCode().equals(biz)){
//终验
if(Duration.between(LocalDateTime.now(),operation.getFinalInspectionDate()).toMinutes() >= time && //time * 60
Duration.between(LocalDateTime.now(),operation.getFinalInspectionDate()).toMinutes() <= time + 1){ //time * 60
if(Duration.between(LocalDateTime.now(),operation.getFinalInspectionDate()).getSeconds() >= time * 60 && //time * 60
Duration.between(LocalDateTime.now(),operation.getFinalInspectionDate()).getSeconds() <= time * 60 + 119){ //time * 60
return Boolean.TRUE;
}
}


Yükleniyor…
İptal
Kaydet