|
|
@@ -130,8 +130,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; |
|
|
@@ -218,7 +218,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) |
|
|
@@ -247,14 +247,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; |
|
|
|
} |
|
|
|
} |
|
|
|