fix: monitor

This commit is contained in:
yanps
2023-12-07 11:13:12 +08:00
parent f6a6957753
commit c6699730f6
3 changed files with 5 additions and 3 deletions

View File

@@ -10,8 +10,8 @@ import com.alibaba.fastjson.JSONObject;
public interface DeviceStageMonitor {
/**
* 根据设备获取设备状态(中文名:如故障、联机等)
*
* @return
* @throws Exception
*/
public JSONObject getDeviceStatusName() throws Exception;

View File

@@ -8,11 +8,12 @@ import com.alibaba.fastjson.JSONArray;
* @Date: 2022-08-17
*/
public interface DeviceStageMonitorService {
/**
* 取设备舞台监控数据
*
* @param jsonArray 前端传来设备编号和节点的id
* @return
* @throws Exception
*/
public JSONArray getData(JSONArray jsonArray) throws Exception;
}

View File

@@ -50,7 +50,8 @@ public class DeviceStageMonitorServiceImpl implements DeviceStageMonitorService
obj.put("data", json);
obj.put("device_name", json.get("device_name"));
obj.put("device_code", js.get("device_code"));
obj.put("id", js.getString("id")); // 设备不存在就只保留id方便前端查看
// 设备不存在就只保留id方便前端查看
obj.put("id", js.getString("id"));
arr.add(obj);
}