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 e3e878cd..52e79f10 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 @@ -1118,40 +1118,40 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { processingDeviceParameters(functionId, functionList, props); AjaxResult ajaxResult11 = dcDeviceController.getAjaxResult(iotDeviceId, functionId, props); + + // 13功能码执行参数构造 DcInfoBoardTemplate dcInfoBoardTemplate = JSON.parseObject( JSON.toJSONString(otherConfig.get("dcInfoBoardTemplate")), DcInfoBoardTemplate.class); + HashMap props11 = new HashMap<>(); + functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_13; + List> list = new ArrayList<>(); + Map parameters = new HashMap<>(); + // stopTime + parameters.put("STAY", dcInfoBoardTemplate.getStopTime()); + // inScreenMode + parameters.put("ACTION", dcInfoBoardTemplate.getInScreenMode()); + // fontSpacing + parameters.put("SPEED", dcInfoBoardTemplate.getFontSpacing()); + // fontColor + parameters.put("COLOR", dcInfoBoardTemplate.getFontColor()); + // fontType + parameters.put("FONT", dcInfoBoardTemplate.getFontType()); + // fontSize + parameters.put("FONT_SIZE", dcInfoBoardTemplate.getFontSize()); + // content + parameters.put("CONTENT", dcInfoBoardTemplate.getContent()); + // screenSize 768*64 宽度和高度 + parameters.put("width", dcInfoBoardTemplate.getScreenSize().split("\\*")[0]); + parameters.put("height", dcInfoBoardTemplate.getScreenSize().split("\\*")[1]); + // formatStyle + parameters.put("formatStyle", dcInfoBoardTemplate.getFormatStyle()); + list.add(parameters); + props11.put("parameters", list); + + processingDeviceParameters(functionId, functionList, props11); 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<>(); - - // stopTime - parameters.put("STAY", dcInfoBoardTemplate.getStopTime()); - // inScreenMode - parameters.put("ACTION", dcInfoBoardTemplate.getInScreenMode()); - // fontSpacing - parameters.put("SPEED", dcInfoBoardTemplate.getFontSpacing()); - // fontColor - parameters.put("COLOR", dcInfoBoardTemplate.getFontColor()); - // fontType - parameters.put("FONT", dcInfoBoardTemplate.getFontType()); - // fontSize - parameters.put("FONT_SIZE", dcInfoBoardTemplate.getFontSize()); - // content - parameters.put("CONTENT", dcInfoBoardTemplate.getContent()); - // screenSize 768*64 宽度和高度 - parameters.put("width", dcInfoBoardTemplate.getScreenSize().split("\\*")[0]); - parameters.put("height", dcInfoBoardTemplate.getScreenSize().split("\\*")[1]); - // formatStyle - parameters.put("formatStyle", dcInfoBoardTemplate.getFormatStyle()); - list.add(parameters); - props11.put("parameters", list); - - processingDeviceParameters(functionId, functionList, props11); - AjaxResult ajaxResult13 = dcDeviceController.getAjaxResult(iotDeviceId, functionId, props11); JSONObject result = new JSONObject(); result.put("device", device.getId());