Browse Source

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

develop
王兴琳 7 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) { switch (eventType) {
//交通事故 //交通事故
case 1: case 1:
if (dcEvent.getDcEventAccident() != null) { /* if (dcEvent.getDcEventAccident() != null) {
dcEvent.getDcEventAccident().setId(uuid);
int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident()); }*/
} dcEvent.getDcEventAccident().setId(uuid);
dcEvent.getDcEventAccident().setReporterName("视频AI");
dcEvent.getDcEventAccident().setReporterPhoneNumber("96659");
dcEvent.getDcEventAccident().setLocationType(1l);//高速主线
int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident());
break; break;
//车辆事故 //车辆事故
case 2: case 2:
if (dcEvent.getDcEventVehicleAccident() != null) { /* if (dcEvent.getDcEventVehicleAccident() != null) {
dcEvent.getDcEventVehicleAccident().setId(uuid);
int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident());
}
}*/
dcEvent.getDcEventVehicleAccident().setReporterName("视频AI");
dcEvent.getDcEventVehicleAccident().setReporterPhoneNumber("96659");
dcEvent.getDcEventVehicleAccident().setLocationType(1l);//高速主线
dcEvent.getDcEventVehicleAccident().setId(uuid);
int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident());
break; break;
//交通管制 //交通管制
case 3: case 3:
if (dcEvent.getDcEventTrafficControl() != null) { /* if (dcEvent.getDcEventTrafficControl() != null) {
dcEvent.getDcEventTrafficControl().setId(uuid);
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); } */
} dcEvent.getDcEventTrafficControl().setControlType(1L);//限行
dcEvent.getDcEventTrafficControl().setControlCause(2L);//交通事故
dcEvent.getDcEventTrafficControl().setId(uuid);
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
break; break;
//交通拥堵 //交通拥堵
case 4: case 4:
if (dcEvent.getDcEventTrafficCongestion() != null) { /* if (dcEvent.getDcEventTrafficCongestion() != null) {
dcEvent.getDcEventTrafficCongestion().setId(uuid);
int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion()); }*/
} dcEvent.getDcEventTrafficCongestion().setId(uuid);
dcEvent.getDcEventTrafficCongestion().setCongestionMileage(0F);//拥堵里程(公里)
dcEvent.getDcEventTrafficCongestion().setCongestionCause(5l);//拥堵原因1-车流量大 2-交通事故 3-恶劣天气 4-施工 5-其他
int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion());
break; break;
//非法上路 //非法上路
case 5: case 5:
@ -491,28 +504,33 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
break; break;
//施工建设 //施工建设
case 7: case 7:
if (dcEvent.getDcEventConstruction() != null) { /* if (dcEvent.getDcEventConstruction() != null) {
dcEvent.getDcEventConstruction().setId(uuid);
int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction());
}
}*/
dcEvent.getDcEventConstruction().setId(uuid);
dcEvent.getDcEventConstruction().setControlMode(1l);//封闭
int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction());
break; break;
//服务区异常 //服务区异常
case 8: case 8:
if (dcEvent.getDcEventServiceArea() != null) { /* if (dcEvent.getDcEventServiceArea() != null) {
dcEvent.getDcEventServiceArea().setId(uuid);
int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea()); }*/
} dcEvent.getDcEventServiceArea().setId(uuid);
int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea());
break; break;
//设施设备隐患 //设施设备隐患
case 9: case 9:
break; break;
//异常天气 //异常天气
case 10: case 10:
if (dcEvent.getDcEventAbnormalWeather() != null) { /* if (dcEvent.getDcEventAbnormalWeather() != null) {
dcEvent.getDcEventAbnormalWeather().setId(uuid); }*/
int i = dcEventAbnormalWeatherMapper.insertDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather()); 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; break;
//其他事件 //其他事件
case 11: case 11:
@ -714,18 +732,24 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
switch (eventType) { switch (eventType) {
//交通事故 //交通事故
case 1: case 1:
dcEvent.getDcEventAccident().setId(dcEvent.getId());
int i1 = dcEventAccidentMapper.updateDcEventAccident(dcEvent.getDcEventAccident()); int i1 = dcEventAccidentMapper.updateDcEventAccident(dcEvent.getDcEventAccident());
break; break;
//车辆事故 //车辆事故
case 2: case 2:
dcEvent.getDcEventVehicleAccident().setId(dcEvent.getId());
int i5 = dcEventVehicleAccidentMapper.updateDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident()); int i5 = dcEventVehicleAccidentMapper.updateDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident());
break; break;
//交通管制 //交通管制
case 3: case 3:
dcEvent.getDcEventTrafficControl().setId(dcEvent.getId());
int i6 = dcEventTrafficControlMapper.updateDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); int i6 = dcEventTrafficControlMapper.updateDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
break; break;
//交通拥堵 //交通拥堵
case 4: case 4:
dcEvent.getDcEventTrafficCongestion().setId(dcEvent.getId());
int i4 = dcEventTrafficCongestionMapper.updateDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion()); int i4 = dcEventTrafficCongestionMapper.updateDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion());
break; break;
@ -737,10 +761,14 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
break; break;
//施工建设 //施工建设
case 7: case 7:
dcEvent.getDcEventConstruction().setId(dcEvent.getId());
int i2 = dcEventConstructionMapper.updateDcEventConstruction(dcEvent.getDcEventConstruction()); int i2 = dcEventConstructionMapper.updateDcEventConstruction(dcEvent.getDcEventConstruction());
break; break;
//服务区异常 //服务区异常
case 8: case 8:
dcEvent.getDcEventServiceArea().setId(dcEvent.getId());
int i3 = dcEventServiceAreaMapper.updateDcEventServiceArea(dcEvent.getDcEventServiceArea()); int i3 = dcEventServiceAreaMapper.updateDcEventServiceArea(dcEvent.getDcEventServiceArea());
break; break;
//设施设备隐患 //设施设备隐患
@ -748,7 +776,10 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
break; break;
//异常天气 //异常天气
case 10: case 10:
dcEvent.getDcEventAbnormalWeather().setId(dcEvent.getId());
int i = dcEventAbnormalWeatherMapper.updateDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather()); int i = dcEventAbnormalWeatherMapper.updateDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather());
System.out.println(i);
break; break;
//其他事件 //其他事件
case 11: 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.setCreateTime(DateUtils.getNowDate());//创建时间
dcEvent.setUserId(SecurityUtils.getUserId());//处置人员 dcEvent.setUserId(SecurityUtils.getUserId());//处置人员
dcEvent.setRoadId(1L);//高速公路(济菏高速) dcEvent.setRoadId(1L);//高速公路(济菏高速)
int insertDcEvent = dcEventService.insertDcEventWarning(dcEvent); int insertDcEvent = dcEventService.insertDcEventWarning(dcEvent);
if (insertDcEvent==0){ if (insertDcEvent==0){
return AjaxResult.error("操作失败"); return AjaxResult.error("操作失败");
} }

Loading…
Cancel
Save