From 76f418b47f8d2daba7b235e7b167ba6dd900ac04 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Wed, 6 Mar 2024 09:43:15 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E8=A7=A3=E5=86=B3=E6=97=A5=E5=B8=B8?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E4=BB=BB=E5=8A=A1=E5=88=A0=E9=99=A4=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E8=B5=8B=E5=80=BC=E4=BB=BB=E5=8A=A1=E9=80=BE=E6=9C=9F?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../maintenance/scheduled/MaintenanceTaskRemindHandler.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java index 4ae4917..caf12ae 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java @@ -16,10 +16,7 @@ import com.xxl.job.core.log.XxlJobLogger; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.BeanUtil; -import org.springblade.core.tool.utils.CollectionUtil; -import org.springblade.core.tool.utils.DateUtil; -import org.springblade.core.tool.utils.StringUtil; +import org.springblade.core.tool.utils.*; import org.springblade.system.feign.ISysClient; import org.springblade.system.user.entity.User; import org.springblade.system.user.feign.IUserClient; @@ -52,7 +49,7 @@ public class MaintenanceTaskRemindHandler { if(CollectionUtil.isNotEmpty(taskEntitySet)) { taskEntitySet.forEach(operMaintenanceTaskEntity -> { OperMaintenanceTaskEntity taskEntity = taskService.getById(operMaintenanceTaskEntity.getId()); - if(StringUtil.isBlank(taskEntity.getFlowTaskName())) { + if(ObjectUtil.isNotEmpty(taskEntity) || StringUtil.isBlank(taskEntity.getFlowTaskName())) { redisTemplate.opsForZSet().remove(RedisKeyConstants.REMIND_TASK_END_LIST,operMaintenanceTaskEntity); } //如果任务仍在待执行则自动结束