|
|
@ -160,6 +160,10 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
|
|
|
|
dcEvent.setCreateTime(DateUtils.getNowDate()); |
|
|
|
|
|
|
|
if (eventType != 1 && eventType != 2){ |
|
|
|
dcEvent.setOccurrenceTime(DateUtils.getNowDate());//默认发生时间
|
|
|
|
} |
|
|
|
|
|
|
|
//处理无桩号事件
|
|
|
|
//交通事故
|
|
|
|
if (eventType == 1 && dcEvent.getDcEventAccident().getFacilityId() != null) { |
|
|
@ -221,6 +225,9 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
dcEvent.getDcEventAccident().setId(uuid); |
|
|
|
|
|
|
|
int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident()); |
|
|
|
if (dcEvent.getEventState() ==1){ |
|
|
|
updateDcEventState(uuid,1);//直接确认
|
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
//车辆事故
|
|
|
@ -228,6 +235,9 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
if (dcEvent.getDcEventVehicleAccident() != null) { |
|
|
|
dcEvent.getDcEventVehicleAccident().setId(uuid); |
|
|
|
int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident()); |
|
|
|
if (dcEvent.getEventState() ==1){ |
|
|
|
updateDcEventState(uuid,1);//直接确认
|
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
//交通管制
|
|
|
@ -239,12 +249,13 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
if (dcEvent.getDcEventTrafficControl().getFacilityIds() == null) { |
|
|
|
dcEvent.getDcEventTrafficControl().setId(uuid); |
|
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
|
updateDcEventState(uuid,1);//直接确认
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
//事件处置页
|
|
|
|
if (dcEvent.getEventState() == 1 && dcEvent.getDcEventTrafficControl().getFacilityIds() == null) {//新增的数据不是收费站
|
|
|
|
updateDcEventState(dcEvent.getId(), 1); |
|
|
|
updateDcEventState(dcEvent.getId(), 1);//直接确认
|
|
|
|
dcEvent.getDcEventTrafficControl().setId(uuid); |
|
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
|
//查询事件
|
|
|
@ -264,7 +275,9 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
dcEvent1.setId(dcEventId);//事件id
|
|
|
|
if (dcEvent2.getEventType() != 3) { |
|
|
|
dcEvent1.setEventNature(1l);//首发事件
|
|
|
|
|
|
|
|
dcEvent1.setLinkId(dcEvent2.getLinkId() + "," + uuid);//关联管制事件id
|
|
|
|
|
|
|
|
dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质
|
|
|
|
} |
|
|
|
} |
|
|
@ -282,7 +295,11 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
dcEvent1.setId(dcEventId);//事件id
|
|
|
|
if (dcEvent2.getEventType() != 3) { |
|
|
|
dcEvent1.setEventNature(1l);//首发事件
|
|
|
|
if (dcEvent2.getLinkId()!=null) { |
|
|
|
dcEvent1.setLinkId(dcEvent2.getLinkId()+","+uuid);//关联管制事件id
|
|
|
|
}else { |
|
|
|
dcEvent1.setLinkId(uuid);//关联管制事件id
|
|
|
|
} |
|
|
|
dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质
|
|
|
|
|
|
|
|
} |
|
|
@ -298,6 +315,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
dcEvent.getDcEventTrafficControl().setId(uuid); |
|
|
|
dcEvent.getDcEventTrafficControl().setFacilityId(dcEvent.getDcEventTrafficControl().getFacilityIds()[0]);//取出数组字段赋值 设施id
|
|
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
|
updateDcEventState(uuid,1);//直接确认
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (dcEvent.getDcEventTrafficControl().getFacilityIds().length > 1) {//facilityIds1=1 说明只选择了多个收费站
|
|
|
@ -327,7 +346,11 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
a++; |
|
|
|
} |
|
|
|
String linkId2 = sb2.toString(); |
|
|
|
if (dcEvent2.getLinkId() !=null){ |
|
|
|
dcEvent1.setLinkId(dcEvent2.getLinkId()+","+linkId2);//关联管制事件id
|
|
|
|
}else { |
|
|
|
dcEvent1.setLinkId(linkId2);//关联管制事件id
|
|
|
|
} |
|
|
|
|
|
|
|
if (dcEvent2.getEventType() != 3) { |
|
|
|
dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质
|
|
|
@ -365,11 +388,13 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
String facilityId = String.valueOf(dcEvent.getDcEventTrafficControl().getFacilityIds()[i]); |
|
|
|
dcEvent.setStakeMark(extracted(facilityId)); |
|
|
|
} |
|
|
|
dcEvent.setOccurrenceTime(DateUtils.getNowDate());//默认发生时间
|
|
|
|
dcEventMapper.insertDcEvent(dcEvent); |
|
|
|
//首页事件 交通管制事件 添加 状态默认为 1 处置中
|
|
|
|
updateDcEventState(map.get("facilityId" + i), 1); |
|
|
|
|
|
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
|
updateDcEventState(map.get("facilityId" + i),1);//直接确认
|
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
@ -419,10 +444,12 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
dcEvent.setStakeMark(extracted(facilityId)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
dcEvent.setOccurrenceTime(DateUtils.getNowDate());//默认发生时间
|
|
|
|
dcEventMapper.insertDcEvent(dcEvent); |
|
|
|
extracted(dcEvent); |
|
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
|
updateDcEventState(map.get("facilityId" + i),1);//直接确认
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -436,6 +463,9 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
if (dcEvent.getDcEventTrafficCongestion() != null) { |
|
|
|
dcEvent.getDcEventTrafficCongestion().setId(uuid); |
|
|
|
int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion()); |
|
|
|
|
|
|
|
updateDcEventState(uuid,1);//直接确认
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
@ -450,6 +480,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
if (dcEvent.getDcEventConstruction() != null) { |
|
|
|
dcEvent.getDcEventConstruction().setId(uuid); |
|
|
|
int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction()); |
|
|
|
updateDcEventState(uuid,1);//直接确认
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
@ -458,6 +490,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
if (dcEvent.getDcEventServiceArea() != null) { |
|
|
|
dcEvent.getDcEventServiceArea().setId(uuid); |
|
|
|
int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea()); |
|
|
|
updateDcEventState(uuid,1);//直接确认
|
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
//设施设备隐患
|
|
|
@ -468,6 +502,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
if (dcEvent.getDcEventAbnormalWeather() != null) { |
|
|
|
dcEvent.getDcEventAbnormalWeather().setId(uuid); |
|
|
|
int i = dcEventAbnormalWeatherMapper.insertDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather()); |
|
|
|
updateDcEventState(uuid,1);//直接确认
|
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
//其他事件
|
|
|
@ -481,6 +517,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质
|
|
|
|
dcEvent.setEventNature(2l); |
|
|
|
dcEventMapper.updateDcEventLinkId(dcEvent);//修改 新添加的 事件性质
|
|
|
|
updateDcEventState(uuid,1);//直接确认
|
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
@ -783,6 +820,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
|
|
|
|
public int updateDcEvent(DcEvent dcEvent) { |
|
|
|
/* |
|
|
|
//事件类型校验
|
|
|
|