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); } }