|
|
@ -720,28 +720,28 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
|
.forEach(dcExecuteAction -> { |
|
|
|
List<DcDevice> dcDevices = ruleFiltering(dcExecuteAction, markArray, direction); |
|
|
|
|
|
|
|
// 此代码 是为了防止事件没有匹配到预案,但是还执行了设备控制,并且执行操作中带有智能发布
|
|
|
|
boolean isIdEmpty = ObjectUtils.isEmpty(dcEmergencyPlans.getId()); |
|
|
|
Set<Integer> targetDeviceTypes = new HashSet<>(Arrays.asList( |
|
|
|
DeviceTypeEnum.ROAD_SECTION_VOICE_BROADCASTING.getCode(), |
|
|
|
DeviceTypeEnum.VARIABLE_INFORMATION_FLAG.getCode() |
|
|
|
)); |
|
|
|
boolean isTargetDeviceType = targetDeviceTypes.contains(dcExecuteAction.getDeviceType()); |
|
|
|
if (isIdEmpty && isTargetDeviceType) { |
|
|
|
String configJson = operationType.equals(1) ? dcExecuteAction.getExecuteConfig() : dcExecuteAction.getRecoverConfig(); |
|
|
|
JSONObject config = JSON.parseObject(configJson); |
|
|
|
if (config.getString("operationType").equals("2")) { |
|
|
|
DcEvent dcEvent = dcEventAnDcEmergencyPlans.getDcEvent(); |
|
|
|
String content = intelligentPublishingOfInformation(dcEvent); |
|
|
|
updateIntelligentPublishingContent( |
|
|
|
dcExecuteAction, |
|
|
|
markArray, |
|
|
|
dcEvent, |
|
|
|
content, |
|
|
|
dcEvent.getDirection() |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
// // 此代码 是为了防止事件没有匹配到预案,但是还执行了设备控制,并且执行操作中带有智能发布
|
|
|
|
// boolean isIdEmpty = ObjectUtils.isEmpty(dcEmergencyPlans.getId());
|
|
|
|
// Set<Integer> targetDeviceTypes = new HashSet<>(Arrays.asList(
|
|
|
|
// DeviceTypeEnum.ROAD_SECTION_VOICE_BROADCASTING.getCode(),
|
|
|
|
// DeviceTypeEnum.VARIABLE_INFORMATION_FLAG.getCode()
|
|
|
|
// ));
|
|
|
|
// boolean isTargetDeviceType = targetDeviceTypes.contains(dcExecuteAction.getDeviceType());
|
|
|
|
// if (isIdEmpty && isTargetDeviceType) {
|
|
|
|
// String configJson = operationType.equals(1) ? dcExecuteAction.getExecuteConfig() : dcExecuteAction.getRecoverConfig();
|
|
|
|
// JSONObject config = JSON.parseObject(configJson);
|
|
|
|
// if (config.getString("operationType").equals("2")) {
|
|
|
|
// DcEvent dcEvent = dcEventAnDcEmergencyPlans.getDcEvent();
|
|
|
|
// String content = intelligentPublishingOfInformation(dcEvent);
|
|
|
|
// updateIntelligentPublishingContent(
|
|
|
|
// dcExecuteAction,
|
|
|
|
// markArray,
|
|
|
|
// dcEvent,
|
|
|
|
// content,
|
|
|
|
// dcEvent.getDirection()
|
|
|
|
// );
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
JSONObject otherConfig = operationType.equals(1)? |
|
|
|
JSON.parseObject(dcExecuteAction.getExecuteConfig()): JSON.parseObject(dcExecuteAction.getRecoverConfig()); |
|
|
|