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
jinan
traffic-signal-platform
Commits
93b08e28
Commit
93b08e28
authored
Apr 28, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 干线绿波事件统计返回优化添加方向
parent
75173da9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
TrendServiceV2Impl.java
...va/net/wanji/opt/servicev2/implv2/TrendServiceV2Impl.java
+10
-1
HoloEventMapper.xml
...ize-service/src/main/resources/mapper/HoloEventMapper.xml
+1
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/servicev2/implv2/TrendServiceV2Impl.java
View file @
93b08e28
...
@@ -28,6 +28,7 @@ import net.wanji.opt.cache.BaseCrossInfoCache;
...
@@ -28,6 +28,7 @@ import net.wanji.opt.cache.BaseCrossInfoCache;
import
net.wanji.opt.common.RedisUtils
;
import
net.wanji.opt.common.RedisUtils
;
import
net.wanji.opt.common.enums.EventInfoTypeEnum
;
import
net.wanji.opt.common.enums.EventInfoTypeEnum
;
import
net.wanji.opt.common.enums.GreenBeltDirEnum
;
import
net.wanji.opt.common.enums.GreenBeltDirEnum
;
import
net.wanji.opt.common.enums.GreenWaveInDirEnum
;
import
net.wanji.opt.dao.mapper.*
;
import
net.wanji.opt.dao.mapper.*
;
import
net.wanji.opt.dto.GreenBeltChartDTO
;
import
net.wanji.opt.dto.GreenBeltChartDTO
;
import
net.wanji.opt.entity.GreenChartSchemeHist
;
import
net.wanji.opt.entity.GreenChartSchemeHist
;
...
@@ -46,6 +47,7 @@ import org.springframework.util.CollectionUtils;
...
@@ -46,6 +47,7 @@ import org.springframework.util.CollectionUtils;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.nio.charset.StandardCharsets
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CopyOnWriteArrayList
;
import
java.util.concurrent.CopyOnWriteArrayList
;
...
@@ -357,8 +359,15 @@ public class TrendServiceV2Impl implements TrendServiceV2 {
...
@@ -357,8 +359,15 @@ public class TrendServiceV2Impl implements TrendServiceV2 {
double
durationRate
=
durationOffset
/
last
.
getDuration
();
double
durationRate
=
durationOffset
/
last
.
getDuration
();
result
.
setCountRate
((
int
)
(
Math
.
round
(
countRate
*
100
)
));
result
.
setCountRate
((
int
)
(
Math
.
round
(
countRate
*
100
)
));
result
.
setDurationRate
((
int
)
(
Math
.
round
(
durationRate
*
100
)
));
result
.
setDurationRate
((
int
)
(
Math
.
round
(
durationRate
*
100
)
));
String
greenDir
=
result
.
getGreenDir
();
StringBuilder
stringBuilder
=
new
StringBuilder
();
if
(!
StringUtils
.
isEmpty
(
greenDir
))
{
for
(
String
dir
:
greenDir
.
split
(
","
))
{
stringBuilder
.
append
(
GreenBeltDirEnum
.
getCode
(
Integer
.
valueOf
(
dir
))).
append
(
","
);
}
}
result
.
setGreenDir
(
stringBuilder
.
toString
());
}
}
}
}
});
});
}
}
...
...
signal-optimize-service/src/main/resources/mapper/HoloEventMapper.xml
View file @
93b08e28
...
@@ -317,7 +317,7 @@
...
@@ -317,7 +317,7 @@
select t1.id, t1.name, t1.wkt, t2.type, ifnull(t2.count, 0) as count, ifnull(t2.duration, 0) as duration,
select t1.id, t1.name, t1.wkt, t2.type, ifnull(t2.count, 0) as count, ifnull(t2.duration, 0) as duration,
case when t2.type = '705' then '缓行次数'
case when t2.type = '705' then '缓行次数'
when t2.type = '706' then '拥堵次数'
when t2.type = '706' then '拥堵次数'
end as typeDesc
end as typeDesc
, t1.green_dir, t1.start_time
from
from
t_greenwave_info t1
t_greenwave_info t1
left join (
left join (
...
...
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