Browse Source

fix: 设备监控

master
李永德 2 years ago
parent
commit
3881bc289f
  1. 6
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/dto/DeviceInfoDto.java
  2. 2
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java

6
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;
}

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

Loading…
Cancel
Save