|
@ -15,6 +15,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<result property="direction" column="direction"/> |
|
|
<result property="direction" column="direction"/> |
|
|
<result property="statisticalDate" column="statistical_date"/> |
|
|
<result property="statisticalDate" column="statistical_date"/> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
<resultMap type="map" id="trafficFlowStatisticsMap"> |
|
|
|
|
|
<result property="intervalName" column="interval_name"/> |
|
|
|
|
|
<result property="stakeMake" column="stake_make"/> |
|
|
|
|
|
<result property="endMake" column="end_make"/> |
|
|
|
|
|
<result property="facilityCode" column="facility_code"/> |
|
|
|
|
|
<result property="direction" column="direction"/> |
|
|
|
|
|
<result property="statisticalDate" column="statistical_date"/> |
|
|
|
|
|
<result property="facilityName" column="facility_name"/> |
|
|
|
|
|
<result property="trafficVolume" column="traffic_volume"/> |
|
|
|
|
|
<result property="periodType" column="period_type"/> |
|
|
|
|
|
</resultMap> |
|
|
<!-- 插入或更新交通路段数据 --> |
|
|
<!-- 插入或更新交通路段数据 --> |
|
|
<insert id="insertOrUpdate" parameterType="com.zc.business.domain.DcGantryStatisticsData"> |
|
|
<insert id="insertOrUpdate" parameterType="com.zc.business.domain.DcGantryStatisticsData"> |
|
|
INSERT INTO |
|
|
INSERT INTO |
|
@ -250,5 +261,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
AND dg.period_type = '5' |
|
|
AND dg.period_type = '5' |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="trafficFlowStatistics" resultMap="trafficFlowStatisticsMap" resultType="map" > |
|
|
|
|
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
i.interval_name, |
|
|
|
|
|
i.stake_make , |
|
|
|
|
|
i.end_make, |
|
|
|
|
|
ps.facility_code , |
|
|
|
|
|
ps.facility_name , |
|
|
|
|
|
ps.direction , |
|
|
|
|
|
dgsd.traffic_volume , |
|
|
|
|
|
dgsd.statistical_date, |
|
|
|
|
|
dgsd.period_type |
|
|
|
|
|
FROM |
|
|
|
|
|
( |
|
|
|
|
|
SELECT 'K054+394' AS stake_make, 'K059+289' AS end_make, '殷家林枢纽-大学城立交' AS interval_name UNION ALL |
|
|
|
|
|
SELECT 'K059+289', 'K072+847', '大学城立交-长清立交' UNION ALL |
|
|
|
|
|
SELECT 'K072+847', 'K083+835', '长清立交-松竹枢纽' UNION ALL |
|
|
|
|
|
SELECT 'K083+835', 'K086+499', '松竹枢纽-孝里立交' UNION ALL |
|
|
|
|
|
SELECT 'K086+499', 'K099+750', '孝里立交-平阴北立交' UNION ALL |
|
|
|
|
|
SELECT 'K099+750', 'K105+904', '平阴北立交-平阴立交' UNION ALL |
|
|
|
|
|
SELECT 'K105+904', 'K117+878', '平阴立交-孔村枢纽' UNION ALL |
|
|
|
|
|
SELECT 'K117+878', 'K126+233', '孔村枢纽-平阴南立交' UNION ALL |
|
|
|
|
|
SELECT 'K126+233', 'K145+933', '平阴南立交-东平立交' UNION ALL |
|
|
|
|
|
SELECT 'K145+933', 'K155+652', '东平立交-东平湖枢纽' UNION ALL |
|
|
|
|
|
SELECT 'K155+652', 'K173+950', '东平湖枢纽-梁山东立交' UNION ALL |
|
|
|
|
|
SELECT 'K173+950', 'K179+396', '梁山东立交-梁山立交' UNION ALL |
|
|
|
|
|
SELECT 'K179+396', 'K190+495', '梁山立交-嘉祥西立交' UNION ALL |
|
|
|
|
|
SELECT 'K190+495', 'K202+979', '嘉祥西立交' |
|
|
|
|
|
) AS i |
|
|
|
|
|
JOIN dc_facility AS ps |
|
|
|
|
|
ON ps.stake_mark BETWEEN CONCAT(i.stake_make, '+0') AND CONCAT(i.end_make, '+0') |
|
|
|
|
|
<if test="direction != null"> |
|
|
|
|
|
AND ps.direction = #{direction} |
|
|
|
|
|
</if> |
|
|
|
|
|
JOIN dc_gantry_statistics_data AS dgsd |
|
|
|
|
|
ON ps.facility_code = dgsd.gantry_code |
|
|
|
|
|
AND DATE(dgsd.statistical_date) BETWEEN #{startDate} AND #{endDate} |
|
|
|
|
|
<if test="periodType != null"> |
|
|
|
|
|
AND dgsd.period_type = #{periodType} |
|
|
|
|
|
</if> |
|
|
|
|
|
ORDER BY |
|
|
|
|
|
dgsd.statistical_date DESC; |
|
|
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
</mapper> |
|
|
</mapper> |
|
|