Browse Source

修改设备管控的历史记录

develop
Mr.Wang 6 months ago
parent
commit
8129f81e87
  1. 20
      zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

20
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();
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<String, Object> 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);

Loading…
Cancel
Save