From 4bfca46ddf162e4900c3205ad165372a2f9ae9e2 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 9 Aug 2023 14:26:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=AD=A6=20=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E6=94=B9=E6=88=90=E5=B0=8F=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scheduler/task/EarlyWarningInstanceNotStartTask.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java index e203461..120632a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningInstanceNotStartTask.java @@ -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; } }