|
@ -43,6 +43,11 @@ public class AutoCreateInst { |
|
|
RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class); |
|
|
RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class); |
|
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); |
|
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); |
|
|
List<TaskDto> list = taskserver.queryAllFromCacheByStatus("0"); |
|
|
List<TaskDto> list = taskserver.queryAllFromCacheByStatus("0"); |
|
|
|
|
|
// System.out.println("进来了....我点击了");
|
|
|
|
|
|
// for (TaskDto taskDto : list2) {
|
|
|
|
|
|
// System.out.println("我点击了 任务号:" + taskDto.getTask_code());
|
|
|
|
|
|
// }
|
|
|
|
|
|
// System.out.println("进来了....我点击了");
|
|
|
Map<String, List<TaskDto>> collect = list.stream().sorted(Comparator.comparing(TaskDto::getCreate_time).thenComparing(TaskDto::getTask_code)) |
|
|
Map<String, List<TaskDto>> collect = list.stream().sorted(Comparator.comparing(TaskDto::getCreate_time).thenComparing(TaskDto::getTask_code)) |
|
|
.collect(Collectors.groupingBy(TaskDto::getPriority)); |
|
|
.collect(Collectors.groupingBy(TaskDto::getPriority)); |
|
|
TreeMap<String, List<TaskDto>> treeMap = new TreeMap<>(new Comparator<String>() { |
|
|
TreeMap<String, List<TaskDto>> treeMap = new TreeMap<>(new Comparator<String>() { |
|
@ -102,9 +107,16 @@ public class AutoCreateInst { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
Boolean flag2 = false; |
|
|
Boolean flag2 = false; |
|
|
|
|
|
|
|
|
|
|
|
// if ("3-7".equals(nextDevice.getDevice_code())) {
|
|
|
|
|
|
// Thread.sleep(60000);
|
|
|
|
|
|
// }
|
|
|
List<TaskDto> list2 = taskserver.queryAllFromCacheByStatus("1"); |
|
|
List<TaskDto> list2 = taskserver.queryAllFromCacheByStatus("1"); |
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(list2)) { |
|
|
if (CollUtil.isNotEmpty(list2)) { |
|
|
|
|
|
System.out.println("size:" + list2.size()); |
|
|
for (TaskDto taskDto : list2) { |
|
|
for (TaskDto taskDto : list2) { |
|
|
|
|
|
System.out.println(taskDto.getNext_device_code()); |
|
|
if (taskDto.getTask_type().equals(acsTask.getTask_type())) { |
|
|
if (taskDto.getTask_type().equals(acsTask.getTask_type())) { |
|
|
if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
if (startDevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) startDevice.getDeviceDriver(); |
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) startDevice.getDeviceDriver(); |
|
@ -268,6 +280,8 @@ public class AutoCreateInst { |
|
|
acsTask.setTask_status("1"); |
|
|
acsTask.setTask_status("1"); |
|
|
acsTask.setRemark(""); |
|
|
acsTask.setRemark(""); |
|
|
taskserver.update(acsTask); |
|
|
taskserver.update(acsTask); |
|
|
|
|
|
list2.add(acsTask); |
|
|
|
|
|
// System.out.println("我点击了....往list2中添加任务号为:" + acsTask.getTask_code());
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |