From 355d30718947a15fed4bcad8009ab14918cd908d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Fri, 31 May 2024 09:49:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=BD=95=E5=85=A5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20=E6=98=AF=E5=90=A6=E7=A1=AE=E8=AE=A4=EF=BC=8C?= =?UTF-8?q?=E9=99=A4=E4=BA=A4=E9=80=9A=E4=BA=8B=E6=95=85=EF=BC=8C=E8=BD=A6?= =?UTF-8?q?=E8=BE=86=E6=95=85=E9=9A=9C=E5=A4=96=E5=85=B6=E4=BB=96=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E5=BD=95=E5=85=A5=E5=90=8E=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E8=BD=AC=E4=B8=BA=E7=A1=AE=E8=AE=A4=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DcEventServiceImpl.java | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) 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) { /* //事件类型校验