| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -14,6 +14,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="saturationRate" column="saturation_rate"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="statisticalDate" column="statistical_date"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    </resultMap> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    <resultMap type="com.zc.business.domain.ComprehensiveIndexQuery" id="ComprehensiveIndexQuery" > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="facilityName" column="facility_name"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="intervalName" column="interval_name"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="direction" column="direction"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="stakeMake" column="stake_make"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="trafficCompositionRate" column="traffic_composition_rate"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="facilityName" column="facility_name"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="saturationRate" column="saturation_rate"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="statisticalDate" column="statistical_date"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="crowdingRate" column="crowding_rate"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <result property="facilityCode" column="facility_code"/> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    </resultMap> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    <!-- 插入或更新门架指标数据 --> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    <insert id="insertOrUpdate" parameterType="com.zc.business.domain.DcGantryMetricsStatisticsData"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        INSERT INTO | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -145,5 +157,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AND fa.direction = #{direction} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AND dg.period_type = #{periodType} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    </select> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    <select id="comprehensiveIndexQuery" resultMap="ComprehensiveIndexQuery" parameterType="com.zc.business.domain.ComprehensiveIndexQuery" > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        SELECT | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        i.interval_name, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        i.stake_make , | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        i.end_make, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ps.facility_code , | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ps.facility_name , | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ps.direction , | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        dgsd.saturation_rate as saturation_rate, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        dgsd.traffic_composition_rate as traffic_composition_rate, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        dgsd.statistical_date as statistical_date, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        dgsd.crowding_rate | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        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> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <if test="intervalName !=null"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AND i.interval_name=#{intervalName} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        JOIN dc_gantry_metrics_statistics_data AS dgsd | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ON ps.facility_code = dgsd.gantry_code | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AND | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <if test="periodType == 1"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            YEAR(dgsd.statistical_date) = #{startDate} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <if test="periodType == 3"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            DATE_FORMAT(dgsd.statistical_date, '%Y-%m') = #{startDate} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <if test="periodType == 4"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            DATE(dgsd.statistical_date) = DATE(#{startDate}) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <if test="periodType == 5"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            DATE(dgsd.statistical_date) = DATE(#{startDate}) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AND dgsd.period_type = #{periodType} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ORDER BY | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        dgsd.statistical_date DESC | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    </select> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					</mapper> | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					
  |