|
@ -212,16 +212,13 @@ public class CockpitServiceImpl implements CockpitService{ |
|
|
.addParam("flag", "3") |
|
|
.addParam("flag", "3") |
|
|
.process() |
|
|
.process() |
|
|
.getResultJSONArray(0); |
|
|
.getResultJSONArray(0); |
|
|
// JSONObject devicesStatus = PointUpdateUtil.getDevicesStatus(result);
|
|
|
JSONObject devicesStatus = PointUpdateUtil.getDevicesStatus(result); |
|
|
// if (ObjectUtil.isEmpty(devicesStatus)) {
|
|
|
if (ObjectUtil.isEmpty(devicesStatus)) { |
|
|
// return null;
|
|
|
return null; |
|
|
// }
|
|
|
} |
|
|
// JSONArray data = ObjectUtil.isNotEmpty(
|
|
|
JSONArray data = ObjectUtil.isNotEmpty( |
|
|
// devicesStatus.getJSONArray("data"))?devicesStatus.getJSONArray("data"):null;
|
|
|
devicesStatus.getJSONArray("data"))?devicesStatus.getJSONArray("data"):result; |
|
|
// if (ObjectUtil.isEmpty(data)) {
|
|
|
if(ObjectUtil.isNotEmpty(data)) { |
|
|
// return null;
|
|
|
|
|
|
// }
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(result)) { //todo: result -> data
|
|
|
|
|
|
res = result.toJavaList(DeviceInfoDto.class); |
|
|
res = result.toJavaList(DeviceInfoDto.class); |
|
|
res.forEach(d -> { |
|
|
res.forEach(d -> { |
|
|
DeviceEnum deviceEnum = DeviceEnum.get(d.getDevice_model(), d.getDevice_code()); |
|
|
DeviceEnum deviceEnum = DeviceEnum.get(d.getDevice_model(), d.getDevice_code()); |
|
|