|
|
@ -262,6 +262,9 @@ public class VideoController extends BaseController { |
|
|
|
}); |
|
|
|
JSONObject arrayJSONObject = array.getJSONObject(1);//扩建
|
|
|
|
JSONArray jiHeYunGuanG35 = arrayJSONObject.getJSONArray("children"); |
|
|
|
for (int i = 0; i < objects.size(); i++) { |
|
|
|
jiHeYunGuanG35.add(objects.get(i)); |
|
|
|
} |
|
|
|
List<DcDevice> list = new ArrayList<>(); |
|
|
|
for (Object json : jiHeYunGuanG35) { |
|
|
|
JSONObject item = JSONObject.parseObject(json.toString()); |
|
|
@ -274,17 +277,17 @@ public class VideoController extends BaseController { |
|
|
|
device.setIotDeviceId(item.get("camId").toString()); |
|
|
|
list.add(device); |
|
|
|
} |
|
|
|
for (Object json : objects) { |
|
|
|
JSONObject item = JSONObject.parseObject(json.toString()); |
|
|
|
DcDevice device = new DcDevice(); |
|
|
|
if (item.get("status").equals(UniversalEnum.ZERO.getValue())) { |
|
|
|
device.setDeviceState(UniversalEnum.ONE.getValue()); |
|
|
|
} else { |
|
|
|
device.setDeviceState(UniversalEnum.ZERO.getValue()); |
|
|
|
} |
|
|
|
device.setIotDeviceId(item.get("camId").toString()); |
|
|
|
list.add(device); |
|
|
|
} |
|
|
|
// for (Object json : objects) {
|
|
|
|
// JSONObject item = JSONObject.parseObject(json.toString());
|
|
|
|
// DcDevice device = new DcDevice();
|
|
|
|
// if (item.get("status").equals(UniversalEnum.ZERO.getValue())) {
|
|
|
|
// device.setDeviceState(UniversalEnum.ONE.getValue());
|
|
|
|
// } else {
|
|
|
|
// device.setDeviceState(UniversalEnum.ZERO.getValue());
|
|
|
|
// }
|
|
|
|
// device.setIotDeviceId(item.get("camId").toString());
|
|
|
|
// list.add(device);
|
|
|
|
// }
|
|
|
|
iDcDeviceService.batchUpdate(list); |
|
|
|
|
|
|
|
//更新中间库的设备状态
|
|
|
|