diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java index 5451a5c4..c18beb37 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java @@ -221,6 +221,9 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEvent.getDcEventAccident().setId(uuid); int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident()); + if (dcEvent.getEventState() ==1){ + updateDcEventState(uuid,1);//直接确认 + } } break; //车辆事故 @@ -228,6 +231,9 @@ public class DcEventServiceImpl extends ServiceImpl 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 +245,13 @@ public class DcEventServiceImpl extends ServiceImpl 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()); //查询事件 @@ -304,6 +311,8 @@ public class DcEventServiceImpl extends ServiceImpl 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 说明只选择了多个收费站 @@ -333,7 +342,7 @@ public class DcEventServiceImpl extends ServiceImpl impl a++; } String linkId2 = sb2.toString(); - if (dcEvent2.getLinkId()!=null){ + if (dcEvent2.getLinkId() !=null){ dcEvent1.setLinkId(dcEvent2.getLinkId()+","+linkId2);//关联管制事件id }else { dcEvent1.setLinkId(linkId2);//关联管制事件id @@ -380,6 +389,7 @@ public class DcEventServiceImpl extends ServiceImpl impl updateDcEventState(map.get("facilityId" + i), 1); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); + updateDcEventState(map.get("facilityId" + i),1);//直接确认 } } else { @@ -433,6 +443,8 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEventMapper.insertDcEvent(dcEvent); extracted(dcEvent); int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); + updateDcEventState(map.get("facilityId" + i),1);//直接确认 + } } } @@ -446,6 +458,9 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventTrafficCongestion() != null) { dcEvent.getDcEventTrafficCongestion().setId(uuid); int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion()); + + updateDcEventState(uuid,1);//直接确认 + } break; @@ -460,6 +475,8 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventConstruction() != null) { dcEvent.getDcEventConstruction().setId(uuid); int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction()); + updateDcEventState(uuid,1);//直接确认 + } break; @@ -468,6 +485,8 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventServiceArea() != null) { dcEvent.getDcEventServiceArea().setId(uuid); int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea()); + updateDcEventState(uuid,1);//直接确认 + } break; //设施设备隐患 @@ -478,6 +497,8 @@ public class DcEventServiceImpl extends ServiceImpl impl if (dcEvent.getDcEventAbnormalWeather() != null) { dcEvent.getDcEventAbnormalWeather().setId(uuid); int i = dcEventAbnormalWeatherMapper.insertDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather()); + updateDcEventState(uuid,1);//直接确认 + } break; //其他事件 @@ -491,6 +512,7 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质 dcEvent.setEventNature(2l); dcEventMapper.updateDcEventLinkId(dcEvent);//修改 新添加的 事件性质 + updateDcEventState(uuid,1);//直接确认 } break; @@ -793,6 +815,7 @@ public class DcEventServiceImpl extends ServiceImpl impl * @return 结果 */ @Override + public int updateDcEvent(DcEvent dcEvent) { /* //事件类型校验