From 9167224d58813937b173b0ea7942e0b06311ca1b Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Tue, 25 Jun 2024 18:30:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E5=B9=BF=E6=92=AD=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E6=93=8D=E4=BD=9C=E4=B8=8D=E5=AD=98=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DcEmergencyPlansServiceImpl.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 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 7b7155f8..5ffe038a 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 @@ -957,6 +957,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { JSONObject errorResult = new JSONObject(); errorResult.put("device", device.getId()); errorResult.put("content", "未匹配到对应的模板内容"); + errorResult.put("deviceName", device.getDeviceName()); resultArray.add(errorResult); status = 1; remark.append("失败"); @@ -1113,15 +1114,16 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { processingDeviceParameters(functionId, functionList, props); AjaxResult ajaxResult11 = dcDeviceController.getAjaxResult(iotDeviceId, functionId, props); + DcInfoBoardTemplate dcInfoBoardTemplate = JSON.parseObject( + JSON.toJSONString(otherConfig.get("dcInfoBoardTemplate")), + DcInfoBoardTemplate.class); if (ajaxResult11.get("code").equals(200)) { // 2:执行13功能码 HashMap props11 = new HashMap<>(); functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_13; List> list = new ArrayList<>(); Map parameters = new HashMap<>(); - DcInfoBoardTemplate dcInfoBoardTemplate = JSON.parseObject( - JSON.toJSONString(otherConfig.get("dcInfoBoardTemplate")), - DcInfoBoardTemplate.class); + // stopTime parameters.put("STAY", dcInfoBoardTemplate.getStopTime()); // inScreenMode @@ -1173,7 +1175,12 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { } resultArray.add(result); } else { - resultArray.add(ajaxResult11); + JSONObject error = new JSONObject(); + error.put("result",ajaxResult11); + error.put("deviceName",device.getDeviceName()); + error.put("device",device.getId()); + error.put("content",dcInfoBoardTemplate.getContent()); + resultArray.add(error); status = 1; } return status;