|
@ -170,12 +170,12 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
dcExecuteActions.forEach(dcExecuteAction -> { |
|
|
dcExecuteActions.forEach(dcExecuteAction -> { |
|
|
JSONObject executeConfig = JSON.parseObject(dcExecuteAction.getExecuteConfig()); |
|
|
JSONObject executeConfig = JSON.parseObject(dcExecuteAction.getExecuteConfig()); |
|
|
if (dcExecuteAction.getDeviceType() == DeviceTypeEnum.ROAD_SECTION_VOICE_BROADCASTING.getCode() |
|
|
if (dcExecuteAction.getDeviceType() == DeviceTypeEnum.ROAD_SECTION_VOICE_BROADCASTING.getCode() |
|
|
&& executeConfig.get("operationType").equals("2")) { |
|
|
&& executeConfig.getString("operationType").equals("2")) { |
|
|
// 执行操作中智能发布语音广播
|
|
|
// 执行操作中智能发布语音广播
|
|
|
String content = intelligentPublishingOfInformation(dcEvent); |
|
|
String content = intelligentPublishingOfInformation(dcEvent); |
|
|
updateIntelligentPublishingContent(dcExecuteAction,markArray,dcEvent,content,dcEvent.getDirection()); |
|
|
updateIntelligentPublishingContent(dcExecuteAction,markArray,dcEvent,content,dcEvent.getDirection()); |
|
|
} else if (dcExecuteAction.getDeviceType() == DeviceTypeEnum.VARIABLE_INFORMATION_FLAG.getCode() |
|
|
} else if (dcExecuteAction.getDeviceType() == DeviceTypeEnum.VARIABLE_INFORMATION_FLAG.getCode() |
|
|
&& executeConfig.get("operationType").equals("2")) { |
|
|
&& executeConfig.getString("operationType").equals("2")) { |
|
|
// 执行操作中智能发布情报板
|
|
|
// 执行操作中智能发布情报板
|
|
|
String content = intelligentPublishingOfInformation(dcEvent); |
|
|
String content = intelligentPublishingOfInformation(dcEvent); |
|
|
updateIntelligentPublishingContent(dcExecuteAction,markArray,dcEvent,content,dcEvent.getDirection()); |
|
|
updateIntelligentPublishingContent(dcExecuteAction,markArray,dcEvent,content,dcEvent.getDirection()); |
|
@ -753,6 +753,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
eventPlanAssoc.setControlDevice(deviceIds.toString().replaceFirst(";", "")); |
|
|
eventPlanAssoc.setControlDevice(deviceIds.toString().replaceFirst(";", "")); |
|
|
eventPlanAssoc.setControlResult(resultArray.toJSONString()); |
|
|
eventPlanAssoc.setControlResult(resultArray.toJSONString()); |
|
|
eventPlanAssoc.setCreateTime(DateUtils.getNowDate()); |
|
|
eventPlanAssoc.setCreateTime(DateUtils.getNowDate()); |
|
|
|
|
|
eventPlanAssoc.setControl(JSON.toJSONString(dcEmergencyPlans.getDcExecuteAction())); |
|
|
eventPlanAssocMapper.insertEventPlanAssoc(eventPlanAssoc); |
|
|
eventPlanAssocMapper.insertEventPlanAssoc(eventPlanAssoc); |
|
|
resultObject.put("eventPlanAssocId",eventPlanAssoc.getId()); |
|
|
resultObject.put("eventPlanAssocId",eventPlanAssoc.getId()); |
|
|
|
|
|
|
|
@ -819,7 +820,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
else if (device.getDeviceType().equals(DeviceTypeConstants.VARIABLE_INFORMATION_FLAG.toString())) { |
|
|
else if (device.getDeviceType().equals(DeviceTypeConstants.VARIABLE_INFORMATION_FLAG.toString())) { |
|
|
if (operationType == 1) { |
|
|
if (operationType == 1) { |
|
|
// 情报板发布全流程
|
|
|
// 情报板发布全流程
|
|
|
if (otherConfig.get("operationType").equals("2")) { |
|
|
if (otherConfig.getString("operationType").equals("2")) { |
|
|
JSONArray contentList = JSON.parseArray(otherConfig.get("contentList").toString()); |
|
|
JSONArray contentList = JSON.parseArray(otherConfig.get("contentList").toString()); |
|
|
JSONObject foundContent = contentList.stream() |
|
|
JSONObject foundContent = contentList.stream() |
|
|
.map(content -> JSON.parseObject(content.toString())) |
|
|
.map(content -> JSON.parseObject(content.toString())) |
|
@ -843,7 +844,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
// 恢复操作
|
|
|
// 恢复操作
|
|
|
if (otherConfig.get("operationType").equals("2")) { |
|
|
if (otherConfig.getString("operationType").equals("2")) { |
|
|
// 还原上次
|
|
|
// 还原上次
|
|
|
props.put("fileId", "10"); |
|
|
props.put("fileId", "10"); |
|
|
functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_1B; |
|
|
functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_1B; |
|
@ -869,7 +870,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
params.put("name", "task-event"); |
|
|
params.put("name", "task-event"); |
|
|
params.put("outVVol", "8"); |
|
|
params.put("outVVol", "8"); |
|
|
params.put("priority", "1"); |
|
|
params.put("priority", "1"); |
|
|
if (otherConfig.get("operationType").equals("2")) { |
|
|
if (otherConfig.getString("operationType").equals("2")) { |
|
|
// 智能发布
|
|
|
// 智能发布
|
|
|
JSONArray contentList = JSON.parseArray(otherConfig.get("contentList").toString()); |
|
|
JSONArray contentList = JSON.parseArray(otherConfig.get("contentList").toString()); |
|
|
JSONObject foundContent = contentList.stream() |
|
|
JSONObject foundContent = contentList.stream() |
|
@ -1169,7 +1170,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
}else if (dcExecuteAction.getDeviceType() == DeviceTypeConstants.VARIABLE_INFORMATION_FLAG || |
|
|
}else if (dcExecuteAction.getDeviceType() == DeviceTypeConstants.VARIABLE_INFORMATION_FLAG || |
|
|
dcExecuteAction.getDeviceType() == DeviceTypeConstants.ROAD_SECTION_VOICE_BROADCASTING) { |
|
|
dcExecuteAction.getDeviceType() == DeviceTypeConstants.ROAD_SECTION_VOICE_BROADCASTING) { |
|
|
// 情报板/语音广播
|
|
|
// 情报板/语音广播
|
|
|
if (jsonObject.get("operationType").equals("1")) { |
|
|
if (jsonObject.getString("operationType").equals("1")) { |
|
|
config.put("content",jsonObject.get("content")); |
|
|
config.put("content",jsonObject.get("content")); |
|
|
}else { |
|
|
}else { |
|
|
config.put("operationType","智能发布"); |
|
|
config.put("operationType","智能发布"); |
|
|