统一任务执行中的状态
This commit is contained in:
parent
20e29e5b02
commit
6c8f67be1c
|
@ -9,7 +9,7 @@ public enum TaskStatusName implements EnumerationBase {
|
|||
|
||||
TASK_TIMEOUT(2, "TASK_TIMEOUT"),
|
||||
|
||||
TASK_UNRESPONSE(3, "TASK_UNRESPONSE"),
|
||||
//TASK_UNRESPONSE(3, "TASK_UNRESPONSE"),
|
||||
|
||||
TASK_EXECUTING(4, "TASK_EXECUTING")
|
||||
;
|
||||
|
|
|
@ -139,12 +139,14 @@ public class AlarmTaskServiceImpl implements AlarmTaskService {
|
|||
.recodeTime(s.getSendTime())
|
||||
.build())
|
||||
.toList();
|
||||
//聚合控制通道
|
||||
List<AlarmDeviceTaskDO> deviceTaskList = getAggregatedAlarmDeviceTaskDOS(
|
||||
alarmTaskDOList.stream()
|
||||
.map(AlarmTaskListRespDTO.AlarmTaskRespDTO::getTaskIdStr)
|
||||
.distinct()
|
||||
.toList()
|
||||
);
|
||||
|
||||
Map<Long, List<AlarmDeviceTaskDO>> deviceTaskMap = deviceTaskList.stream().collect(Collectors.groupingBy(AlarmDeviceTaskDO::getTaskId));
|
||||
for (AlarmTaskListRespDTO.AlarmTaskRespDTO task : alarmTaskDOList) {
|
||||
Long taskId = task.getId();
|
||||
|
|
|
@ -66,7 +66,7 @@ public class SensorTaskServiceImpl implements SensorTaskService {
|
|||
|
||||
|
||||
TaskStatusName respStatus = System.currentTimeMillis() > timeOut ? TaskStatusName.TASK_TIMEOUT :
|
||||
TaskStatusName.TASK_UNRESPONSE;
|
||||
TaskStatusName.TASK_EXECUTING;
|
||||
|
||||
List<SensorTask> allTask = sensorTaskMapper.selectAllByTaskId(taskId);
|
||||
List<SensorTask> successedTask =
|
||||
|
|
Loading…
Reference in New Issue