From 8129f81e87d01440d5c9729ba8fdbe12abb41822 Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Fri, 17 May 2024 16:18:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87=E7=AE=A1?= =?UTF-8?q?=E6=8E=A7=E7=9A=84=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DcEmergencyPlansServiceImpl.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 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 043b3db7..d648544e 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 @@ -784,17 +784,28 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { props.put("inWorkStatus", otherConfig.get("state").toString()); props.put("mode", controlModel); JSONObject result = new JSONObject(); - if (controlModel.equals("01")) { + String state = ""; + // 01常亮02流水03闪烁04关闭 + if (otherConfig.get("state").toString().equals("01")) { + state = "常量"; + } else if (otherConfig.get("state").toString().equals("02")) { + state = "流水"; + } else if (otherConfig.get("state").toString().equals("03")) { + state = "闪烁"; + }else { + state = "关闭"; + } + if (controlModel.equals("01")) { String startTime = otherConfig.get("startTime").toString(); String endTime = otherConfig.get("endTime").toString(); props.put("mode", "01"); props.put("startDisplayTime", startTime); props.put("endDisplayTime", endTime); - result.put("content","时间自动"); + result.put("content","时间自动:"+state+";"+startTime+"-"+endTime); } else if (controlModel.equals("00")) { - result.put("content","手动"); + result.put("content","手动:"+state); }else { - result.put("content","万年历"); + result.put("content","万年历:"+state); } AjaxResult ajaxResult = dcDeviceController.invokedFunction(iotDeviceId, functionId, props); @@ -899,6 +910,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { // 操作时长 String operationDuration = "SETTM" + otherConfig.get("operationDuration").toString(); + String name = otherConfig.get("name").toString(); HashMap propsTime = new HashMap<>(); propsTime.put("SET", operationDuration); functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_SETTM; @@ -907,7 +919,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { JSONObject resultTime = new JSONObject(); resultTime.put("device", device.getId()); resultTime.put("deviceName",device.getDeviceName()); - resultTime.put("content","操作时长"+otherConfig.get("operationDuration")); + resultTime.put("content","状态:"+name+"操作时长"+otherConfig.get("operationDuration")); resultTime.put("result", ajaxResult); resultArray.add(resultTime);