diff --git a/zc-business/src/main/java/com/zc/business/domain/ComprehensiveIndexQuery.java b/zc-business/src/main/java/com/zc/business/domain/ComprehensiveIndexQuery.java index 7e7620a2..c0ef7b69 100644 --- a/zc-business/src/main/java/com/zc/business/domain/ComprehensiveIndexQuery.java +++ b/zc-business/src/main/java/com/zc/business/domain/ComprehensiveIndexQuery.java @@ -34,4 +34,6 @@ public class ComprehensiveIndexQuery { private Integer crowdingRate; private Integer periodType; private String startDate; + private String endDate; + } diff --git a/zc-business/src/main/resources/mapper/business/DcGantryMetricsStatisticsDataMapper.xml b/zc-business/src/main/resources/mapper/business/DcGantryMetricsStatisticsDataMapper.xml index 985a7ce4..1cc1f5ea 100644 --- a/zc-business/src/main/resources/mapper/business/DcGantryMetricsStatisticsDataMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcGantryMetricsStatisticsDataMapper.xml @@ -199,18 +199,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ON ps.facility_code = dgsd.gantry_code AND - YEAR(dgsd.statistical_date) = #{startDate} + YEAR(dgsd.statistical_date) = #{startDate} AND - DATE_FORMAT(dgsd.statistical_date, '%Y-%m') = #{startDate} + DATE_FORMAT(dgsd.statistical_date, '%Y-%m') = #{startDate} AND - - DATE(dgsd.statistical_date) = DATE(#{startDate}) + + dgsd.statistical_date BETWEEN DATE(#{startDate}) and DATE(#{endDate}) AND + + + DATE(dgsd.statistical_date) = DATE(#{startDate}) AND - DATE(dgsd.statistical_date) = DATE(#{startDate}) + DATE(dgsd.statistical_date) = DATE(#{startDate}) AND - AND dgsd.period_type = #{periodType} + + dgsd.period_type = #{periodType} ORDER BY dgsd.statistical_date DESC diff --git a/zc-business/src/main/resources/mapper/business/DcGantryStatisticsDataMapper.xml b/zc-business/src/main/resources/mapper/business/DcGantryStatisticsDataMapper.xml index b4c8a6e1..03a98a3a 100644 --- a/zc-business/src/main/resources/mapper/business/DcGantryStatisticsDataMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcGantryStatisticsDataMapper.xml @@ -328,7 +328,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" JOIN dc_gantry_statistics_data AS dgsd ON ps.facility_code = dgsd.gantry_code - AND DATE(dgsd.statistical_date) BETWEEN #{startDate} AND #{endDate} + + AND DATE(dgsd.statistical_date) BETWEEN #{startDate} AND #{endDate} + AND dgsd.period_type = #{periodType}