|
@ -1,13 +1,5 @@ |
|
|
package com.zc.business.service.impl; |
|
|
package com.zc.business.service.impl; |
|
|
|
|
|
|
|
|
import java.awt.*; |
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
|
|
import com.ruoyi.common.core.page.PageDomain; |
|
|
|
|
|
import com.ruoyi.common.core.page.TableSupport; |
|
|
|
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
import com.ruoyi.common.utils.SecurityUtils; |
|
|
import com.ruoyi.common.utils.SecurityUtils; |
|
|
import com.ruoyi.common.utils.uuid.IdUtils; |
|
|
import com.ruoyi.common.utils.uuid.IdUtils; |
|
@ -20,6 +12,10 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 事件信息Service业务层处理 |
|
|
* 事件信息Service业务层处理 |
|
@ -29,8 +25,7 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
*/ |
|
|
*/ |
|
|
@Service |
|
|
@Service |
|
|
@Transactional |
|
|
@Transactional |
|
|
public class DcEventServiceImpl implements IDcEventService |
|
|
public class DcEventServiceImpl implements IDcEventService { |
|
|
{ |
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private DcEventMapper dcEventMapper; |
|
|
private DcEventMapper dcEventMapper; |
|
|
//异常天气
|
|
|
//异常天气
|
|
@ -66,7 +61,6 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper; |
|
|
private IMiddleDatabaseService middleDatabaseService; |
|
|
private IMiddleDatabaseService middleDatabaseService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 查询事件信息 |
|
|
* 查询事件信息 |
|
|
* |
|
|
* |
|
@ -74,8 +68,7 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper; |
|
|
* @return 事件信息 |
|
|
* @return 事件信息 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public DcEvent selectDcEventById( String id) |
|
|
public DcEvent selectDcEventById(String id) { |
|
|
{ |
|
|
|
|
|
DcEvent dcEvent = dcEventMapper.selectDcEventById(id); |
|
|
DcEvent dcEvent = dcEventMapper.selectDcEventById(id); |
|
|
|
|
|
|
|
|
List<DcProcessConfig> processConfigList = dcProcessConfigMapper.selectDcProcessConfigByEventType(Math.toIntExact(dcEvent.getEventType())); |
|
|
List<DcProcessConfig> processConfigList = dcProcessConfigMapper.selectDcProcessConfigByEventType(Math.toIntExact(dcEvent.getEventType())); |
|
@ -90,8 +83,7 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper; |
|
|
* @return 事件信息 |
|
|
* @return 事件信息 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public List<DcEvent> selectDcEventList(DcEvent dcEvent) |
|
|
public List<DcEvent> selectDcEventList(DcEvent dcEvent) { |
|
|
{ |
|
|
|
|
|
if (dcEvent.getStakeMark() != null) { |
|
|
if (dcEvent.getStakeMark() != null) { |
|
|
//处理URl地址栏获取参数+号消失
|
|
|
//处理URl地址栏获取参数+号消失
|
|
|
String replace = dcEvent.getStakeMark().replace(" ", "+"); |
|
|
String replace = dcEvent.getStakeMark().replace(" ", "+"); |
|
@ -120,8 +112,7 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper; |
|
|
* @return 结果 |
|
|
* @return 结果 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public int insertDcEvent(DcEvent dcEvent) |
|
|
public int insertDcEvent(DcEvent dcEvent) { |
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
//设置事件Id UUID无下划线格式32
|
|
|
//设置事件Id UUID无下划线格式32
|
|
|
String uuid = IdUtils.fastSimpleUUID(); |
|
|
String uuid = IdUtils.fastSimpleUUID(); |
|
@ -132,7 +123,6 @@ dcEvent.setDeptId(SecurityUtils.getDeptId()); |
|
|
//用户
|
|
|
//用户
|
|
|
dcEvent.setUserId(SecurityUtils.getUserId()); |
|
|
dcEvent.setUserId(SecurityUtils.getUserId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dcEvent.setCreateTime(DateUtils.getNowDate()); |
|
|
dcEvent.setCreateTime(DateUtils.getNowDate()); |
|
|
int i7 = dcEventMapper.insertDcEvent(dcEvent); |
|
|
int i7 = dcEventMapper.insertDcEvent(dcEvent); |
|
|
|
|
|
|
|
@ -147,23 +137,33 @@ dcEvent.setUserId(SecurityUtils.getUserId()); |
|
|
switch (eventType) { |
|
|
switch (eventType) { |
|
|
//交通事故
|
|
|
//交通事故
|
|
|
case 1: |
|
|
case 1: |
|
|
|
|
|
if (dcEvent.getDcEventAccident() != null) { |
|
|
dcEvent.getDcEventAccident().setId(uuid); |
|
|
dcEvent.getDcEventAccident().setId(uuid); |
|
|
int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident()); |
|
|
int i1 = dcEventAccidentMapper.insertDcEventAccident(dcEvent.getDcEventAccident()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
//车辆事故
|
|
|
//车辆事故
|
|
|
case 2: |
|
|
case 2: |
|
|
|
|
|
if (dcEvent.getDcEventVehicleAccident()!=null){ |
|
|
dcEvent.getDcEventVehicleAccident().setId(uuid); |
|
|
dcEvent.getDcEventVehicleAccident().setId(uuid); |
|
|
int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident()); |
|
|
int i5 = dcEventVehicleAccidentMapper.insertDcEventVehicleAccident(dcEvent.getDcEventVehicleAccident()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
//交通管制
|
|
|
//交通管制
|
|
|
case 3: |
|
|
case 3: |
|
|
|
|
|
if (dcEvent.getDcEventTrafficControl()!=null){ |
|
|
dcEvent.getDcEventTrafficControl().setId(uuid); |
|
|
dcEvent.getDcEventTrafficControl().setId(uuid); |
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl()); |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
//交通拥堵
|
|
|
//交通拥堵
|
|
|
case 4: |
|
|
case 4: |
|
|
|
|
|
if (dcEvent.getDcEventTrafficCongestion()!=null){ |
|
|
dcEvent.getDcEventTrafficCongestion().setId(uuid); |
|
|
dcEvent.getDcEventTrafficCongestion().setId(uuid); |
|
|
int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion()); |
|
|
int i4 = dcEventTrafficCongestionMapper.insertDcEventTrafficCongestion(dcEvent.getDcEventTrafficCongestion()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
//非法上路
|
|
|
//非法上路
|
|
@ -174,21 +174,28 @@ dcEvent.setUserId(SecurityUtils.getUserId()); |
|
|
break; |
|
|
break; |
|
|
//施工建设
|
|
|
//施工建设
|
|
|
case 7: |
|
|
case 7: |
|
|
|
|
|
if (dcEvent.getDcEventConstruction()!=null){ |
|
|
dcEvent.getDcEventConstruction().setId(uuid); |
|
|
dcEvent.getDcEventConstruction().setId(uuid); |
|
|
int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction()); |
|
|
int i2 = dcEventConstructionMapper.insertDcEventConstruction(dcEvent.getDcEventConstruction()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
//服务区异常
|
|
|
//服务区异常
|
|
|
case 8: |
|
|
case 8: |
|
|
|
|
|
if (dcEvent.getDcEventServiceArea()!=null){ |
|
|
dcEvent.getDcEventServiceArea().setId(uuid); |
|
|
dcEvent.getDcEventServiceArea().setId(uuid); |
|
|
int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea()); |
|
|
int i3 = dcEventServiceAreaMapper.insertDcEventServiceArea(dcEvent.getDcEventServiceArea()); |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
//设施设备隐患
|
|
|
//设施设备隐患
|
|
|
case 9: |
|
|
case 9: |
|
|
break; |
|
|
break; |
|
|
//异常天气
|
|
|
//异常天气
|
|
|
case 10: |
|
|
case 10: |
|
|
|
|
|
if (dcEvent.getDcEventAbnormalWeather()!=null){ |
|
|
dcEvent.getDcEventAbnormalWeather().setId(uuid); |
|
|
dcEvent.getDcEventAbnormalWeather().setId(uuid); |
|
|
int i = dcEventAbnormalWeatherMapper.insertDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather()); |
|
|
int i = dcEventAbnormalWeatherMapper.insertDcEventAbnormalWeather(dcEvent.getDcEventAbnormalWeather()); |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
//其他事件
|
|
|
//其他事件
|
|
|
case 11: |
|
|
case 11: |
|
@ -211,8 +218,7 @@ dcEvent.setUserId(SecurityUtils.getUserId()); |
|
|
* @return 结果 |
|
|
* @return 结果 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public int updateDcEvent(DcEvent dcEvent) |
|
|
public int updateDcEvent(DcEvent dcEvent) { |
|
|
{ |
|
|
|
|
|
dcEvent.setUpdateTime(DateUtils.getNowDate()); |
|
|
dcEvent.setUpdateTime(DateUtils.getNowDate()); |
|
|
int i7 = dcEventMapper.updateDcEvent(dcEvent); |
|
|
int i7 = dcEventMapper.updateDcEvent(dcEvent); |
|
|
if (i7 > 0) { |
|
|
if (i7 > 0) { |
|
@ -283,8 +289,7 @@ dcEvent.setUserId(SecurityUtils.getUserId()); |
|
|
* @return 结果 |
|
|
* @return 结果 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public int deleteDcEventByIds( int eventType,String[] ids) |
|
|
public int deleteDcEventByIds(int eventType, String[] ids) { |
|
|
{ |
|
|
|
|
|
int i7 = dcEventMapper.deleteDcEventByIds(ids); |
|
|
int i7 = dcEventMapper.deleteDcEventByIds(ids); |
|
|
if (i7 > 0) { |
|
|
if (i7 > 0) { |
|
|
switch (eventType) { |
|
|
switch (eventType) { |
|
@ -338,6 +343,7 @@ dcEvent.setUserId(SecurityUtils.getUserId()); |
|
|
return -1; |
|
|
return -1; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 删除事件信息信息 |
|
|
* 删除事件信息信息 |
|
|
* |
|
|
* |
|
@ -345,12 +351,12 @@ dcEvent.setUserId(SecurityUtils.getUserId()); |
|
|
* @return 结果 |
|
|
* @return 结果 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public int deleteDcEventById(String id) |
|
|
public int deleteDcEventById(String id) { |
|
|
{ |
|
|
|
|
|
return dcEventMapper.deleteDcEventById(id); |
|
|
return dcEventMapper.deleteDcEventById(id); |
|
|
} |
|
|
} |
|
|
/**调度记录-事件列表 按时间展示交通事件。默认当天时间 。可查询条件 交通事件状态 ,时间范围 |
|
|
|
|
|
* |
|
|
/** |
|
|
|
|
|
* 调度记录-事件列表 按时间展示交通事件。默认当天时间 。可查询条件 交通事件状态 ,时间范围 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public List<DcEvent> selectDispatchEventList(DcEvent dcEvent) { |
|
|
public List<DcEvent> selectDispatchEventList(DcEvent dcEvent) { |
|
@ -359,6 +365,7 @@ dcEvent.setUserId(SecurityUtils.getUserId()); |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取事件以及子类详细信息 |
|
|
* 获取事件以及子类详细信息 |
|
|
|
|
|
* |
|
|
* @param eventType |
|
|
* @param eventType |
|
|
* @param id |
|
|
* @param id |
|
|
* @return |
|
|
* @return |
|
|