diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java index 3cbb3b3..507d8ef 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java @@ -470,6 +470,26 @@ public class BigScreenServiceImpl implements BigScreenService { map.put("IoKilnTrussTask", null); return null; }); + // 19、AGV数据 + CompletableFuture 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 allQuery = CompletableFuture.allOf( mixDayProductionTask, pressDayProductionTask, @@ -486,7 +506,8 @@ public class BigScreenServiceImpl implements BigScreenService { manipulatorInfoTask, kilneye4InfoTask, KilnPassage2InfoTask, - ioKilnTrussTask); + ioKilnTrussTask, + AGVStatusTask); CompletableFuture> future = allQuery.thenApply((result) -> map).exceptionally((e) -> { log.error(e.getMessage(), e);