|
|
@ -265,7 +265,6 @@ public class BigScreenServiceImpl implements BigScreenService { |
|
|
|
JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res; |
|
|
|
for (int i = 0; i < data.size(); i++) { |
|
|
|
JSONObject jsonObject = data.getJSONObject(i); |
|
|
|
jsonObject.put("device_status", DeviceStatusEnum.STANDBY.getCode()); |
|
|
|
String openTime = jsonObject.getString("open_time"); |
|
|
|
jsonObject.put("open_time", openTime.substring(openTime.indexOf('-') + 1)); |
|
|
|
} |
|
|
@ -384,6 +383,10 @@ public class BigScreenServiceImpl implements BigScreenService { |
|
|
|
JSONObject devicesStatus = PointUpdateUtil.getDevicesStatus(res); |
|
|
|
// JSONObject devicesStatus = null;
|
|
|
|
JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res; |
|
|
|
for (int i = 0; i < data.size(); i++) { |
|
|
|
JSONObject object = data.getJSONObject(i); |
|
|
|
object.put("color_status", ColorEnum.getColorEnumByIndex(object.getInteger("status"))); |
|
|
|
} |
|
|
|
return data; |
|
|
|
}, pool); |
|
|
|
manipulatorInfoTask.thenAccept(result -> { |
|
|
@ -820,8 +823,8 @@ public class BigScreenServiceImpl implements BigScreenService { |
|
|
|
JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res; |
|
|
|
for (int i = 0; i < data.size(); i++) { |
|
|
|
JSONObject device = data.getJSONObject(i); |
|
|
|
Integer devicesStatus1 = ObjectUtil.isNotEmpty(device.getInteger("devices_status")) |
|
|
|
? device.getInteger("devices_status") |
|
|
|
Integer devicesStatus1 = ObjectUtil.isNotEmpty(device.getInteger("status")) |
|
|
|
? device.getInteger("status") |
|
|
|
: 0; |
|
|
|
DeviceStatusEnum deviceStatusEnumByCode = DeviceStatusEnum.getDeviceStatusEnumByCode(devicesStatus1); |
|
|
|
device.put("device_status_name", deviceStatusEnumByCode.getDescription()); |
|
|
@ -946,8 +949,8 @@ public class BigScreenServiceImpl implements BigScreenService { |
|
|
|
JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res; |
|
|
|
for (int i = 0; i < data.size(); i++) { |
|
|
|
JSONObject device = data.getJSONObject(i); |
|
|
|
Integer devicesStatus1 = ObjectUtil.isNotEmpty(device.getInteger("devices_status")) |
|
|
|
? device.getInteger("devices_status") |
|
|
|
Integer devicesStatus1 = ObjectUtil.isNotEmpty(device.getInteger("status")) |
|
|
|
? device.getInteger("status") |
|
|
|
: 0; |
|
|
|
DeviceStatusEnum deviceStatusEnumByCode = DeviceStatusEnum.getDeviceStatusEnumByCode(devicesStatus1); |
|
|
|
device.put("device_status_name", deviceStatusEnumByCode.getDescription()); |
|
|
@ -986,8 +989,8 @@ public class BigScreenServiceImpl implements BigScreenService { |
|
|
|
JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res; |
|
|
|
for (int i = 0; i < data.size(); i++) { |
|
|
|
JSONObject device = data.getJSONObject(i); |
|
|
|
Integer devicesStatus1 = ObjectUtil.isNotEmpty(device.getInteger("devices_status")) |
|
|
|
? device.getInteger("devices_status") |
|
|
|
Integer devicesStatus1 = ObjectUtil.isNotEmpty(device.getInteger("status")) |
|
|
|
? device.getInteger("status") |
|
|
|
: 0; |
|
|
|
DeviceStatusEnum deviceStatusEnumByCode = DeviceStatusEnum.getDeviceStatusEnumByCode(devicesStatus1); |
|
|
|
device.put("device_status_name", deviceStatusEnumByCode.getDescription()); |
|
|
@ -1276,8 +1279,8 @@ public class BigScreenServiceImpl implements BigScreenService { |
|
|
|
JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res; |
|
|
|
for (int i = 0; i < data.size(); i++) { |
|
|
|
JSONObject device = data.getJSONObject(i); |
|
|
|
Integer devicesStatus1 = ObjectUtil.isNotEmpty(device.getInteger("devices_status")) |
|
|
|
? device.getInteger("devices_status") |
|
|
|
Integer devicesStatus1 = ObjectUtil.isNotEmpty(device.getInteger("status")) |
|
|
|
? device.getInteger("status") |
|
|
|
: 0; |
|
|
|
DeviceStatusEnum deviceStatusEnumByCode = DeviceStatusEnum.getDeviceStatusEnumByCode(devicesStatus1); |
|
|
|
device.put("device_status_name", deviceStatusEnumByCode.getDescription()); |
|
|
|