From 851d4aacc5d7bebdfddcd7d279a8136e34a5c261 Mon Sep 17 00:00:00 2001
From: yanderong <307678080@qq.com>
Date: 星期三, 24 六月 2026 14:01:57 +0800
Subject: [PATCH] feat: 可视化大屏统计bug修改,出行卡兑换返回金额
---
ManagementYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderStatisticsController.java | 80 +++++++++++++++++++++++++++++----------
1 files changed, 59 insertions(+), 21 deletions(-)
diff --git a/ManagementYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderStatisticsController.java b/ManagementYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderStatisticsController.java
index d114366..f04c904 100644
--- a/ManagementYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderStatisticsController.java
+++ b/ManagementYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderStatisticsController.java
@@ -1,10 +1,12 @@
package com.stylefeng.guns.modular.system.controller.specialTrain;
+import com.aliyun.oss.ServiceException;
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 lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -19,6 +21,7 @@
* @version 1.0.0
* @since 2026/6/22 11:30
*/
+@Slf4j
@AllArgsConstructor
@Controller
@RequestMapping("/tOrderStatistics")
@@ -31,9 +34,14 @@
*/
@ResponseBody
@RequestMapping(value = "/annualTrend", method = RequestMethod.GET)
- public ResultUtil<List<TOrderStatisticsAnnualTrendVo>> annualTrend(String year) {
- List<TOrderStatisticsAnnualTrendVo> annualTrendList = orderStatisticsService.annualTrendStatistics(year);
- return ResultUtil.success(annualTrendList);
+ public ResultUtil annualTrend(String year) {
+ try {
+ List<TOrderStatisticsAnnualTrendVo> annualTrendList = orderStatisticsService.annualTrendStatistics(year);
+ return ResultUtil.success(annualTrendList);
+ } catch (ServiceException e) {
+ log.error("可视化数据统计异常", e);
+ return ResultUtil.error(e.getErrorMessage());
+ }
}
/**
@@ -41,9 +49,14 @@
*/
@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);
+ public ResultUtil totalOrder(String startDate, String endDate) {
+ try {
+ TOrderStatisticsTotalOrderVo totalOrderVo = orderStatisticsService.totalOrderStatistics(startDate, endDate);
+ return ResultUtil.success(totalOrderVo);
+ } catch (ServiceException e) {
+ log.error("可视化数据统计异常", e);
+ return ResultUtil.error(e.getErrorMessage());
+ }
}
/**
@@ -51,9 +64,14 @@
*/
@ResponseBody
@RequestMapping(value = "/newAddPassenger", method = RequestMethod.GET)
- public ResultUtil<List<TOrderStatisticsCountVo>> newAddPassenger(Integer type) {
- List<TOrderStatisticsCountVo> countVos = orderStatisticsService.newAddPassengerStatistics(type);
- return ResultUtil.success(countVos);
+ public ResultUtil newAddPassenger(Integer type) {
+ try {
+ List<TOrderStatisticsCountVo> countVos = orderStatisticsService.newAddPassengerStatistics(type);
+ return ResultUtil.success(countVos);
+ } catch (ServiceException e) {
+ log.error("可视化数据统计异常", e);
+ return ResultUtil.error(e.getErrorMessage());
+ }
}
/**
@@ -61,9 +79,14 @@
*/
@ResponseBody
@RequestMapping(value = "/orderCount", method = RequestMethod.GET)
- public ResultUtil<List<TOrderStatisticsCountVo>> orderCount(Integer type) {
- List<TOrderStatisticsCountVo> countVos = orderStatisticsService.orderCountStatistics(type);
- return ResultUtil.success(countVos);
+ public ResultUtil orderCount(Integer type) {
+ try {
+ List<TOrderStatisticsCountVo> countVos = orderStatisticsService.orderCountStatistics(type);
+ return ResultUtil.success(countVos);
+ } catch (ServiceException e) {
+ log.error("可视化数据统计异常", e);
+ return ResultUtil.error(e.getErrorMessage());
+ }
}
/**
@@ -71,9 +94,14 @@
*/
@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);
+ public ResultUtil orderDayHourCount(Integer startHour, Integer endHour) {
+ try {
+ List<TOrderStatisticsCountVo> countVos = orderStatisticsService.orderDayHourCount(startHour, endHour);
+ return ResultUtil.success(countVos);
+ } catch (ServiceException e) {
+ log.error("可视化数据统计异常", e);
+ return ResultUtil.error(e.getErrorMessage());
+ }
}
/**
@@ -81,9 +109,14 @@
*/
@ResponseBody
@RequestMapping(value = "/driverCar", method = RequestMethod.GET)
- public ResultUtil<List<TOrderStatisticsCarVo>> driverCar(Integer type) {
- List<TOrderStatisticsCarVo> countVos = orderStatisticsService.driverCarStatistics(type);
- return ResultUtil.success(countVos);
+ public ResultUtil driverCar(Integer type) {
+ try {
+ List<TOrderStatisticsCarVo> countVos = orderStatisticsService.driverCarStatistics(type);
+ return ResultUtil.success(countVos);
+ } catch (ServiceException e) {
+ log.error("可视化数据统计异常", e);
+ return ResultUtil.error(e.getErrorMessage());
+ }
}
/**
@@ -91,9 +124,14 @@
*/
@ResponseBody
@RequestMapping(value = "/passenger", method = RequestMethod.GET)
- public ResultUtil<List<TOrderStatisticsPassengerVo>> passenger(Integer type) {
- List<TOrderStatisticsPassengerVo> countVos = orderStatisticsService.passengerStatistics(type);
- return ResultUtil.success(countVos);
+ public ResultUtil passenger(Integer type) {
+ try {
+ List<TOrderStatisticsPassengerVo> countVos = orderStatisticsService.passengerStatistics(type);
+ return ResultUtil.success(countVos);
+ } catch (ServiceException e) {
+ log.error("可视化数据统计异常", e);
+ return ResultUtil.error(e.getErrorMessage());
+ }
}
}
--
Gitblit v1.7.1