Commit e537c6a0 authored by duanruiming's avatar duanruiming

Merge remote-tracking branch 'origin/master'

parents 927788f3 acb62a59
......@@ -267,7 +267,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.average()
.orElse(0.0);
double round = (double) (Math.round(v));
vo.setValue(round);
vo.setValue(v);
} else if (Objects.equals(metricCode, StrategyAndMetricsEnum.Metrics.GREEN_LIGHT_EFFICIENCY.getCode())) {
double v = filteredList.stream()
.mapToDouble(CrossDataHistPOExt::getGreenLightEfficiency)
......@@ -400,7 +400,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.average()
.orElse(0.0);
double round = (double) (Math.round(v));
vo.setValue(round);
vo.setValue(v);
} else if (Objects.equals(metricCode, StrategyAndMetricsEnum.Metrics.GREEN_LIGHT_EFFICIENCY.getCode())) {
double v = filteredList.stream()
.mapToDouble(CrossDirDataHistPO::getGreenLightEfficiency)
......@@ -515,7 +515,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.average()
.orElse(0.0);
double round = (double) (Math.round(v));
vo.setValue(round);
vo.setValue(v);
} else if (Objects.equals(metricCode, StrategyAndMetricsEnum.Metrics.GREEN_LIGHT_EFFICIENCY.getCode())) {
double v = filteredList.stream()
.mapToDouble(CrossTurnDataHistPO::getGreenLightEfficiency)
......@@ -635,7 +635,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.average()
.orElse(0.0);
double round = (double) (Math.round(v));
vo.setValue(round);
vo.setValue(v);
} else if (Objects.equals(metricCode, StrategyAndMetricsEnum.Metrics.GREEN_LIGHT_EFFICIENCY.getCode())) {
double v = filteredList.stream()
.mapToDouble(CrossLaneDataHistPOExt::getGreenLightEfficiency)
......
......@@ -333,7 +333,7 @@
<select id="findGreenWaveRunState" resultType="net.wanji.opt.vo.GreenWaveRunStateVO">
select type as state,count(*) count,
SUM(TIMESTAMPDIFF(SECOND,start_time, end_time)) duration,
TIMESTAMPDIFF(SECOND,#{startDate}, #{endDate}) totalTime
TIMESTAMPDIFF(SECOND,#{startDate}, #{endDate}) total_time
from t_event_info t
where start_time > #{startDate} and start_time &lt; #{endDate}
<if test="eventTypeList!=null and eventTypeList.size>0">
......@@ -421,7 +421,7 @@
t1.lane_id,
t1.lane_no,
t1.turn as turn_type,
MIN(ifnull(t2.start_time,#{startDate})) start_time,
MIN(ifnull(t2.unit_time,#{startDate})) start_time,
SUM(t2.flow) flow,
round(AVG(t2.speed),2) speed,
MAX(t2.queue_length) max_queue_length,
......@@ -446,11 +446,11 @@
left join (
SELECT id as lane_id,cross_id,start_time,flow,speed,queue_length,stop_times,delay_time,sturation ,
(case
when #{groupType}=0 then CEIL(UNIX_TIMESTAMP(DATE_ADD(start_time,INTERVAL 5 MINUTE)))
when #{groupType}=1 then CEIL(UNIX_TIMESTAMP(DATE_ADD(start_time,INTERVAL 5 MINUTE)) / 900)
when #{groupType}=2 then CEIL(UNIX_TIMESTAMP(DATE_ADD(start_time,INTERVAL 5 MINUTE)) / 1800)
when #{groupType}=3 then CEIL(UNIX_TIMESTAMP(DATE_ADD(start_time,INTERVAL 5 MINUTE)) / 3600)
when #{groupType}=4 then CEIL(UNIX_TIMESTAMP(DATE_ADD(start_time,INTERVAL 5 MINUTE)) / (3600*24))
when #{groupType}=0 then start_time
when #{groupType}=1 then DATE_FORMAT(concat( date( start_time ), ' ', HOUR ( start_time ), ':', floor( MINUTE ( start_time ) / 15 ) * 15 ),'%Y-%m-%d %H:%i:00' )
when #{groupType}=2 then DATE_FORMAT(concat( date( start_time ), ' ', HOUR ( start_time ), ':', floor( MINUTE ( start_time ) / 30 ) * 30 ),'%Y-%m-%d %H:%i:00' )
when #{groupType}=3 then DATE_FORMAT(start_time,'%Y-%m-%d %H:00:00' )
when #{groupType}=4 then DATE_FORMAT(start_time,'%Y-%m-%d 00:00:00' )
end
) unit_time
from t_lane_data_hist
......
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