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
114ff730
Commit
114ff730
authored
Apr 18, 2025
by
duwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql调整
parent
6489a092
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
CrossDirDataHistMapper.xml
...abus/src/main/resources/mapper/CrossDirDataHistMapper.xml
+1
-1
CrossTurnDataHistMapper.xml
...bus/src/main/resources/mapper/CrossTurnDataHistMapper.xml
+12
-10
No files found.
wj-databus/src/main/resources/mapper/CrossDirDataHistMapper.xml
View file @
114ff730
This diff is collapsed.
Click to expand it.
wj-databus/src/main/resources/mapper/CrossTurnDataHistMapper.xml
View file @
114ff730
...
@@ -81,8 +81,8 @@
...
@@ -81,8 +81,8 @@
<select
id=
"selectByCrossIdTurn"
resultType=
"net.wanji.databus.vo.CrossTurnDataHistVO"
>
<select
id=
"selectByCrossIdTurn"
resultType=
"net.wanji.databus.vo.CrossTurnDataHistVO"
>
SELECT
SELECT
t1.cross_id AS crossId,
t1.cross_id AS crossId,
t
1
.in_dir AS inDir,
t
2
.in_dir AS inDir,
t
1
.turn_type AS turnType,
t
2
.turn_type AS turnType,
<choose>
<choose>
<!-- 小时 -->
<!-- 小时 -->
...
@@ -117,20 +117,22 @@
...
@@ -117,20 +117,22 @@
FROM
FROM
t_base_cross_turn_info t1
t_base_cross_turn_info t1
LEFT JOIN t_cross_turn_data_hist t2 ON t1.cross_id = t2.cross_id
LEFT JOIN t_cross_turn_data_hist t2 ON t1.cross_id = t2.cross_id
and t1.in_dir = t2.in_dir
and t1.turn_type = t2.turn_type
WHERE
WHERE
1 = 1
1 = 1
<if
test=
"crossId != null"
>
<if
test=
"crossId != null"
>
AND t
1
.cross_id = #{crossId}
AND t
2
.cross_id = #{crossId}
</if>
</if>
<if
test=
"inDirList != null"
>
<if
test=
"inDirList != null"
>
AND t
1
.in_dir IN
AND t
2
.in_dir IN
<foreach
item=
"inDir"
index=
"index"
collection=
"inDirList"
<foreach
item=
"inDir"
index=
"index"
collection=
"inDirList"
open=
"("
separator=
","
close=
")"
>
open=
"("
separator=
","
close=
")"
>
#{inDir}
#{inDir}
</foreach>
</foreach>
</if>
</if>
<if
test=
"turnTypeList != null"
>
<if
test=
"turnTypeList != null"
>
AND t
1
.turn_type IN
AND t
2
.turn_type IN
<foreach
item=
"turnType"
index=
"index"
collection=
"turnTypeList"
<foreach
item=
"turnType"
index=
"index"
collection=
"turnTypeList"
open=
"("
separator=
","
close=
")"
>
open=
"("
separator=
","
close=
")"
>
#{turnType}
#{turnType}
...
@@ -140,13 +142,13 @@
...
@@ -140,13 +142,13 @@
and t2.start_time
<![CDATA[ <= ]]>
#{endStamp}
and t2.start_time
<![CDATA[ <= ]]>
#{endStamp}
GROUP BY
GROUP BY
t1.cross_id,
t1.cross_id,
t
1
.in_dir,
t
2
.in_dir,
t
1
.turn_type,
t
2
.turn_type,
startTime
startTime
ORDER BY
ORDER BY
t2.start_t
ime asc,
startT
ime asc,
t
1
.in_dir,
t
2
.in_dir,
t
1
.turn_type
t
2
.turn_type
</select>
</select>
<select
id=
"selectMetricHistDTO"
resultType=
"net.wanji.databus.dto.MetricHistDTO"
>
<select
id=
"selectMetricHistDTO"
resultType=
"net.wanji.databus.dto.MetricHistDTO"
>
...
...
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