Browse Source

展示全部 能见度异常信息

develop
王兴琳 5 months ago
parent
commit
5519f679fd
  1. 1
      zc-business/src/main/java/com/zc/business/controller/DcMeteorologicalDetectorController.java
  2. 3
      zc-business/src/main/java/com/zc/business/controller/DcTrafficStatisticsController.java
  3. 5
      zc-business/src/main/java/com/zc/business/mapper/DcTollStationStatisticsDataMapper.java
  4. 4
      zc-business/src/main/java/com/zc/business/service/IDcTollStationStatisticsDataService.java
  5. 7
      zc-business/src/main/java/com/zc/business/service/impl/DcTollStationStatisticsDataImpl.java
  6. 6
      zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml
  7. 2
      zc-business/src/main/resources/mapper/business/DcTollStationStatisticsDataMapper.xml

1
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<DcMeteorologicalDetectorData> list = dcMeteorologicalDetectorDataService.selectlistVisibility(dcMeteorologicalDetectorData);
return getDataTable(list);
}

3
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<DcTollStationStatisticsData> mapList = dcTollStationStatisticsDataService.TollBoothStatistics(startDate,accessType,periodType);
List<Map<String, String>> mapList = dcTollStationStatisticsDataService.TollBoothStatistics(startDate,accessType,periodType);
// 将查询结果封装为成功响应并返回
return AjaxResult.success(mapList);
}

5
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<DcTollStat
*/
Date getMaxStatisticalDate();
List<DcTollStationStatisticsData> TollBoothStatistics(@Param("startDate") String startDate, @Param("accessType") String accessType, @Param("periodType") String periodType);
List<Map<String, String>> TollBoothStatistics(@Param("startDate") String startDate, @Param("accessType") String accessType, @Param("periodType") String periodType);
}

4
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<DcTollStat
*/
List<DcTollStationStatisticsData> accumulatedFlow(DcTollStationStatisticsData request);
List<DcTollStationStatisticsData> TollBoothStatistics(String startDate, String accessType, String periodType);
List<Map<String, String>> TollBoothStatistics(String startDate, String accessType, String periodType);
}

7
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<DcTollStationSt
}
@Override
public List<DcTollStationStatisticsData> TollBoothStatistics(String startDate, String accessType, String periodType) {
public List<Map<String, String>> TollBoothStatistics(String startDate, String accessType, String periodType) {
return dcTollStationStatisticsDataMapper.TollBoothStatistics(startDate,accessType,periodType);
}

6
zc-business/src/main/resources/mapper/business/DcMeteorologicalDetectorDataMapper.xml

@ -276,8 +276,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
m.visibility_type != 4
<if test="visibilityType != null and visibilityType != ''">AND m.visibility_type = #{visibilityType}</if>
AND DATE(m.create_time) = CURDATE()
</where>
/* AND DATE(m.create_time) = CURDATE()
*/ </where>
ORDER BY
m.create_time desc
</select>
<select id="selectStatisticsDay" resultMap="countMap" resultType="map">
WITH RECURSIVE dates_in_month AS (

2
zc-business/src/main/resources/mapper/business/DcTollStationStatisticsDataMapper.xml

@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="TollBoothStatistics" parameterType="string" resultType="DcTollStationStatisticsDataMap" >
<select id="TollBoothStatistics" parameterType="string" resultType="com.zc.business.domain.DcTollStationStatisticsDataMap" >
SELECT
fa.facility_name,
fa.stake_mark,

Loading…
Cancel
Save