|
|
@ -597,13 +597,11 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
|
if (controlModel.equals("1")) { |
|
|
|
props.put("mode", "00"); |
|
|
|
} else if (controlModel.equals("2")) { |
|
|
|
Date date = new Date(); |
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
String format = dateFormat.format(date); |
|
|
|
String[] times = otherConfig.get("time").toString().split("-"); |
|
|
|
String startTime = otherConfig.get("startTime").toString(); |
|
|
|
String endTime = otherConfig.get("endTime").toString(); |
|
|
|
props.put("mode", "01"); |
|
|
|
props.put("startDisplayTime", format + " " + times[0]); |
|
|
|
props.put("endDisplayTime", format + " " + times[1]); |
|
|
|
props.put("startDisplayTime", startTime); |
|
|
|
props.put("endDisplayTime", endTime); |
|
|
|
} else { |
|
|
|
props.put("mode", "02"); |
|
|
|
} |
|
|
@ -704,7 +702,24 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
|
result.put("result", returnResult); |
|
|
|
resultArray.add(result); |
|
|
|
} |
|
|
|
else { |
|
|
|
else if (device.getDeviceType().equals(DeviceTypeConstants.LASER_FATIGUE_AWAKENING)) { |
|
|
|
// 激光疲劳唤醒
|
|
|
|
functionId = otherConfig.get("state").toString(); |
|
|
|
|
|
|
|
AjaxResult ajaxResultState = dcDeviceController.invokedFunction(iotDeviceId, functionId, new HashMap<>()); |
|
|
|
// 将调用结果存入到 resultArray(操作结果) 中
|
|
|
|
JSONObject result = new JSONObject(); |
|
|
|
result.put("device", device.getId()); |
|
|
|
result.put("result", ajaxResultState); |
|
|
|
resultArray.add(result); |
|
|
|
// 操作时长
|
|
|
|
String operationDuration = "SETTM" + otherConfig.get("operationDuration").toString(); |
|
|
|
AjaxResult ajaxResult = dcDeviceController.invokedFunction(iotDeviceId, operationDuration, new HashMap<>()); |
|
|
|
JSONObject resultTime = new JSONObject(); |
|
|
|
resultTime.put("device", device.getId()); |
|
|
|
resultTime.put("result", ajaxResult); |
|
|
|
resultArray.add(resultTime); |
|
|
|
} else { |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|