Commit c7771d16 authored by 黄伟铭's avatar 黄伟铭

历史干线预警数据添加干线方向,修正干线策略优化SQL,修正路口车道数据过滤获取

parent cb2d36ed
...@@ -31,5 +31,7 @@ public class StatisticsEventTypeCountTimeVO { ...@@ -31,5 +31,7 @@ public class StatisticsEventTypeCountTimeVO {
private Integer durationRate; private Integer durationRate;
@ApiModelProperty(value = "发生时间") @ApiModelProperty(value = "发生时间")
private String startTime; private String startTime;
@ApiModelProperty(value = "绿波带方向")
private String greenDir;
} }
...@@ -202,6 +202,7 @@ ...@@ -202,6 +202,7 @@
from t_base_lane_info t3 from t_base_lane_info t3
where 1 = 1 where 1 = 1
and t3.cross_id = #{crossID} and t3.cross_id = #{crossID}
and t3.type = 2
order by t3.dir,t3.turn order by t3.dir,t3.turn
</select> </select>
<select id="getCrossTypeInfo" parameterType="map" <select id="getCrossTypeInfo" parameterType="map"
......
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
<!-- 态势监测-事件告警-历史列表 --> <!-- 态势监测-事件告警-历史列表 -->
<select id="selectCrossGreenHistList" resultType="net.wanji.opt.vo2.StatisticsEventTypeCountTimeVO"> <select id="selectCrossGreenHistList" resultType="net.wanji.opt.vo2.StatisticsEventTypeCountTimeVO">
select t.name, t.id, t.type, t.wkt, t.duration, t.startTime, t.typeDesc select t.name, t.id, t.type, t.wkt, t.duration, t.startTime, t.typeDesc,t.greenDir
from from
( (
select distinct t1.name, t1.id, ifnull(t2.type, '708') type, t1.wkt, select distinct t1.name, t1.id, ifnull(t2.type, '708') type, t1.wkt,
...@@ -366,7 +366,8 @@ ...@@ -366,7 +366,8 @@
when t2.type = '705' then "干线缓行" when t2.type = '705' then "干线缓行"
when t2.type = '706' then "干线拥堵" when t2.type = '706' then "干线拥堵"
else "干线畅通" else "干线畅通"
end as typeDesc end as typeDesc,
case t1.green_dir when '3,7' then 'e2w' when '1,5' then 'n2s' end as greenDir
from t_greenwave_info t1 from t_greenwave_info t1
left join t_event_info t2 on t1.id = t2.green_id left join t_event_info t2 on t1.id = t2.green_id
and t2.type in ('705', '706') and t2.dt = curdate() and t2.type in ('705', '706') and t2.dt = curdate()
...@@ -380,7 +381,7 @@ ...@@ -380,7 +381,7 @@
when t2.type = '703' then "路口溢出" when t2.type = '703' then "路口溢出"
when t2.type = '707' then "路口拥堵" when t2.type = '707' then "路口拥堵"
else "路口畅通" else "路口畅通"
end as typeDesc end as typeDesc,'' as greenDir
from t_base_cross_info t1 from t_base_cross_info t1
left join t_event_info t2 on t1.id = t2.cross_id left join t_event_info t2 on t1.id = t2.cross_id
and t2.type in ('701', '702', '703', '707') and t2.dt = curdate() and t2.type in ('701', '702', '703', '707') and t2.dt = curdate()
......
...@@ -45,7 +45,10 @@ ...@@ -45,7 +45,10 @@
<select id="findPlanTime" parameterType="map" resultType="net.wanji.opt.vo2.TrunkLineOptTimeInfoVO"> <select id="findPlanTime" parameterType="map" resultType="net.wanji.opt.vo2.TrunkLineOptTimeInfoVO">
select DISTINCT DATE_FORMAT(a.control_time,'%H:%i') as optStartTime ,DATE_FORMAT(DATE_ADD(a.control_time, INTERVAL a.duration SECOND),'%H:%i') as optEndTime select DISTINCT DATE_FORMAT(a.control_time,'%H:%i') as optStartTime ,DATE_FORMAT(DATE_ADD(a.control_time, INTERVAL a.duration SECOND),'%H:%i') as optEndTime
from t_strategy_green_opt_hist a where DATE_FORMAT(a.control_time,'%Y-%m-%d') = DATE_FORMAT(#{date},'%Y-%m-%d') and a.response_code = 200 from t_strategy_green_opt_hist a
where DATE_FORMAT(a.control_time,'%Y-%m-%d') = DATE_FORMAT(#{date},'%Y-%m-%d')
and a.response_code = 200
and a.control_method = 1
and a.green_id = #{greenID} and a.green_id = #{greenID}
</select> </select>
......
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