|
|
|
@ -3,9 +3,7 @@ package com.ruoyi.database.controller;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
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.StringKit;
|
|
|
|
|
import com.ruoyi.database.domain.PeopleVehicleFlow;
|
|
|
|
|
import com.ruoyi.database.domain.PeopleVehicleHourFlow;
|
|
|
|
|
import com.ruoyi.database.service.PeopleVehicleHourFlowService;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
@ -49,7 +47,7 @@ public class PeopleVehicleHourFlowController extends BaseController {
|
|
|
|
|
queryFlow.setStatisticType(statistictype);
|
|
|
|
|
|
|
|
|
|
// 查询数据库
|
|
|
|
|
List<PeopleVehicleHourFlow> list = peopleVehicleHourFlowService.list(new QueryWrapper<>(queryFlow));
|
|
|
|
|
List<PeopleVehicleHourFlow> list = peopleVehicleHourFlowService.list(new QueryWrapper<>(queryFlow) .between("statistic_time", startDateTime, endDateTime)); // 添加日期范围条件
|
|
|
|
|
|
|
|
|
|
// 处理查询结果
|
|
|
|
|
Map<LocalDateTime, Long> hourlyCountsMap = new TreeMap<>();
|
|
|
|
@ -64,6 +62,7 @@ public class PeopleVehicleHourFlowController extends BaseController {
|
|
|
|
|
return AjaxResult.error("请求失败,请联系管理员");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// public AjaxResult list(PeopleVehicleHourFlow peopleVehicleHFlow) {
|
|
|
|
|
// try {
|
|
|
|
|
// // 创建一个 TreeMap 用于存储每天的数据量
|
|
|
|
|