From bc2280e4f4d8900b40f577df695d05ae76b84398 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Fri, 6 Sep 2024 09:01:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=91=84=E5=83=8F=E5=A4=B4?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/controller/VideoController.java | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/VideoController.java b/zc-business/src/main/java/com/zc/business/controller/VideoController.java index 48afce12..e2913ded 100644 --- a/zc-business/src/main/java/com/zc/business/controller/VideoController.java +++ b/zc-business/src/main/java/com/zc/business/controller/VideoController.java @@ -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 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); //更新中间库的设备状态