From 8cf981563d12cb19e74d9d4f49e24dc48c066ac6 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, 17 May 2024 11:06:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=84=9F=E7=9F=A5=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E8=BD=AC=E4=BA=A4=E9=80=9A=E4=BA=8B=E4=BB=B6=20=E5=AD=90?= =?UTF-8?q?=E7=B1=BB=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DcEventServiceImpl.java | 89 +++++++++++++------ .../service/impl/DcWarningServiceImpl.java | 2 + 2 files changed, 62 insertions(+), 29 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 f83a4235..99b4d8fc 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 @@ -454,34 +454,47 @@ public class DcEventServiceImpl extends ServiceImpl impl switch (eventType) { //交通事故 case 1: - if (dcEvent.getDcEventAccident() != null) { - dcEvent.getDcEventAccident().setId(uuid); - int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident()); - } - + /* if (dcEvent.getDcEventAccident() != null) { + + }*/ + dcEvent.getDcEventAccident().setId(uuid); + dcEvent.getDcEventAccident().setReporterName("视频AI"); + dcEvent.getDcEventAccident().setReporterPhoneNumber("96659"); + dcEvent.getDcEventAccident().setLocationType(1l);//高速主线 + int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident()); break; //车辆事故 case 2: - if (dcEvent.getDcEventVehicleAccident() != null) { - dcEvent.getDcEventVehicleAccident().setId(uuid); - int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident()); - } +/* if (dcEvent.getDcEventVehicleAccident() != null) { + }*/ + + dcEvent.getDcEventVehicleAccident().setReporterName("视频AI"); + dcEvent.getDcEventVehicleAccident().setReporterPhoneNumber("96659"); + dcEvent.getDcEventVehicleAccident().setLocationType(1l);//高速主线 + dcEvent.getDcEventVehicleAccident().setId(uuid); + int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident()); break; //交通管制 case 3: - if (dcEvent.getDcEventTrafficControl() != null) { - dcEvent.getDcEventTrafficControl().setId(uuid); - int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); - } +/* if (dcEvent.getDcEventTrafficControl() != null) { + + } */ + dcEvent.getDcEventTrafficControl().setControlType(1L);//限行 + dcEvent.getDcEventTrafficControl().setControlCause(2L);//交通事故 + dcEvent.getDcEventTrafficControl().setId(uuid); + int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); break; //交通拥堵 case 4: - if (dcEvent.getDcEventTrafficCongestion() != null) { - dcEvent.getDcEventTrafficCongestion().setId(uuid); - int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion()); - } +/* if (dcEvent.getDcEventTrafficCongestion() != null) { + + }*/ + dcEvent.getDcEventTrafficCongestion().setId(uuid); + dcEvent.getDcEventTrafficCongestion().setCongestionMileage(0F);//拥堵里程(公里) + dcEvent.getDcEventTrafficCongestion().setCongestionCause(5l);//拥堵原因1-车流量大 2-交通事故 3-恶劣天气 4-施工 5-其他 + int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion()); break; //非法上路 case 5: @@ -491,28 +504,33 @@ public class DcEventServiceImpl extends ServiceImpl impl break; //施工建设 case 7: - if (dcEvent.getDcEventConstruction() != null) { - dcEvent.getDcEventConstruction().setId(uuid); - int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction()); - } +/* if (dcEvent.getDcEventConstruction() != null) { + }*/ + dcEvent.getDcEventConstruction().setId(uuid); + dcEvent.getDcEventConstruction().setControlMode(1l);//封闭 + int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction()); break; //服务区异常 case 8: - if (dcEvent.getDcEventServiceArea() != null) { - dcEvent.getDcEventServiceArea().setId(uuid); - int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea()); - } +/* if (dcEvent.getDcEventServiceArea() != null) { + + }*/ + dcEvent.getDcEventServiceArea().setId(uuid); + int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea()); break; //设施设备隐患 case 9: break; //异常天气 case 10: - if (dcEvent.getDcEventAbnormalWeather() != null) { - dcEvent.getDcEventAbnormalWeather().setId(uuid); - int i = dcEventAbnormalWeatherMapper.insertDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather()); - } +/* if (dcEvent.getDcEventAbnormalWeather() != null) { + }*/ + 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; //其他事件 case 11: @@ -714,18 +732,24 @@ public class DcEventServiceImpl extends ServiceImpl impl switch (eventType) { //交通事故 case 1: + dcEvent.getDcEventAccident().setId(dcEvent.getId()); int i1 = dcEventAccidentMapper.updateDcEventAccident(dcEvent.getDcEventAccident()); break; //车辆事故 case 2: + dcEvent.getDcEventVehicleAccident().setId(dcEvent.getId()); int i5 = dcEventVehicleAccidentMapper.updateDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident()); break; //交通管制 case 3: + dcEvent.getDcEventTrafficControl().setId(dcEvent.getId()); + int i6 = dcEventTrafficControlMapper.updateDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); break; //交通拥堵 case 4: + dcEvent.getDcEventTrafficCongestion().setId(dcEvent.getId()); + int i4 = dcEventTrafficCongestionMapper.updateDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion()); break; @@ -737,10 +761,14 @@ public class DcEventServiceImpl extends ServiceImpl impl break; //施工建设 case 7: + dcEvent.getDcEventConstruction().setId(dcEvent.getId()); + int i2 = dcEventConstructionMapper.updateDcEventConstruction(dcEvent.getDcEventConstruction()); break; //服务区异常 case 8: + dcEvent.getDcEventServiceArea().setId(dcEvent.getId()); + int i3 = dcEventServiceAreaMapper.updateDcEventServiceArea(dcEvent.getDcEventServiceArea()); break; //设施设备隐患 @@ -748,7 +776,10 @@ public class DcEventServiceImpl extends ServiceImpl impl break; //异常天气 case 10: + dcEvent.getDcEventAbnormalWeather().setId(dcEvent.getId()); + int i = dcEventAbnormalWeatherMapper.updateDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather()); + System.out.println(i); break; //其他事件 case 11: diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java index 0004b57a..0aaeb2d9 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java +++ b/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.setUserId(SecurityUtils.getUserId());//处置人员 dcEvent.setRoadId(1L);//高速公路(济菏高速) + int insertDcEvent = dcEventService.insertDcEventWarning(dcEvent); + if (insertDcEvent==0){ return AjaxResult.error("操作失败"); }