Browse Source

实施信息

master
PoffyZhang 1 year ago
parent
commit
f2fb4b091c
1 changed files with 7 additions and 7 deletions
  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 View File

@@ -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.TRUE;
} }
return Boolean.FALSE; return Boolean.FALSE;
@@ -217,7 +217,7 @@ public class EarlyWarningInstanceNotStartTask {
.eq(Project::getAreaCode, areaCode) .eq(Project::getAreaCode, areaCode)
.eq(Project::getNewest, Boolean.TRUE) .eq(Project::getNewest, Boolean.TRUE)
.eq(Project::getStatus,projectStutas)); .eq(Project::getStatus,projectStutas));
log.info("needNextProjects :{}",needNextProjects.size());
List<String> projectCodes = needNextProjects.stream().map(Project::getProjectCode).collect(Collectors.toList()); List<String> projectCodes = needNextProjects.stream().map(Project::getProjectCode).collect(Collectors.toList());


List<Operation> operations = operationService.list(Wrappers.lambdaQuery(Operation.class) List<Operation> operations = operationService.list(Wrappers.lambdaQuery(Operation.class)
@@ -246,14 +246,14 @@ public class EarlyWarningInstanceNotStartTask {
Operation operation = operationMap.get(p.getProjectCode()); Operation operation = operationMap.get(p.getProjectCode());
if(WarningOperationTypeEnum.CHUYAN.getCode().equals(biz)){ 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; return Boolean.TRUE;
} }
}else if(WarningOperationTypeEnum.ZHONGYAN.getCode().equals(biz)){ }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; return Boolean.TRUE;
} }
} }


Loading…
Cancel
Save