Browse Source

语音广播恢复操作不存记录

develop
Mr.Wang 5 months ago
parent
commit
9167224d58
  1. 15
      zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

15
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(); JSONObject errorResult = new JSONObject();
errorResult.put("device", device.getId()); errorResult.put("device", device.getId());
errorResult.put("content", "未匹配到对应的模板内容"); errorResult.put("content", "未匹配到对应的模板内容");
errorResult.put("deviceName", device.getDeviceName());
resultArray.add(errorResult); resultArray.add(errorResult);
status = 1; status = 1;
remark.append("失败"); remark.append("失败");
@ -1113,15 +1114,16 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
processingDeviceParameters(functionId, functionList, props); processingDeviceParameters(functionId, functionList, props);
AjaxResult ajaxResult11 = dcDeviceController.getAjaxResult(iotDeviceId, functionId, 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)) { if (ajaxResult11.get("code").equals(200)) {
// 2:执行13功能码 // 2:执行13功能码
HashMap<String, Object> props11 = new HashMap<>(); HashMap<String, Object> props11 = new HashMap<>();
functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_13; functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_13;
List<Map<String, String>> list = new ArrayList<>(); List<Map<String, String>> list = new ArrayList<>();
Map<String, String> parameters = new HashMap<>(); Map<String, String> parameters = new HashMap<>();
DcInfoBoardTemplate dcInfoBoardTemplate = JSON.parseObject(
JSON.toJSONString(otherConfig.get("dcInfoBoardTemplate")),
DcInfoBoardTemplate.class);
// stopTime // stopTime
parameters.put("STAY", dcInfoBoardTemplate.getStopTime()); parameters.put("STAY", dcInfoBoardTemplate.getStopTime());
// inScreenMode // inScreenMode
@ -1173,7 +1175,12 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
} }
resultArray.add(result); resultArray.add(result);
} else { } 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; status = 1;
} }
return status; return status;

Loading…
Cancel
Save