Browse Source

高速云导出

develop
王兴琳 2 months ago
parent
commit
6052f2fb29
  1. 13
      zc-business/src/main/java/com/zc/business/controller/DcSdhsEventController.java
  2. 9
      zc-business/src/main/java/com/zc/business/mapper/DcSdhsEventMapper.java
  3. 4
      zc-business/src/main/java/com/zc/business/service/IDcSdhsEventService.java
  4. 1089
      zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java
  5. 4
      zc-business/src/main/java/com/zc/business/service/impl/DcTrafficStatisticsServiceImpl.java
  6. 17
      zc-business/src/main/resources/mapper/business/DcSdhsEventMapper.xml
  7. BIN
      zc-business/src/main/resources/wordTemplate/accidentModelAnalysis.docx
  8. BIN
      zc-business/src/main/resources/wordTemplate/frameDataAnalysis.docx
  9. BIN
      zc-business/src/main/resources/wordTemplate/tollGateEntrance.docx

13
zc-business/src/main/java/com/zc/business/controller/DcSdhsEventController.java

@ -4,6 +4,7 @@ import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.zc.business.domain.DcSdhsEvent;
import com.zc.business.domain.DcSdhsEventQuery;
@ -258,6 +259,9 @@ public class DcSdhsEventController extends BaseController {
@PostMapping("/accidentTimeAnalysis")
@ApiOperation("事故时间分析")
public AjaxResult accidentTimeAnalysis(@RequestBody DcSdhsEventQuery dcSdhsEventQuery){
if (StringUtils.isEmpty(dcSdhsEventQuery.getType()) || StringUtils.isEmpty(dcSdhsEventQuery.getThisTime()) || StringUtils.isEmpty(dcSdhsEventQuery.getLastTime())){
return AjaxResult.error("参数错误");
}
return AjaxResult.success( dcSdhsEventService.accidentTimeAnalysis(dcSdhsEventQuery));
}
/**
@ -268,6 +272,9 @@ public class DcSdhsEventController extends BaseController {
@PostMapping("/accidentModelAnalysis")
@ApiOperation("事故车型分析")
public AjaxResult accidentModelAnalysis(@RequestBody DcSdhsEventQuery dcSdhsEventQuery){
if (StringUtils.isEmpty(dcSdhsEventQuery.getType()) || StringUtils.isEmpty(dcSdhsEventQuery.getThisTime()) || StringUtils.isEmpty(dcSdhsEventQuery.getLastTime())){
return AjaxResult.error("参数错误");
}
return AjaxResult.success( dcSdhsEventService.accidentModelAnalysis(dcSdhsEventQuery));
} /**
* 收费站出入口分析
@ -277,6 +284,9 @@ public class DcSdhsEventController extends BaseController {
@PostMapping("/TollBoothStatisticsList")
@ApiOperation("收费站出入口分析")
public AjaxResult TollBoothStatisticsList(@RequestBody DcSdhsEventQuery dcSdhsEventQuery){
if (StringUtils.isEmpty(dcSdhsEventQuery.getType()) || StringUtils.isEmpty(dcSdhsEventQuery.getThisTime()) || StringUtils.isEmpty(dcSdhsEventQuery.getLastTime())){
return AjaxResult.error("参数错误");
}
return AjaxResult.success( dcSdhsEventService.TollBoothStatisticsList(dcSdhsEventQuery));
}
@ -288,6 +298,9 @@ public class DcSdhsEventController extends BaseController {
@PostMapping("/gantryAnalysis")
@ApiOperation("门架分析")
public AjaxResult gantryAnalysis(@RequestBody DcSdhsEventQuery dcSdhsEventQuery){
if (StringUtils.isEmpty(dcSdhsEventQuery.getType()) || StringUtils.isEmpty(dcSdhsEventQuery.getThisTime()) || StringUtils.isEmpty(dcSdhsEventQuery.getLastTime())){
return AjaxResult.error("参数错误");
}
return AjaxResult.success( dcSdhsEventService.trafficFlowStatistics(dcSdhsEventQuery));
}

9
zc-business/src/main/java/com/zc/business/mapper/DcSdhsEventMapper.java

@ -84,4 +84,13 @@ public interface DcSdhsEventMapper
List<String> getDataCalendar(@Param("month") String month);
/**
* 查询事故模型分析
*
* @param type 事故类型
* @param time 时间范围
* @return 事故模型分析事件列表
*/
List<DcSdhsEvent> selectAccidentModelAnalysis(@Param("type") String type, @Param("time") String time);
}

4
zc-business/src/main/java/com/zc/business/service/IDcSdhsEventService.java

@ -59,14 +59,14 @@ public interface IDcSdhsEventService
* @param dcSdhsEventQuery
* @return
*/
Map<String, Map<String, Integer>> accidentModelAnalysis(DcSdhsEventQuery dcSdhsEventQuery);
Map<String, Map<String, Map<String, Integer>>> accidentModelAnalysis(DcSdhsEventQuery dcSdhsEventQuery);
/**
* 事故时间分析
* @param dcSdhsEventQuery
* @return
*/
Map<String, Long> accidentTimeAnalysis(DcSdhsEventQuery dcSdhsEventQuery);
Map<String, Map<String, Long>> accidentTimeAnalysis(DcSdhsEventQuery dcSdhsEventQuery);
/**
* 事故时间

1089
zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java

File diff suppressed because it is too large

4
zc-business/src/main/java/com/zc/business/service/impl/DcTrafficStatisticsServiceImpl.java

@ -1245,8 +1245,8 @@ public class DcTrafficStatisticsServiceImpl implements IDcTrafficStatisticsServi
.filter(device -> device.getFacilitiesType() .equals("1"))
.filter(device -> {
int deviceStakeMarkMeters = StakeMarkUtils.stakeMarkToInt(device.getStakeMark());
//return deviceStakeMarkMeters >= StakeMarkUtils.stakeMarkToInt("K111+107") && deviceStakeMarkMeters <= StakeMarkUtils.stakeMarkToInt("K132+577") ;
return deviceStakeMarkMeters >= StakeMarkUtils.stakeMarkToInt(stakeMark) && deviceStakeMarkMeters <= StakeMarkUtils.stakeMarkToInt(jsonObject.get("endMark").toString()) ;
return deviceStakeMarkMeters >= StakeMarkUtils.stakeMarkToInt("K111+107") && deviceStakeMarkMeters <= StakeMarkUtils.stakeMarkToInt("K132+577") ;
// return deviceStakeMarkMeters >= StakeMarkUtils.stakeMarkToInt(stakeMark) && deviceStakeMarkMeters <= StakeMarkUtils.stakeMarkToInt(jsonObject.get("endMark").toString()) ;
})
.sorted(Comparator.comparingInt(device -> StakeMarkUtils.stakeMarkToInt(device.getStakeMark())))
.collect(Collectors.toList());

17
zc-business/src/main/resources/mapper/business/DcSdhsEventMapper.xml

@ -259,4 +259,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from dc_sdhs_event
where start_time >= #{startTime} and start_time &lt;= #{endTime}
</delete>
<select id="selectAccidentModelAnalysis" resultType="com.zc.business.domain.DcSdhsEvent">
SELECT * FROM `dc_sdhs_event`
<where>
event_type = '交通事故'
<if test="type != null and type == '0'.toString">
and DATE_FORMAT(start_time,'%Y') = #{time}
</if>
<if test="type != null and type == '1'.toString">
and DATE_FORMAT(start_time,'%Y-%m') = #{time}
</if>
<if test="type != null and type == '2'.toString">
and DATE_FORMAT(start_time,'%Y-%m-%d') = #{time}
</if>
</where>
</select>
</mapper>

BIN
zc-business/src/main/resources/wordTemplate/accidentModelAnalysis.docx

Binary file not shown.

BIN
zc-business/src/main/resources/wordTemplate/frameDataAnalysis.docx

Binary file not shown.

BIN
zc-business/src/main/resources/wordTemplate/tollGateEntrance.docx

Binary file not shown.
Loading…
Cancel
Save