|
|
@ -2,6 +2,7 @@ package com.zc.business.service.impl; |
|
|
|
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult; |
|
|
|
import com.ruoyi.common.utils.StakeMarkUtils; |
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
|
import com.zc.business.domain.DcEvent; |
|
|
|
import com.zc.business.domain.DcEventType; |
|
|
|
import com.zc.business.mapper.DcTrafficIncidentsMapper; |
|
|
@ -15,6 +16,7 @@ import java.math.RoundingMode; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.time.Year; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 交通事件统计Service业务层处理 |
|
|
@ -352,16 +354,29 @@ public class DcTrafficIncidentsServiceImpl implements IDcTrafficIncidentsService |
|
|
|
* @Description 路网管控-事件管控分析-收费站统计分析table |
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult |
|
|
|
* @author liuwenge |
|
|
|
* @param searchType 查询条件 |
|
|
|
* @param facilityIdList 站点id |
|
|
|
* @param controlType 类型(1:封闭,2:限行) |
|
|
|
* @param startTime 开始时间 |
|
|
|
* @param endTime 结束时间 |
|
|
|
* @date 2024/1/15 17:31 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public AjaxResult selectTollStationAnalysis(String controlType,String startTime,String endTime){ |
|
|
|
public AjaxResult selectTollStationAnalysis(String searchType,String[] facilityIdList,String controlType,String startTime,String endTime){ |
|
|
|
|
|
|
|
//站点
|
|
|
|
if ("1".equals(searchType)){ |
|
|
|
List<Map<String,Object>> list = trafficIncidentsMapper.selectTollStationAnalysisByFacility(facilityIdList,startTime,endTime); |
|
|
|
return AjaxResult.success(list); |
|
|
|
|
|
|
|
} else { |
|
|
|
//原因
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(controlType)){ |
|
|
|
return AjaxResult.error("请选择事件类型"); |
|
|
|
} |
|
|
|
//目标时段
|
|
|
|
List<Map<String,Object>> list = trafficIncidentsMapper.selectTollStationAnalysis(controlType,startTime,endTime); |
|
|
|
List<Map<String,Object>> list = trafficIncidentsMapper.selectTollStationAnalysis(facilityIdList,controlType,startTime,endTime); |
|
|
|
BigDecimal allNum = BigDecimal.ZERO; |
|
|
|
BigDecimal allTime = BigDecimal.ZERO; |
|
|
|
for (Map<String, Object> data : list) { |
|
|
@ -401,7 +416,7 @@ public class DcTrafficIncidentsServiceImpl implements IDcTrafficIncidentsService |
|
|
|
cal.add(Calendar.YEAR,-1); |
|
|
|
String lastEndTime = dateFormat.format(cal.getTime()); |
|
|
|
|
|
|
|
List<Map<String,Object>> lastList = trafficIncidentsMapper.selectTollStationAnalysis(controlType,lastStartTime,lastEndTime); |
|
|
|
List<Map<String,Object>> lastList = trafficIncidentsMapper.selectTollStationAnalysis(facilityIdList,controlType,lastStartTime,lastEndTime); |
|
|
|
BigDecimal lastAllNum = BigDecimal.ZERO; |
|
|
|
BigDecimal lastAllTime = BigDecimal.ZERO; |
|
|
|
|
|
|
@ -458,6 +473,11 @@ public class DcTrafficIncidentsServiceImpl implements IDcTrafficIncidentsService |
|
|
|
return AjaxResult.success(list); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private String customKey(Map<String,Object> map){ |
|
|
|
return map.get("facilityId").toString(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 路网管控-事件管控分析-收费站统计分析echarts(当月) |
|
|
|