REM:
1. 修改创建任务的接口,当设备Id为-1,相同用户,相同处置IP的且正在执行的处置任务,如果存在则忽略该次任务。
This commit is contained in:
chenlinghy 2020-07-08 17:58:23 +08:00
parent a06e348088
commit fd87b1fc0d
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ public class TaskServiceImpl implements TaskService {
// 查询当前是否有相同能力节点相同用户相同处置IP的且正在执行的处置任务如果存在则忽略该次任务依照产品需求
List<TaskInfoDetail> taskList = taskCacheManager.getAllRunningTask()
.stream()
.filter(v -> ((taskId == null || taskId == -1L) || Objects.equals(v.getDeviceId(), task.getDeviceId()))
.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())