|
@ -470,6 +470,26 @@ public class BigScreenServiceImpl implements BigScreenService { |
|
|
map.put("IoKilnTrussTask", null); |
|
|
map.put("IoKilnTrussTask", null); |
|
|
return null; |
|
|
return null; |
|
|
}); |
|
|
}); |
|
|
|
|
|
// 19、AGV数据
|
|
|
|
|
|
CompletableFuture<JSONObject> AGVStatusTask = CompletableFuture.supplyAsync(() -> { |
|
|
|
|
|
JSONObject result = new JSONObject(); |
|
|
|
|
|
JSONArray res = new JSONArray(); |
|
|
|
|
|
JSONObject devicesStatus = PointUpdateUtil.getDevicesStatus(res); |
|
|
|
|
|
// JSONObject devicesStatus = null;
|
|
|
|
|
|
JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res; |
|
|
|
|
|
for (int i = 0; i < data.size(); i++) { |
|
|
|
|
|
JSONObject object = data.getJSONObject(i); |
|
|
|
|
|
result.put(object.getString("device_code"), object); |
|
|
|
|
|
} |
|
|
|
|
|
return result; |
|
|
|
|
|
}, pool); |
|
|
|
|
|
AGVStatusTask.thenAccept(result -> { |
|
|
|
|
|
map.put("AGVStatusList", result); |
|
|
|
|
|
}).exceptionally((e) -> { |
|
|
|
|
|
log.error("AGV数据: {}", e.getMessage(), e); |
|
|
|
|
|
map.put("AGVStatusList", e); |
|
|
|
|
|
return null; |
|
|
|
|
|
}); |
|
|
CompletableFuture<Void> allQuery = CompletableFuture.allOf( |
|
|
CompletableFuture<Void> allQuery = CompletableFuture.allOf( |
|
|
mixDayProductionTask, |
|
|
mixDayProductionTask, |
|
|
pressDayProductionTask, |
|
|
pressDayProductionTask, |
|
@ -486,7 +506,8 @@ public class BigScreenServiceImpl implements BigScreenService { |
|
|
manipulatorInfoTask, |
|
|
manipulatorInfoTask, |
|
|
kilneye4InfoTask, |
|
|
kilneye4InfoTask, |
|
|
KilnPassage2InfoTask, |
|
|
KilnPassage2InfoTask, |
|
|
ioKilnTrussTask); |
|
|
ioKilnTrussTask, |
|
|
|
|
|
AGVStatusTask); |
|
|
CompletableFuture<ConcurrentHashMap<String, Object>> future |
|
|
CompletableFuture<ConcurrentHashMap<String, Object>> future |
|
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> { |
|
|
= allQuery.thenApply((result) -> map).exceptionally((e) -> { |
|
|
log.error(e.getMessage(), e); |
|
|
log.error(e.getMessage(), e); |
|
|