Commit 0f4a62a6 authored by 黄伟铭's avatar 黄伟铭

新增干线平峰分析

parent a8a4aaf9
......@@ -15,6 +15,6 @@ public interface AnalysisGreenCongestionPeriodMapper {
List<laneDataHist> selectGreenTrafficThreshold(@Param("date") String date,@Param("greenId") String greenId,@Param("roadDirection") String roadDirection);
List<laneDataHist> selectCrossFlow(@Param("date") String date,@Param("crossId") String crossId,@Param("startTime") String startTime,@Param("endTime") String endTime);
void insertLaneDataHist(Map<String, Object> map);
List<laneDataHist> selectPeakDetail(@Param("date") String date);
List<AnalysisGreenCongestionPeriodVO> selectListByWeek(@Param("yearWeek") Integer yearWeek);
}
......@@ -29,4 +29,8 @@ public class laneDataHist {
private Integer flowHour;
@ApiModelProperty(value = "干线道路方向")
private String roadDirection;
@ApiModelProperty(value = "结束时间")
private String endTime;
@ApiModelProperty(value = "高峰类型")
private String peakType;
}
......@@ -23,5 +23,7 @@ public class AnalysisGreenCongestionPeriodWeekTask {
@Scheduled(cron = "0 0 2 ? * 1")
public void task() throws ParseException {
analysisGreenCongestionPeriodService.selectCountByCongestionPeriod();
analysisGreenCongestionPeriodService.selectCountByLandData();
}
}
......@@ -18,6 +18,8 @@
<result column="turn" property="turn"/>
<result column="traffic_index" property="trafficIndex"/>
<result column="flow" property="flow"/>
<result column="endTime" property="endTime"/>
<result column="peak_type" property="peakType"/>
</resultMap>
<select id="selectGreenDataHist" parameterType="String" resultMap="AnalysisGreenCongestionPeriodMap">
......@@ -85,7 +87,14 @@
where DATE_FORMAT(a.start_time,'%Y-%m-%d %H:%i:00') between DATE_FORMAT(#{startTime},'%Y-%m-%d %H:%i:%s') and DATE_FORMAT(DATE_SUB(#{endTime},INTERVAL 5 MINUTE),'%Y-%m-%d %H:%i:%s')
and a.green_id = #{greenId}
and a.road_direction = #{roadDirection}
</insert>
<select id="selectPeakDetail" parameterType="String" resultMap="AnalysisLaneDataHistMap">
select t.green_id,t1.key_cross_id as cross_id, t.road_direction,t.peak_start_time as start_time,t.peak_end_time as endTime ,t.traffic_index,t.peak_type
from t_analysis_green_wave_peak_detail t
left join t_greenwave_key_cross_lane t1 on t1.green_id = t.green_id
where t.peak_start_time BETWEEN DATE_FORMAT(#{date},'%Y-%m-%d 00:00:00') and DATE_FORMAT(#{date},'%Y-%m-%d 23:59:59')
order by t.green_id,t1.key_cross_id ,t.road_direction,t.peak_type,t.traffic_index desc
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment