diff --git a/src/main/java/com/dispose/service/impl/TaskServiceImpl.java b/src/main/java/com/dispose/service/impl/TaskServiceImpl.java index 0d88b794..a95b501a 100644 --- a/src/main/java/com/dispose/service/impl/TaskServiceImpl.java +++ b/src/main/java/com/dispose/service/impl/TaskServiceImpl.java @@ -127,7 +127,7 @@ public class TaskServiceImpl implements TaskService { // 查询当前是否有相同能力节点,相同用户,相同处置IP的且正在执行的处置任务,如果存在则忽略该次任务(依照产品需求) List taskList = taskCacheManager.getAllRunningTask() .stream() - .filter(v -> ((taskId == null || taskId == -1L) || Objects.equals(v.getDeviceId(), task.getDeviceId()) || (task.getDeviceId() == -1L)) + .filter(v -> ((taskId == null || taskId == -1L) || Objects.equals(v.getDeviceId(), task.getDeviceId()) || (v.getDeviceId() == -1L)) && Objects.equals(v.getAccountId(), task.getAccountId()) && taskIsRunning(v) && Objects.equals(v.getType(), task.getType())