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()); // 添加图片名字