fix: 设备监控
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
// 添加图片名字
|
||||
|
||||
Reference in New Issue
Block a user