From 3881bc289fb489e5428f86bed4ecfeccf4444d7c Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Wed, 26 Apr 2023 15:51:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=BE=E5=A4=87=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/nl/wms/cockpit/service/dto/DeviceInfoDto.java | 6 +++++- .../org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/dto/DeviceInfoDto.java b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/dto/DeviceInfoDto.java index 6bd33ba..9587061 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/dto/DeviceInfoDto.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/dto/DeviceInfoDto.java @@ -32,7 +32,7 @@ public class DeviceInfoDto implements Serializable { */ private String device_model; /** - * 设备状态枚举: 0关机(停机),1开机(运行),2故障 + * 设备状态枚举: 0关机,1待机,2生产中,3故障 */ private String device_status; /** @@ -72,5 +72,9 @@ public class DeviceInfoDto implements Serializable { /** * 图片名字 */ + private int error; + private String open_time; + private int stand_time; + private int error_time; private String device_url; } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java index ff91806..37f527c 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java @@ -226,7 +226,7 @@ public class CockpitServiceImpl implements CockpitService{ JSONArray data = ObjectUtil.isNotEmpty( devicesStatus.getJSONArray("data"))?devicesStatus.getJSONArray("data"):result; if(ObjectUtil.isNotEmpty(data)) { - res = result.toJavaList(DeviceInfoDto.class); + res = data.toJavaList(DeviceInfoDto.class); res.forEach(d -> { DeviceEnum deviceEnum = DeviceEnum.get(d.getDevice_model(), d.getDevice_code()); // 添加图片名字