Browse Source

中间库事件对象

develop
lau572 9 months ago
parent
commit
97aa99aca2
  1. 153
      zc-business/src/main/java/com/zc/business/domain/MdEvent.java

153
zc-business/src/main/java/com/zc/business/domain/MdEvent.java

@ -588,7 +588,81 @@ public class MdEvent
//交通事件名称 //交通事件名称
this.eventName = dcEvent.getEventTitle(); this.eventName = dcEvent.getEventTitle();
//交通事件类型 //交通事件类型
this.eventTypeCode = dcEvent.getEventType().toString(); if (dcEvent.getEventType() != null && dcEvent.getEventType() > 0){
//事件主类:
// 1-交通事故
// 2-车辆故障
// 3-交通管制
// 4-交通拥堵
// 5-非法上路
// 6-路障清除
// 7-施工建设
// 8-服务区异常
// 9-设施设备隐患
// 10-异常天气
// 11-其他事件
String eventType = dcEvent.getEventType().toString();
this.eventTypeCode = eventType;
if ("1".equals(eventType)){
DcEventAccident dcEventAccident = dcEvent.getDcEventAccident();
if (dcEventAccident != null){
//事故天气情况
this.accidentWeather = dcEventAccident.getWeatherCondition();
//事故压车(公里)
this.accidentQueue = new BigDecimal(Float.toString(dcEventAccident.getTrafficJam()));
}
} else if ("2".equals(eventType)){
DcEventVehicleAccident dcEventVehicleAccident = dcEvent.getDcEventVehicleAccident();
if (dcEventVehicleAccident != null) {
//事故天气情况
this.accidentWeather = dcEventVehicleAccident.getWeatherCondition();
//事故压车(公里)
this.accidentQueue = new BigDecimal(Float.toString(dcEventVehicleAccident.getTrafficJam()));
}
} else if ("3".equals(eventType)){
DcEventTrafficControl dcEventTrafficControl = dcEvent.getDcEventTrafficControl();
if (dcEventTrafficControl != null) {
//管制分类
this.controlCategory = dcEventTrafficControl.getControlType();
//管制原因类型
this.controlReasonType = dcEventTrafficControl.getControlCause().toString();
//管制出入口
this.controlStation = dcEventTrafficControl.getFacilityId();
//管制措施
this.controlStrategy = dcEventTrafficControl.getMeasure();
//管制限制类型
this.controlType = dcEventTrafficControl.getLimitedType();
//管制车辆类型
this.controlVehicleType = dcEventTrafficControl.getVehicleType();
}
} else if ("4".equals(eventType)){
DcEventTrafficCongestion dcEventTrafficCongestion = dcEvent.getDcEventTrafficCongestion();
if (dcEventTrafficCongestion != null) {
//拥堵里程(公里)
this.congestionPile = dcEventTrafficCongestion.getCongestionMileage().longValue();
//拥堵原因
this.congestionReason = dcEventTrafficCongestion.getCongestionCause();
}
} else if ("7".equals(eventType)){
DcEventConstruction dcEventConstruction = dcEvent.getDcEventConstruction();
if (dcEventConstruction != null) {
//管制分类
this.controlCategory = dcEventConstruction.getControlMode();
}
} else if ("8".equals(eventType)){
DcEventServiceArea dcEventServiceArea = dcEvent.getDcEventServiceArea();
if (dcEventServiceArea != null) {
//管制出入口
this.controlStation = dcEventServiceArea.getFacilityId();
}
} else if ("10".equals(eventType)){
DcEventAbnormalWeather dcEventAbnormalWeather = dcEvent.getDcEventAbnormalWeather();
if (dcEventAbnormalWeather != null){
}
}
}
//交通事件详情 //交通事件详情
this.eventDesc = dcEvent.getDescription(); this.eventDesc = dcEvent.getDescription();
//发生时间 //发生时间
@ -604,7 +678,7 @@ public class MdEvent
//事件来源编码 //事件来源编码
this.eventSourceCode = dcEvent.getEventSource(); this.eventSourceCode = dcEvent.getEventSource();
//事件来源编码 1-96659,2-交警转接,3-道路巡查,4-视频巡查,5-视频AI,6-一键救援,7-其他 //事件来源编码 1-96659,2-交警转接,3-道路巡查,4-视频巡查,5-视频AI,6-一键救援,7-其他
if (dcEvent.getEventSource() > 0){ if (dcEvent.getEventSource() != null && dcEvent.getEventSource() > 0){
if (dcEvent.getEventSource() == 1){ if (dcEvent.getEventSource() == 1){
this.eventSource = "96659"; this.eventSource = "96659";
} else if (dcEvent.getEventSource() == 2){ } else if (dcEvent.getEventSource() == 2){
@ -626,85 +700,12 @@ public class MdEvent
//事件等级 //事件等级
this.eventLevel = dcEvent.getEventLevel(); this.eventLevel = dcEvent.getEventLevel();
//所属路段 //所属路段
if (dcEvent.getRoadId() > 0){ if (dcEvent.getRoadId() != null && dcEvent.getRoadId() > 0){
this.sectionId = dcEvent.getRoadId().toString(); this.sectionId = dcEvent.getRoadId().toString();
} }
//交通事件类型子类 //交通事件类型子类
this.eventTypeCode2 = dcEvent.getEventSubclass(); this.eventTypeCode2 = dcEvent.getEventSubclass();
//事件原因 //事件原因
this.eventCause = dcEvent.getEventCause(); this.eventCause = dcEvent.getEventCause();
//事件主类:
// 1-交通事故
// 2-车辆故障
// 3-交通管制
// 4-交通拥堵
// 5-非法上路
// 6-路障清除
// 7-施工建设
// 8-服务区异常
// 9-设施设备隐患
// 10-异常天气
// 11-其他事件
String eventType = dcEvent.getEventType().toString();
if ("1".equals(eventType)){
DcEventAccident dcEventAccident = dcEvent.getDcEventAccident();
if (dcEventAccident != null){
//事故天气情况
this.accidentWeather = dcEventAccident.getWeatherCondition();
//事故压车(公里)
this.accidentQueue = new BigDecimal(Float.toString(dcEventAccident.getTrafficJam()));
}
} else if ("2".equals(eventType)){
DcEventVehicleAccident dcEventVehicleAccident = dcEvent.getDcEventVehicleAccident();
if (dcEventVehicleAccident != null) {
//事故天气情况
this.accidentWeather = dcEventVehicleAccident.getWeatherCondition();
//事故压车(公里)
this.accidentQueue = new BigDecimal(Float.toString(dcEventVehicleAccident.getTrafficJam()));
}
} else if ("3".equals(eventType)){
DcEventTrafficControl dcEventTrafficControl = dcEvent.getDcEventTrafficControl();
if (dcEventTrafficControl != null) {
//管制分类
this.controlCategory = dcEventTrafficControl.getControlType();
//管制原因类型
this.controlReasonType = dcEventTrafficControl.getControlCause().toString();
//管制出入口
this.controlStation = dcEventTrafficControl.getFacilityId();
//管制措施
this.controlStrategy = dcEventTrafficControl.getMeasure();
//管制限制类型
this.controlType = dcEventTrafficControl.getLimitedType();
//管制车辆类型
this.controlVehicleType = dcEventTrafficControl.getVehicleType();
}
} else if ("4".equals(eventType)){
DcEventTrafficCongestion dcEventTrafficCongestion = dcEvent.getDcEventTrafficCongestion();
if (dcEventTrafficCongestion != null) {
//拥堵里程(公里)
this.congestionPile = dcEventTrafficCongestion.getCongestionMileage().longValue();
//拥堵原因
this.congestionReason = dcEventTrafficCongestion.getCongestionCause();
}
} else if ("7".equals(eventType)){
DcEventConstruction dcEventConstruction = dcEvent.getDcEventConstruction();
if (dcEventConstruction != null) {
//管制分类
this.controlCategory = dcEventConstruction.getControlMode();
}
} else if ("8".equals(eventType)){
DcEventServiceArea dcEventServiceArea = dcEvent.getDcEventServiceArea();
if (dcEventServiceArea != null) {
//管制出入口
this.controlStation = dcEventServiceArea.getFacilityId();
}
} else if ("10".equals(eventType)){
DcEventAbnormalWeather dcEventAbnormalWeather = dcEvent.getDcEventAbnormalWeather();
if (dcEventAbnormalWeather != null){
}
}
} }
} }

Loading…
Cancel
Save