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
95e80f36
Commit
95e80f36
authored
Jan 10, 2025
by
zhoushiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
场景事件数量输出调整
parent
93adae10
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
11 deletions
+21
-11
EventStatisticPo.java
...src/main/java/net/wanji/opt/po/base/EventStatisticPo.java
+5
-0
GreenwaveCrossTrendPo.java
...in/java/net/wanji/opt/po/trend/GreenwaveCrossTrendPo.java
+3
-3
EventServiceImpl.java
...ain/java/net/wanji/opt/service/impl/EventServiceImpl.java
+8
-3
GreenwaveHistProviderImpl.java
...net/wanji/opt/service/impl/GreenwaveHistProviderImpl.java
+3
-3
HoloEventMapper.xml
...ize-service/src/main/resources/mapper/HoloEventMapper.xml
+2
-2
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/po/base/EventStatisticPo.java
View file @
95e80f36
...
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import
io.swagger.models.auth.In
;
import
io.swagger.models.auth.In
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -33,11 +34,15 @@ public class EventStatisticPo {
...
@@ -33,11 +34,15 @@ public class EventStatisticPo {
private
String
timeAxis
;
private
String
timeAxis
;
@ApiModelProperty
(
value
=
"事件方向集合"
,
notes
=
""
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"事件方向集合"
,
notes
=
""
,
hidden
=
true
)
@JSONField
(
serialize
=
false
)
private
String
dirs
;
private
String
dirs
;
@ApiModelProperty
(
value
=
"每个方向发生的次数"
,
notes
=
""
)
@ApiModelProperty
(
value
=
"每个方向发生的次数"
,
notes
=
""
)
private
Map
<
String
,
Long
>
dirEventCount
;
private
Map
<
String
,
Long
>
dirEventCount
;
@ApiModelProperty
(
value
=
"每个方向发生的次数集合"
,
notes
=
""
)
private
List
<
Map
<
String
,
Object
>>
dirEventCountList
;
@ApiModelProperty
(
value
=
"进口道方向"
,
notes
=
""
)
@ApiModelProperty
(
value
=
"进口道方向"
,
notes
=
""
)
private
Map
<
String
,
String
>
dirWkt
;
private
Map
<
String
,
String
>
dirWkt
;
}
}
signal-optimize-service/src/main/java/net/wanji/opt/po/trend/GreenwaveCrossTrendPo.java
View file @
95e80f36
...
@@ -43,13 +43,13 @@ public class GreenwaveCrossTrendPo extends TrackableEntity {
...
@@ -43,13 +43,13 @@ public class GreenwaveCrossTrendPo extends TrackableEntity {
private
BigDecimal
cordFlow
;
private
BigDecimal
cordFlow
;
@ApiModelProperty
(
value
=
"非协调方向停车次数"
)
@ApiModelProperty
(
value
=
"非协调方向停车次数"
)
private
BigDecimal
unCordS
topTimes
;
private
BigDecimal
s
topTimes
;
@ApiModelProperty
(
value
=
"非协调方向排队(米)"
)
@ApiModelProperty
(
value
=
"非协调方向排队(米)"
)
private
BigDecimal
unCordQ
ueueLength
;
private
BigDecimal
q
ueueLength
;
@ApiModelProperty
(
value
=
"非协调方向流量"
)
@ApiModelProperty
(
value
=
"非协调方向流量"
)
private
BigDecimal
unCordF
low
;
private
BigDecimal
f
low
;
@ApiModelProperty
(
value
=
"开始时间:yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"开始时间:yyyy-MM-dd HH:mm:ss"
)
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/EventServiceImpl.java
View file @
95e80f36
...
@@ -120,19 +120,23 @@ public class EventServiceImpl implements EventService {
...
@@ -120,19 +120,23 @@ public class EventServiceImpl implements EventService {
if
(
po
!=
null
)
{
if
(
po
!=
null
)
{
String
dirs
=
po
.
getDirs
();
String
dirs
=
po
.
getDirs
();
Map
<
String
,
Long
>
countMap
=
null
;
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
if
(
Objects
.
nonNull
(
dirs
))
{
if
(
Objects
.
nonNull
(
dirs
))
{
String
[]
sps
=
dirs
.
split
(
","
);
String
[]
sps
=
dirs
.
split
(
","
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
//统计每个方向发生的次数
//统计每个方向发生的次数
Map
<
String
,
Long
>
countMap
=
Arrays
.
stream
(
sps
).
collect
(
Collectors
.
groupingBy
(
String:
:
valueOf
,
Collectors
.
counting
()));
countMap
=
Arrays
.
stream
(
sps
).
collect
(
Collectors
.
groupingBy
(
String:
:
valueOf
,
Collectors
.
counting
()));
countMap
.
entrySet
().
forEach
(
o
->
{
countMap
.
entrySet
().
forEach
(
o
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"dir"
,
o
.
getKey
());
map
.
put
(
"dir"
,
o
.
getKey
());
map
.
put
(
"count"
,
o
.
getValue
());
map
.
put
(
"count"
,
o
.
getValue
());
list
.
add
(
map
);
list
.
add
(
map
);
});
});
po
.
setDirEventCount
(
countMap
);
}
}
po
.
setDirEventCount
(
countMap
);
po
.
setDirEventCountList
(
list
);
QueryWrapper
<
BaseRidInfo
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
BaseRidInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"end_cross_id"
,
crossId
);
queryWrapper
.
eq
(
"end_cross_id"
,
crossId
);
...
@@ -145,6 +149,7 @@ public class EventServiceImpl implements EventService {
...
@@ -145,6 +149,7 @@ public class EventServiceImpl implements EventService {
group
.
forEach
((
k
,
v
)
->
{
group
.
forEach
((
k
,
v
)
->
{
dirWkt
.
put
(
k
,
v
.
get
(
0
));
dirWkt
.
put
(
k
,
v
.
get
(
0
));
});
});
po
.
setDirs
(
null
);
po
.
setDirWkt
(
dirWkt
);
po
.
setDirWkt
(
dirWkt
);
}
}
return
po
;
return
po
;
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/GreenwaveHistProviderImpl.java
View file @
95e80f36
...
@@ -181,9 +181,9 @@ public class GreenwaveHistProviderImpl extends BaseDubboInterfaceImpl<GreenwaveH
...
@@ -181,9 +181,9 @@ public class GreenwaveHistProviderImpl extends BaseDubboInterfaceImpl<GreenwaveH
String
flow
=
sps
[
3
];
String
flow
=
sps
[
3
];
if
(
Objects
.
equals
(
"1"
,
type
))
{
if
(
Objects
.
equals
(
"1"
,
type
))
{
//非协调方向
//非协调方向
po
.
set
UnCord
Flow
(
new
BigDecimal
(
flow
));
po
.
setFlow
(
new
BigDecimal
(
flow
));
po
.
set
UnCord
QueueLength
(
new
BigDecimal
(
queueLength
));
po
.
setQueueLength
(
new
BigDecimal
(
queueLength
));
po
.
set
UnCord
StopTimes
(
new
BigDecimal
(
stopTimes
));
po
.
setStopTimes
(
new
BigDecimal
(
stopTimes
));
}
else
if
(
Objects
.
equals
(
"2"
,
type
)){
}
else
if
(
Objects
.
equals
(
"2"
,
type
)){
//协调方向
//协调方向
po
.
setCordFlow
(
new
BigDecimal
(
flow
));
po
.
setCordFlow
(
new
BigDecimal
(
flow
));
...
...
signal-optimize-service/src/main/resources/mapper/HoloEventMapper.xml
View file @
95e80f36
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
<!-- 查看路口事件数量 -->
<!-- 查看路口事件数量 -->
<select
id=
"findCrossEventCount"
resultType=
"net.wanji.opt.po.base.EventStatisticPo"
>
<select
id=
"findCrossEventCount"
resultType=
"net.wanji.opt.po.base.EventStatisticPo"
>
select
type as event_type,count(*) event_count,group_concat(distinct
dir) dirs,b.label as event_type_desc
select
cross_id, type as event_type,count(*) event_count,group_concat(
dir) dirs,b.label as event_type_desc
from t_event_info a left join t_config_event_category b on a.type=b.event_type
from t_event_info a left join t_config_event_category b on a.type=b.event_type
where 1=1
where 1=1
<if
test=
"crossId !=null and crossId !=''"
>
<if
test=
"crossId !=null and crossId !=''"
>
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
<if
test=
"startDate!=null and endDate !=''"
>
<if
test=
"startDate!=null and endDate !=''"
>
and start_time > #{startDate} and start_time
<
#{endDate}
and start_time > #{startDate} and start_time
<
#{endDate}
</if>
</if>
GROUP BY type
GROUP BY
cross_id,
type
</select>
</select>
...
...
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