Browse Source

事件录入增加 是否确认,除交通事故,车辆故障外其他事件,录入后直接转为确认事件

develop
王兴琳 10 months ago
parent
commit
355d307189
  1. 27
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java

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

@ -221,6 +221,9 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
dcEvent.getDcEventAccident().setId(uuid); dcEvent.getDcEventAccident().setId(uuid);
int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident()); int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident());
if (dcEvent.getEventState() ==1){
updateDcEventState(uuid,1);//直接确认
}
} }
break; break;
//车辆事故 //车辆事故
@ -228,6 +231,9 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
if (dcEvent.getDcEventVehicleAccident() != null) { if (dcEvent.getDcEventVehicleAccident() != null) {
dcEvent.getDcEventVehicleAccident().setId(uuid); dcEvent.getDcEventVehicleAccident().setId(uuid);
int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident()); int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident());
if (dcEvent.getEventState() ==1){
updateDcEventState(uuid,1);//直接确认
}
} }
break; break;
//交通管制 //交通管制
@ -239,12 +245,13 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
if (dcEvent.getDcEventTrafficControl().getFacilityIds() == null) { if (dcEvent.getDcEventTrafficControl().getFacilityIds() == null) {
dcEvent.getDcEventTrafficControl().setId(uuid); dcEvent.getDcEventTrafficControl().setId(uuid);
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
updateDcEventState(uuid,1);//直接确认
break; break;
} }
} }
//事件处置页 //事件处置页
if (dcEvent.getEventState() == 1 && dcEvent.getDcEventTrafficControl().getFacilityIds() == null) {//新增的数据不是收费站 if (dcEvent.getEventState() == 1 && dcEvent.getDcEventTrafficControl().getFacilityIds() == null) {//新增的数据不是收费站
updateDcEventState(dcEvent.getId(), 1); updateDcEventState(dcEvent.getId(), 1);//直接确认
dcEvent.getDcEventTrafficControl().setId(uuid); dcEvent.getDcEventTrafficControl().setId(uuid);
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
//查询事件 //查询事件
@ -304,6 +311,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
dcEvent.getDcEventTrafficControl().setId(uuid); dcEvent.getDcEventTrafficControl().setId(uuid);
dcEvent.getDcEventTrafficControl().setFacilityId(dcEvent.getDcEventTrafficControl().getFacilityIds()[0]);//取出数组字段赋值 设施id dcEvent.getDcEventTrafficControl().setFacilityId(dcEvent.getDcEventTrafficControl().getFacilityIds()[0]);//取出数组字段赋值 设施id
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
updateDcEventState(uuid,1);//直接确认
} }
} else if (dcEvent.getDcEventTrafficControl().getFacilityIds().length > 1) {//facilityIds1=1 说明只选择了多个收费站 } else if (dcEvent.getDcEventTrafficControl().getFacilityIds().length > 1) {//facilityIds1=1 说明只选择了多个收费站
@ -333,7 +342,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
a++; a++;
} }
String linkId2 = sb2.toString(); String linkId2 = sb2.toString();
if (dcEvent2.getLinkId()!=null){ if (dcEvent2.getLinkId() !=null){
dcEvent1.setLinkId(dcEvent2.getLinkId()+","+linkId2);//关联管制事件id dcEvent1.setLinkId(dcEvent2.getLinkId()+","+linkId2);//关联管制事件id
}else { }else {
dcEvent1.setLinkId(linkId2);//关联管制事件id dcEvent1.setLinkId(linkId2);//关联管制事件id
@ -380,6 +389,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
updateDcEventState(map.get("facilityId" + i), 1); updateDcEventState(map.get("facilityId" + i), 1);
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
updateDcEventState(map.get("facilityId" + i),1);//直接确认
} }
} else { } else {
@ -433,6 +443,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
dcEventMapper.insertDcEvent(dcEvent); dcEventMapper.insertDcEvent(dcEvent);
extracted(dcEvent); extracted(dcEvent);
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
updateDcEventState(map.get("facilityId" + i),1);//直接确认
} }
} }
} }
@ -446,6 +458,9 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
if (dcEvent.getDcEventTrafficCongestion() != null) { if (dcEvent.getDcEventTrafficCongestion() != null) {
dcEvent.getDcEventTrafficCongestion().setId(uuid); dcEvent.getDcEventTrafficCongestion().setId(uuid);
int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion()); int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion());
updateDcEventState(uuid,1);//直接确认
} }
break; break;
@ -460,6 +475,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
if (dcEvent.getDcEventConstruction() != null) { if (dcEvent.getDcEventConstruction() != null) {
dcEvent.getDcEventConstruction().setId(uuid); dcEvent.getDcEventConstruction().setId(uuid);
int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction()); int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction());
updateDcEventState(uuid,1);//直接确认
} }
break; break;
@ -468,6 +485,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
if (dcEvent.getDcEventServiceArea() != null) { if (dcEvent.getDcEventServiceArea() != null) {
dcEvent.getDcEventServiceArea().setId(uuid); dcEvent.getDcEventServiceArea().setId(uuid);
int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea()); int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea());
updateDcEventState(uuid,1);//直接确认
} }
break; break;
//设施设备隐患 //设施设备隐患
@ -478,6 +497,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
if (dcEvent.getDcEventAbnormalWeather() != null) { if (dcEvent.getDcEventAbnormalWeather() != null) {
dcEvent.getDcEventAbnormalWeather().setId(uuid); dcEvent.getDcEventAbnormalWeather().setId(uuid);
int i = dcEventAbnormalWeatherMapper.insertDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather()); int i = dcEventAbnormalWeatherMapper.insertDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather());
updateDcEventState(uuid,1);//直接确认
} }
break; break;
//其他事件 //其他事件
@ -491,6 +512,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质
dcEvent.setEventNature(2l); dcEvent.setEventNature(2l);
dcEventMapper.updateDcEventLinkId(dcEvent);//修改 新添加的 事件性质 dcEventMapper.updateDcEventLinkId(dcEvent);//修改 新添加的 事件性质
updateDcEventState(uuid,1);//直接确认
} }
break; break;
@ -793,6 +815,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateDcEvent(DcEvent dcEvent) { public int updateDcEvent(DcEvent dcEvent) {
/* /*
//事件类型校验 //事件类型校验

Loading…
Cancel
Save