|
|
@ -27,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<result property="statisticalDate" column="statistical_date"/> |
|
|
<result property="statisticalDate" column="statistical_date"/> |
|
|
<result property="facilityName" column="facility_name"/> |
|
|
<result property="facilityName" column="facility_name"/> |
|
|
<result property="trafficVolume" column="traffic_volume"/> |
|
|
<result property="trafficVolume" column="traffic_volume"/> |
|
|
|
|
|
<result property="traffiVolumePlate" column="traffic_volume_plate"/> |
|
|
<result property="periodType" column="period_type"/> |
|
|
<result property="periodType" column="period_type"/> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
<resultMap type="com.zc.business.domain.TrafficFlowStatisticsMap" id="trafficFlowStatistics"> |
|
|
<resultMap type="com.zc.business.domain.TrafficFlowStatisticsMap" id="trafficFlowStatistics"> |
|
|
@ -280,15 +281,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="trafficFlowStatistics" resultMap="trafficFlowStatisticsMap" resultType="map" > |
|
|
<select id="trafficFlowStatistics" resultMap="trafficFlowStatisticsMap" resultType="map" > |
|
|
|
|
|
|
|
|
SELECT |
|
|
SELECT |
|
|
i.interval_name, |
|
|
i.interval_name, |
|
|
i.stake_make , |
|
|
i.stake_make, |
|
|
i.end_make, |
|
|
i.end_make, |
|
|
ps.facility_code , |
|
|
ps.facility_code, |
|
|
ps.facility_name , |
|
|
ps.facility_name, |
|
|
ps.direction , |
|
|
ps.direction, |
|
|
dgsd.traffic_volume , |
|
|
dgsd.traffic_volume AS traffic_volume, |
|
|
|
|
|
dvps.traffic_volume AS traffic_volume_plate, |
|
|
dgsd.statistical_date, |
|
|
dgsd.statistical_date, |
|
|
dgsd.period_type |
|
|
dgsd.period_type |
|
|
FROM |
|
|
FROM |
|
|
@ -310,21 +311,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
SELECT 'K182+987', 'K190+495', '信楼枢纽-嘉祥西立交' UNION ALL |
|
|
SELECT 'K182+987', 'K190+495', '信楼枢纽-嘉祥西立交' UNION ALL |
|
|
SELECT 'K190+495', 'K202+979', '嘉祥西立交-王官屯枢纽' |
|
|
SELECT 'K190+495', 'K202+979', '嘉祥西立交-王官屯枢纽' |
|
|
) AS i |
|
|
) AS i |
|
|
JOIN dc_facility AS ps |
|
|
JOIN dc_facility ps |
|
|
ON ps.stake_mark BETWEEN CONCAT(i.stake_make, '+0') AND CONCAT(i.end_make, '+0') |
|
|
ON ps.stake_mark BETWEEN CONCAT(i.stake_make, '+0') AND CONCAT(i.end_make, '+0') |
|
|
<if test="direction != null"> |
|
|
<if test="direction != null"> |
|
|
AND ps.direction = #{direction} |
|
|
AND ps.direction = #{direction} |
|
|
</if> |
|
|
</if> |
|
|
JOIN dc_gantry_statistics_data AS dgsd |
|
|
<if test="facilityName != null"> |
|
|
ON ps.facility_code = dgsd.gantry_code |
|
|
AND ps.facility_name = #{facilityName} |
|
|
<if test="startDate !=null"> |
|
|
|
|
|
AND DATE(dgsd.statistical_date) BETWEEN #{startDate} AND #{endDate} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="periodType != null"> |
|
|
|
|
|
AND dgsd.period_type = #{periodType} |
|
|
|
|
|
</if> |
|
|
</if> |
|
|
ORDER BY |
|
|
JOIN dc_gantry_statistics_data dgsd |
|
|
dgsd.statistical_date DESC |
|
|
ON ps.facility_code = dgsd.gantry_code |
|
|
|
|
|
LEFT JOIN dc_gantry_vehicle_plate_statistics dvps |
|
|
|
|
|
ON dvps.gantryid = dgsd.gantry_code |
|
|
|
|
|
AND dvps.statistical_date = dgsd.statistical_date |
|
|
|
|
|
AND dvps.period_type = dgsd.period_type |
|
|
|
|
|
<where> |
|
|
|
|
|
<if test="startDate != null"> |
|
|
|
|
|
AND DATE(dgsd.statistical_date) BETWEEN #{startDate} AND #{endDate} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="periodType != null"> |
|
|
|
|
|
AND dgsd.period_type = #{periodType} |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
|
|
|
ORDER BY dgsd.statistical_date DESC, i.stake_make |
|
|
</select> |
|
|
</select> |
|
|
<!-- 桩号升序排列--> |
|
|
<!-- 桩号升序排列--> |
|
|
<select id="trafficFlowStatisticsAsc" resultMap="trafficFlowStatistics" resultType="com.zc.business.domain.TrafficFlowStatisticsMap" > |
|
|
<select id="trafficFlowStatisticsAsc" resultMap="trafficFlowStatistics" resultType="com.zc.business.domain.TrafficFlowStatisticsMap" > |
|
|
|