Browse Source

更改事件弹框查询

develop
Mr.Wang 8 months ago
parent
commit
c55fd5aed1
  1. 18
      zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

18
zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

@ -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 {

Loading…
Cancel
Save