Browse Source

感知事件 转交通事件 子类修改

develop
王兴琳 6 months ago
parent
commit
8cf981563d
  1. 89
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
  2. 2
      zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java

89
zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java

@ -454,34 +454,47 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
switch (eventType) {
//交通事故
case 1:
if (dcEvent.getDcEventAccident() != null) {
dcEvent.getDcEventAccident().setId(uuid);
int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident());
}
/* if (dcEvent.getDcEventAccident() != null) {
}*/
dcEvent.getDcEventAccident().setId(uuid);
dcEvent.getDcEventAccident().setReporterName("视频AI");
dcEvent.getDcEventAccident().setReporterPhoneNumber("96659");
dcEvent.getDcEventAccident().setLocationType(1l);//高速主线
int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident());
break;
//车辆事故
case 2:
if (dcEvent.getDcEventVehicleAccident() != null) {
dcEvent.getDcEventVehicleAccident().setId(uuid);
int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident());
}
/* if (dcEvent.getDcEventVehicleAccident() != null) {
}*/
dcEvent.getDcEventVehicleAccident().setReporterName("视频AI");
dcEvent.getDcEventVehicleAccident().setReporterPhoneNumber("96659");
dcEvent.getDcEventVehicleAccident().setLocationType(1l);//高速主线
dcEvent.getDcEventVehicleAccident().setId(uuid);
int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident());
break;
//交通管制
case 3:
if (dcEvent.getDcEventTrafficControl() != null) {
dcEvent.getDcEventTrafficControl().setId(uuid);
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
}
/* if (dcEvent.getDcEventTrafficControl() != null) {
} */
dcEvent.getDcEventTrafficControl().setControlType(1L);//限行
dcEvent.getDcEventTrafficControl().setControlCause(2L);//交通事故
dcEvent.getDcEventTrafficControl().setId(uuid);
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
break;
//交通拥堵
case 4:
if (dcEvent.getDcEventTrafficCongestion() != null) {
dcEvent.getDcEventTrafficCongestion().setId(uuid);
int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion());
}
/* if (dcEvent.getDcEventTrafficCongestion() != null) {
}*/
dcEvent.getDcEventTrafficCongestion().setId(uuid);
dcEvent.getDcEventTrafficCongestion().setCongestionMileage(0F);//拥堵里程(公里)
dcEvent.getDcEventTrafficCongestion().setCongestionCause(5l);//拥堵原因1-车流量大 2-交通事故 3-恶劣天气 4-施工 5-其他
int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion());
break;
//非法上路
case 5:
@ -491,28 +504,33 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
break;
//施工建设
case 7:
if (dcEvent.getDcEventConstruction() != null) {
dcEvent.getDcEventConstruction().setId(uuid);
int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction());
}
/* if (dcEvent.getDcEventConstruction() != null) {
}*/
dcEvent.getDcEventConstruction().setId(uuid);
dcEvent.getDcEventConstruction().setControlMode(1l);//封闭
int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction());
break;
//服务区异常
case 8:
if (dcEvent.getDcEventServiceArea() != null) {
dcEvent.getDcEventServiceArea().setId(uuid);
int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea());
}
/* if (dcEvent.getDcEventServiceArea() != null) {
}*/
dcEvent.getDcEventServiceArea().setId(uuid);
int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea());
break;
//设施设备隐患
case 9:
break;
//异常天气
case 10:
if (dcEvent.getDcEventAbnormalWeather() != null) {
dcEvent.getDcEventAbnormalWeather().setId(uuid);
int i = dcEventAbnormalWeatherMapper.insertDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather());
}
/* if (dcEvent.getDcEventAbnormalWeather() != null) {
}*/
dcEvent.getDcEventAbnormalWeather().setId(uuid);
dcEvent.getDcEventAbnormalWeather().setWeatherSituation("1-1");//雨雾
dcEvent.getDcEventAbnormalWeather().setEmergencyLevel(1l);//等级 1一班
dcEvent.getDcEventAbnormalWeather().setEndStakeMark(dcEvent.getStakeMark());
int i = dcEventAbnormalWeatherMapper.insertDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather());
break;
//其他事件
case 11:
@ -714,18 +732,24 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
switch (eventType) {
//交通事故
case 1:
dcEvent.getDcEventAccident().setId(dcEvent.getId());
int i1 = dcEventAccidentMapper.updateDcEventAccident(dcEvent.getDcEventAccident());
break;
//车辆事故
case 2:
dcEvent.getDcEventVehicleAccident().setId(dcEvent.getId());
int i5 = dcEventVehicleAccidentMapper.updateDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident());
break;
//交通管制
case 3:
dcEvent.getDcEventTrafficControl().setId(dcEvent.getId());
int i6 = dcEventTrafficControlMapper.updateDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
break;
//交通拥堵
case 4:
dcEvent.getDcEventTrafficCongestion().setId(dcEvent.getId());
int i4 = dcEventTrafficCongestionMapper.updateDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion());
break;
@ -737,10 +761,14 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
break;
//施工建设
case 7:
dcEvent.getDcEventConstruction().setId(dcEvent.getId());
int i2 = dcEventConstructionMapper.updateDcEventConstruction(dcEvent.getDcEventConstruction());
break;
//服务区异常
case 8:
dcEvent.getDcEventServiceArea().setId(dcEvent.getId());
int i3 = dcEventServiceAreaMapper.updateDcEventServiceArea(dcEvent.getDcEventServiceArea());
break;
//设施设备隐患
@ -748,7 +776,10 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
break;
//异常天气
case 10:
dcEvent.getDcEventAbnormalWeather().setId(dcEvent.getId());
int i = dcEventAbnormalWeatherMapper.updateDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather());
System.out.println(i);
break;
//其他事件
case 11:

2
zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java

@ -498,7 +498,9 @@ public class DcWarningServiceImpl implements IDcWarningService
dcEvent.setCreateTime(DateUtils.getNowDate());//创建时间
dcEvent.setUserId(SecurityUtils.getUserId());//处置人员
dcEvent.setRoadId(1L);//高速公路(济菏高速)
int insertDcEvent = dcEventService.insertDcEventWarning(dcEvent);
if (insertDcEvent==0){
return AjaxResult.error("操作失败");
}

Loading…
Cancel
Save