|
|
@ -96,9 +96,9 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
|
return dcEmergencyPlansList.stream() |
|
|
|
.filter(dcEmergencyPlans -> { |
|
|
|
String triggerMechanism = dcEmergencyPlans.getTriggerMechanism(); |
|
|
|
JSONObject triggerJson = JSONObject.parseObject(triggerMechanism); |
|
|
|
String eventSubclass = triggerJson.get("eventSubclass").toString(); |
|
|
|
return eventSubclass.equals(event.getEventSubclass()); |
|
|
|
// JSONObject triggerJson = JSONObject.parseObject(triggerMechanism);
|
|
|
|
// String eventSubclass = triggerJson.get("eventSubclass").toString();
|
|
|
|
return triggerMechanism.equals(event.getEventSubclass()); |
|
|
|
}) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
} else if (eventType == EventTypeEnum.VEHICLE_MALFUNCTION.getCode()) { |
|
|
@ -106,11 +106,11 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
|
return dcEmergencyPlansList.stream() |
|
|
|
.filter(dcEmergencyPlans -> { |
|
|
|
String triggerMechanism = dcEmergencyPlans.getTriggerMechanism(); |
|
|
|
JSONObject triggerJson = JSONObject.parseObject(triggerMechanism); |
|
|
|
String locationType = triggerJson.get("locationType").toString(); |
|
|
|
// JSONObject triggerJson = JSONObject.parseObject(triggerMechanism);
|
|
|
|
// String locationType = triggerJson.get("locationType").toString();
|
|
|
|
DcEventVehicleAccident dcEventVehicleAccident = event.getDcEventVehicleAccident(); |
|
|
|
String eventLocationType = dcEventVehicleAccident.getLocationType().toString(); |
|
|
|
return locationType.equals(eventLocationType); |
|
|
|
return triggerMechanism.equals(eventLocationType); |
|
|
|
}) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
} else if (eventType == EventTypeEnum.TRAFFIC_CONTROL.getCode()) { |
|
|
@ -118,13 +118,13 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
|
return dcEmergencyPlansList.stream() |
|
|
|
.filter(dcEmergencyPlans -> { |
|
|
|
String triggerMechanism = dcEmergencyPlans.getTriggerMechanism(); |
|
|
|
JSONObject triggerJson = JSONObject.parseObject(triggerMechanism); |
|
|
|
// JSONObject triggerJson = JSONObject.parseObject(triggerMechanism);
|
|
|
|
// 分类
|
|
|
|
Integer classify = Integer.parseInt(triggerJson.get("classify").toString()); |
|
|
|
// Integer classify = Integer.parseInt(triggerJson.get("classify").toString());
|
|
|
|
// 事件--交通管制数据
|
|
|
|
DcEventTrafficControl dcEventTrafficControl = event.getDcEventTrafficControl(); |
|
|
|
Integer eventClassify = Integer.parseInt(dcEventTrafficControl.getClassify().toString()); |
|
|
|
return classify.equals(eventClassify); |
|
|
|
return Integer.parseInt(triggerMechanism) == eventClassify; |
|
|
|
}) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
} else { |
|
|
|