From c69cab10f3b01059d4865b5730560ae5e67f945b Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Tue, 25 Jun 2024 18:55:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=83=85=E6=8A=A5=E6=9D=BF?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E5=AD=98=E5=82=A8=E6=97=A5=E5=BF=97=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DcEmergencyPlansServiceImpl.java | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 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 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());