Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
signal
traffic-signal-platform
Commits
79450144
Commit
79450144
authored
Feb 07, 2025
by
zhoushiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL优化
parent
8fa379ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
GreenwaveHistMapper.xml
...service/src/main/resources/mapper/GreenwaveHistMapper.xml
+7
-1
No files found.
signal-optimize-service/src/main/resources/mapper/GreenwaveHistMapper.xml
View file @
79450144
...
...
@@ -260,6 +260,7 @@
round(AVG(queue_length)) avg_queue_length,
round(AVG(stop_times),2) stop_times,
round(AVG(delay_time),2) delay_time,
round(AVG(traffic_index),2) traffic_index,
round(AVG(sturation),4) sturation,
group_concat(service_level) service_level
FROM
...
...
@@ -282,6 +283,7 @@
null as lane_no,
null as turn_type,
null as service_level,
traffic_index,
</when>
<!-- 转向级 -->
<when
test=
"objectType==2"
>
...
...
@@ -289,6 +291,7 @@
t.turn_type,
null as lane_no,
null as service_level,
traffic_index,
</when>
<!-- 车道级 -->
<when
test=
"objectType==3"
>
...
...
@@ -296,6 +299,7 @@
t2.dir as dir_type,
t2.turn as turn_type,
null as service_level,
null as traffic_index,
</when>
<!-- 路口级 -->
<when
test=
"objectType==4"
>
...
...
@@ -303,6 +307,7 @@
null as dir_type,
null as turn_type,
ifnull(service_level,'A') service_level,
traffic_index,
</when>
<otherwise>
</otherwise>
...
...
@@ -339,7 +344,8 @@
and t.cross_id = #{crossId}
</if>
<if
test=
"startDate !=null and endDate !=null"
>
AND start_time >= #{startDate} and start_time
<
#{endDate}
<!-- AND start_time >= #{startDate} and start_time < #{endDate} -->
and batch_time between UNIX_TIMESTAMP(#{startDate}) and UNIX_TIMESTAMP(#{endDate})
</if>
) t
<choose>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment