|
@ -784,17 +784,28 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
props.put("inWorkStatus", otherConfig.get("state").toString()); |
|
|
props.put("inWorkStatus", otherConfig.get("state").toString()); |
|
|
props.put("mode", controlModel); |
|
|
props.put("mode", controlModel); |
|
|
JSONObject result = new JSONObject(); |
|
|
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 startTime = otherConfig.get("startTime").toString(); |
|
|
String endTime = otherConfig.get("endTime").toString(); |
|
|
String endTime = otherConfig.get("endTime").toString(); |
|
|
props.put("mode", "01"); |
|
|
props.put("mode", "01"); |
|
|
props.put("startDisplayTime", startTime); |
|
|
props.put("startDisplayTime", startTime); |
|
|
props.put("endDisplayTime", endTime); |
|
|
props.put("endDisplayTime", endTime); |
|
|
result.put("content","时间自动"); |
|
|
result.put("content","时间自动:"+state+";"+startTime+"-"+endTime); |
|
|
} else if (controlModel.equals("00")) { |
|
|
} else if (controlModel.equals("00")) { |
|
|
result.put("content","手动"); |
|
|
result.put("content","手动:"+state); |
|
|
}else { |
|
|
}else { |
|
|
result.put("content","万年历"); |
|
|
result.put("content","万年历:"+state); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
AjaxResult ajaxResult = dcDeviceController.invokedFunction(iotDeviceId, functionId, props); |
|
|
AjaxResult ajaxResult = dcDeviceController.invokedFunction(iotDeviceId, functionId, props); |
|
@ -899,6 +910,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
|
|
|
|
|
|
// 操作时长
|
|
|
// 操作时长
|
|
|
String operationDuration = "SETTM" + otherConfig.get("operationDuration").toString(); |
|
|
String operationDuration = "SETTM" + otherConfig.get("operationDuration").toString(); |
|
|
|
|
|
String name = otherConfig.get("name").toString(); |
|
|
HashMap<String, Object> propsTime = new HashMap<>(); |
|
|
HashMap<String, Object> propsTime = new HashMap<>(); |
|
|
propsTime.put("SET", operationDuration); |
|
|
propsTime.put("SET", operationDuration); |
|
|
functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_SETTM; |
|
|
functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_SETTM; |
|
@ -907,7 +919,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
JSONObject resultTime = new JSONObject(); |
|
|
JSONObject resultTime = new JSONObject(); |
|
|
resultTime.put("device", device.getId()); |
|
|
resultTime.put("device", device.getId()); |
|
|
resultTime.put("deviceName",device.getDeviceName()); |
|
|
resultTime.put("deviceName",device.getDeviceName()); |
|
|
resultTime.put("content","操作时长"+otherConfig.get("operationDuration")); |
|
|
resultTime.put("content","状态:"+name+"操作时长"+otherConfig.get("operationDuration")); |
|
|
resultTime.put("result", ajaxResult); |
|
|
resultTime.put("result", ajaxResult); |
|
|
resultArray.add(resultTime); |
|
|
resultArray.add(resultTime); |
|
|
|
|
|
|
|
|