package com.stylefeng.guns.modular.system.controller.specialTrain;
|
|
import com.stylefeng.guns.core.base.controller.BaseController;
|
import com.stylefeng.guns.modular.system.response.*;
|
import com.stylefeng.guns.modular.system.service.TOrderStatisticsService;
|
import com.stylefeng.guns.modular.system.util.ResultUtil;
|
import lombok.AllArgsConstructor;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import java.util.List;
|
|
/**
|
* 订单相关统计,可视化数据
|
*
|
* @author Lux
|
* @version 1.0.0
|
* @since 2026/6/22 11:30
|
*/
|
@AllArgsConstructor
|
@Controller
|
@RequestMapping("/tOrderStatistics")
|
public class TOrderStatisticsController extends BaseController {
|
|
private final TOrderStatisticsService orderStatisticsService;
|
|
/**
|
* 年度趋势统计
|
*/
|
@ResponseBody
|
@RequestMapping(value = "/annualTrend", method = RequestMethod.GET)
|
public ResultUtil<List<TOrderStatisticsAnnualTrendVo>> annualTrend(String year) {
|
List<TOrderStatisticsAnnualTrendVo> annualTrendList = orderStatisticsService.annualTrendStatistics(year);
|
return ResultUtil.success(annualTrendList);
|
}
|
|
/**
|
* 总体订单统计
|
*/
|
@ResponseBody
|
@RequestMapping(value = "/totalOrder", method = RequestMethod.GET)
|
public ResultUtil<TOrderStatisticsTotalOrderVo> totalOrder(String startDate, String endDate) {
|
TOrderStatisticsTotalOrderVo totalOrderVo = orderStatisticsService.totalOrderStatistics(startDate, endDate);
|
return ResultUtil.success(totalOrderVo);
|
}
|
|
/**
|
* 新增乘客统计
|
*/
|
@ResponseBody
|
@RequestMapping(value = "/newAddPassenger", method = RequestMethod.GET)
|
public ResultUtil<List<TOrderStatisticsCountVo>> newAddPassenger(Integer type) {
|
List<TOrderStatisticsCountVo> countVos = orderStatisticsService.newAddPassengerStatistics(type);
|
return ResultUtil.success(countVos);
|
}
|
|
/**
|
* 订单量统计
|
*/
|
@ResponseBody
|
@RequestMapping(value = "/orderCount", method = RequestMethod.GET)
|
public ResultUtil<List<TOrderStatisticsCountVo>> orderCount(Integer type) {
|
List<TOrderStatisticsCountVo> countVos = orderStatisticsService.orderCountStatistics(type);
|
return ResultUtil.success(countVos);
|
}
|
|
/**
|
* 当日各时段统计
|
*/
|
@ResponseBody
|
@RequestMapping(value = "/orderDayHourCount", method = RequestMethod.GET)
|
public ResultUtil<List<TOrderStatisticsCountVo>> orderDayHourCount(Integer startHour, Integer endHour) {
|
List<TOrderStatisticsCountVo> countVos = orderStatisticsService.orderDayHourCount(startHour, endHour);
|
return ResultUtil.success(countVos);
|
}
|
|
/**
|
* 司机接单排名统计
|
*/
|
@ResponseBody
|
@RequestMapping(value = "/driverCar", method = RequestMethod.GET)
|
public ResultUtil<List<TOrderStatisticsCarVo>> driverCar(Integer type) {
|
List<TOrderStatisticsCarVo> countVos = orderStatisticsService.driverCarStatistics(type);
|
return ResultUtil.success(countVos);
|
}
|
|
/**
|
* 司机接单排名统计
|
*/
|
@ResponseBody
|
@RequestMapping(value = "/passenger", method = RequestMethod.GET)
|
public ResultUtil<List<TOrderStatisticsPassengerVo>> passenger(Integer type) {
|
List<TOrderStatisticsPassengerVo> countVos = orderStatisticsService.passengerStatistics(type);
|
return ResultUtil.success(countVos);
|
}
|
|
}
|