Browse Source

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

master
PoffyZhang 1 year ago
parent
commit
1f00ddb928
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

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


Loading…
Cancel
Save