From 5519f679fd65b23613c03197d858c861fef9a62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Tue, 25 Jun 2024 10:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=85=A8=E9=83=A8=20?= =?UTF-8?q?=E8=83=BD=E8=A7=81=E5=BA=A6=E5=BC=82=E5=B8=B8=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcMeteorologicalDetectorController.java | 1 + .../business/controller/DcTrafficStatisticsController.java | 3 ++- .../business/mapper/DcTollStationStatisticsDataMapper.java | 5 ++++- .../service/IDcTollStationStatisticsDataService.java | 4 +++- .../service/impl/DcTollStationStatisticsDataImpl.java | 7 ++----- .../mapper/business/DcMeteorologicalDetectorDataMapper.xml | 6 ++++-- .../mapper/business/DcTollStationStatisticsDataMapper.xml | 2 +- 7 files changed, 17 insertions(+), 11 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcMeteorologicalDetectorController.java b/zc-business/src/main/java/com/zc/business/controller/DcMeteorologicalDetectorController.java index 2c9f2f16..d42b6691 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcMeteorologicalDetectorController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcMeteorologicalDetectorController.java @@ -51,6 +51,7 @@ public class DcMeteorologicalDetectorController extends BaseController { @GetMapping("/listVisibility") public TableDataInfo listVisibility(DcMeteorologicalDetectorData dcMeteorologicalDetectorData) { + startPage(); List list = dcMeteorologicalDetectorDataService.selectlistVisibility(dcMeteorologicalDetectorData); return getDataTable(list); } diff --git a/zc-business/src/main/java/com/zc/business/controller/DcTrafficStatisticsController.java b/zc-business/src/main/java/com/zc/business/controller/DcTrafficStatisticsController.java index 91e83aed..30e81ce8 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcTrafficStatisticsController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcTrafficStatisticsController.java @@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; import java.util.Map; +import java.util.Set; /** @@ -408,7 +409,7 @@ public AjaxResult trafficFlowAtTollStationEntrance(String startDate, String endD @ApiOperation("获取据库中收费站数数据") @GetMapping("/history/TollBoothStatistics") public AjaxResult TollBoothStatistics(String startDate,String accessType,String periodType) throws HttpException, IOException{ - List mapList = dcTollStationStatisticsDataService.TollBoothStatistics(startDate,accessType,periodType); + List> mapList = dcTollStationStatisticsDataService.TollBoothStatistics(startDate,accessType,periodType); // 将查询结果封装为成功响应并返回 return AjaxResult.success(mapList); } diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcTollStationStatisticsDataMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcTollStationStatisticsDataMapper.java index ad336882..83bbec5f 100644 --- a/zc-business/src/main/java/com/zc/business/mapper/DcTollStationStatisticsDataMapper.java +++ b/zc-business/src/main/java/com/zc/business/mapper/DcTollStationStatisticsDataMapper.java @@ -2,11 +2,14 @@ package com.zc.business.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.zc.business.domain.DcTollStationStatisticsData; +import com.zc.business.domain.DcTollStationStatisticsDataMap; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.Date; import java.util.List; +import java.util.Map; +import java.util.Set; /** * 这是一个接口的注释,用于描述收费站数据统计的Mapper。 @@ -32,6 +35,6 @@ public interface DcTollStationStatisticsDataMapper extends BaseMapper TollBoothStatistics(@Param("startDate") String startDate, @Param("accessType") String accessType, @Param("periodType") String periodType); + List> TollBoothStatistics(@Param("startDate") String startDate, @Param("accessType") String accessType, @Param("periodType") String periodType); } diff --git a/zc-business/src/main/java/com/zc/business/service/IDcTollStationStatisticsDataService.java b/zc-business/src/main/java/com/zc/business/service/IDcTollStationStatisticsDataService.java index 3a240ba7..95b630b6 100644 --- a/zc-business/src/main/java/com/zc/business/service/IDcTollStationStatisticsDataService.java +++ b/zc-business/src/main/java/com/zc/business/service/IDcTollStationStatisticsDataService.java @@ -3,8 +3,10 @@ package com.zc.business.service; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.extension.service.IService; import com.zc.business.domain.DcTollStationStatisticsData; +import com.zc.business.domain.DcTollStationStatisticsDataMap; import java.util.List; +import java.util.Map; /** * 收费站数据统计接口。该接口扩展了IService接口,用于对DcTollStationStatisticsData类型的实体进行数据库操作。 @@ -39,5 +41,5 @@ public interface IDcTollStationStatisticsDataService extends IService accumulatedFlow(DcTollStationStatisticsData request); - List TollBoothStatistics(String startDate, String accessType, String periodType); + List> TollBoothStatistics(String startDate, String accessType, String periodType); } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcTollStationStatisticsDataImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcTollStationStatisticsDataImpl.java index 2d89a62d..27aed6bb 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcTollStationStatisticsDataImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcTollStationStatisticsDataImpl.java @@ -25,10 +25,7 @@ import javax.annotation.PostConstruct; import javax.annotation.Resource; import java.time.LocalDate; import java.time.ZoneId; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -234,7 +231,7 @@ public class DcTollStationStatisticsDataImpl extends ServiceImpl TollBoothStatistics(String startDate, String accessType, String periodType) { + public List> TollBoothStatistics(String startDate, String accessType, String periodType) { return dcTollStationStatisticsDataMapper.TollBoothStatistics(startDate,accessType,periodType); } diff --git a/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml b/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml index a68051b1..c04132fe 100644 --- a/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml @@ -276,8 +276,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" m.visibility_type != 4 AND m.visibility_type = #{visibilityType} - AND DATE(m.create_time) = CURDATE() - +/* AND DATE(m.create_time) = CURDATE() +*/ + ORDER BY + m.create_time desc - SELECT fa.facility_name, fa.stake_mark,