From 99ede1778ee31d9c793bcd57da77e440d8a7cfc2 Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Wed, 22 May 2024 17:12:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=8B=E4=BB=B6=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E6=8E=A5=E5=8F=A3=E4=B8=AD=E7=9A=84=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DcEmergencyPlansServiceImpl.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java index 8fb9bc13..8bca9564 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java @@ -907,11 +907,11 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { termList.add(JSON.parseObject(device.getOtherConfig())); params.put("termList", termList); - JSONObject returnResult = broadcastController.nearCamListDistance(params); JSONObject result = new JSONObject(); result.put("device", device.getId()); result.put("deviceName",device.getDeviceName()); result.put("content",params.get("text")); + JSONObject returnResult = broadcastController.nearCamListDistance(params); result.put("result", returnResult); resultArray.add(result); @@ -1010,25 +1010,21 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { props11.put("parameters", list); AjaxResult ajaxResult13 = dcDeviceController.invokedFunction(iotDeviceId, functionId, props11); JSONObject result = new JSONObject(); + result.put("device", device.getId()); + result.put("deviceName",device.getDeviceName()); if (ajaxResult13.get("code").equals(200)) { HashMap props1B = new HashMap<>(); // 3: 执行1B功能码 functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_1B; props1B.put("fileId", "11"); AjaxResult ajaxResult1B = dcDeviceController.invokedFunction(iotDeviceId, functionId, props1B); - result.put("device", device.getId()); - result.put("deviceName",device.getDeviceName()); result.put("content",dcInfoBoardTemplate.getContent()); result.put("result", ajaxResult1B); - resultArray.add(result); - } else { - result.put("device", device.getId()); - result.put("deviceName",device.getDeviceName()); result.put("content","发布失败"); result.put("result", ajaxResult13); - resultArray.add(result); } + resultArray.add(result); } }