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
aaffe893
Commit
aaffe893
authored
Mar 14, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 态势监测-事件告警-历史列表
parent
16424f62
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
5 deletions
+65
-5
TrendControllerV2.java
...in/java/net/wanji/opt/controllerv2/TrendControllerV2.java
+24
-5
HoloEventMapper.java
...c/main/java/net/wanji/opt/dao/mapper/HoloEventMapper.java
+6
-0
TrendServiceV2.java
...src/main/java/net/wanji/opt/servicev2/TrendServiceV2.java
+4
-0
TrendServiceV2Impl.java
...va/net/wanji/opt/servicev2/implv2/TrendServiceV2Impl.java
+9
-0
HoloEventMapper.xml
...ize-service/src/main/resources/mapper/HoloEventMapper.xml
+22
-0
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controllerv2/TrendControllerV2.java
View file @
aaffe893
package
net
.
wanji
.
opt
.
controllerv2
;
package
net
.
wanji
.
opt
.
controllerv2
;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponse
;
...
@@ -57,6 +58,7 @@ public class TrendControllerV2 {
...
@@ -57,6 +58,7 @@ public class TrendControllerV2 {
try
{
try
{
list
=
trendServiceV2
.
crossOptInfoList
();
list
=
trendServiceV2
.
crossOptInfoList
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"态势监测-区域体检-路口列表:{}"
,
e
);
JsonViewObject
.
newInstance
().
success
(
list
);
JsonViewObject
.
newInstance
().
success
(
list
);
}
}
return
JsonViewObject
.
newInstance
().
success
(
list
);
return
JsonViewObject
.
newInstance
().
success
(
list
);
...
@@ -74,6 +76,7 @@ public class TrendControllerV2 {
...
@@ -74,6 +76,7 @@ public class TrendControllerV2 {
try
{
try
{
list
=
trendServiceV2
.
greenOptInfoList
();
list
=
trendServiceV2
.
greenOptInfoList
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"态势监测-区域体检-绿波列表"
,
e
);
JsonViewObject
.
newInstance
().
success
(
list
);
JsonViewObject
.
newInstance
().
success
(
list
);
}
}
return
JsonViewObject
.
newInstance
().
success
(
list
);
return
JsonViewObject
.
newInstance
().
success
(
list
);
...
@@ -153,7 +156,7 @@ public class TrendControllerV2 {
...
@@ -153,7 +156,7 @@ public class TrendControllerV2 {
return
JsonViewObject
.
newInstance
().
success
(
list
);
return
JsonViewObject
.
newInstance
().
success
(
list
);
}
}
@ApiOperation
(
value
=
"态势监测-区域体检-雷达图绿波
事件事件类型过滤"
,
notes
=
"态势监测-区域体检-雷达图绿波事件事件
类型过滤"
,
@ApiOperation
(
value
=
"态势监测-区域体检-雷达图绿波
类型过滤"
,
notes
=
"态势监测-区域体检-雷达图绿波
类型过滤"
,
response
=
JsonViewObject
.
class
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/selectGreenEventTypeCountTimeList"
,
@PostMapping
(
value
=
"/selectGreenEventTypeCountTimeList"
,
...
@@ -166,13 +169,13 @@ public class TrendControllerV2 {
...
@@ -166,13 +169,13 @@ public class TrendControllerV2 {
try
{
try
{
list
=
trendServiceV2
.
selectGreenEventTypeCountTimeList
(
vo
);
list
=
trendServiceV2
.
selectGreenEventTypeCountTimeList
(
vo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"态势监测-
事件告警-实时列表
:"
,
e
);
log
.
error
(
"态势监测-
区域体检-雷达图绿波类型过滤
:"
,
e
);
JsonViewObject
.
newInstance
().
success
(
list
);
JsonViewObject
.
newInstance
().
success
(
list
);
}
}
return
JsonViewObject
.
newInstance
().
success
(
list
);
return
JsonViewObject
.
newInstance
().
success
(
list
);
}
}
@ApiOperation
(
value
=
"态势监测-区域体检-雷达图路口
事件事件类型过滤"
,
notes
=
"态势监测-区域体检-雷达图路口事件事件
类型过滤"
,
@ApiOperation
(
value
=
"态势监测-区域体检-雷达图路口
类型过滤"
,
notes
=
"态势监测-区域体检-雷达图路口
类型过滤"
,
response
=
JsonViewObject
.
class
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/selectCrossEventTypeCountTimeList"
,
@PostMapping
(
value
=
"/selectCrossEventTypeCountTimeList"
,
...
@@ -185,11 +188,27 @@ public class TrendControllerV2 {
...
@@ -185,11 +188,27 @@ public class TrendControllerV2 {
try
{
try
{
list
=
trendServiceV2
.
selectCrossEventTypeCountTimeList
(
vo
);
list
=
trendServiceV2
.
selectCrossEventTypeCountTimeList
(
vo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"态势监测-
事件告警-实时列表
:"
,
e
);
log
.
error
(
"态势监测-
区域体检-雷达图路口类型过滤
:"
,
e
);
JsonViewObject
.
newInstance
().
success
(
list
);
JsonViewObject
.
newInstance
().
success
(
list
);
}
}
return
JsonViewObject
.
newInstance
().
success
(
list
);
return
JsonViewObject
.
newInstance
().
success
(
list
);
}
}
@ApiOperation
(
value
=
"态势监测-事件告警-历史列表"
,
notes
=
"态势监测-事件告警-历史列表"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@GetMapping
(
value
=
"/eventAlarmHistList"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
OptMonitoringVO
.
class
),
})
public
JsonViewObject
eventAlarmHistList
(
int
pageNo
,
int
pageSize
)
throws
Exception
{
PageInfo
<
StatisticsEventTypeCountTimeVO
>
results
=
new
PageInfo
<>();
try
{
results
=
trendServiceV2
.
selectCrossGreenHistList
(
pageNo
,
pageSize
);
}
catch
(
Exception
e
)
{
log
.
error
(
"态势监测-事件告警-历史列表:"
,
e
);
JsonViewObject
.
newInstance
().
success
(
results
);
}
return
JsonViewObject
.
newInstance
().
success
(
results
);
}
}
}
\ No newline at end of file
signal-optimize-service/src/main/java/net/wanji/opt/dao/mapper/HoloEventMapper.java
View file @
aaffe893
...
@@ -96,4 +96,10 @@ public interface HoloEventMapper extends BaseMapper<HoloEventInfoPO> {
...
@@ -96,4 +96,10 @@ public interface HoloEventMapper extends BaseMapper<HoloEventInfoPO> {
List
<
StatisticsEventTypeCountTimeVO
>
selectCrossEventTypeCountTimeList
(
@Param
(
"type"
)
String
type
,
List
<
StatisticsEventTypeCountTimeVO
>
selectCrossEventTypeCountTimeList
(
@Param
(
"type"
)
String
type
,
@Param
(
"startTime"
)
LocalDateTime
startTime
,
@Param
(
"startTime"
)
LocalDateTime
startTime
,
@Param
(
"endTime"
)
LocalDateTime
endTime
);
@Param
(
"endTime"
)
LocalDateTime
endTime
);
/**
* 态势监测-事件告警-历史列表
* @return
*/
List
<
StatisticsEventTypeCountTimeVO
>
selectCrossGreenHistList
();
}
}
signal-optimize-service/src/main/java/net/wanji/opt/servicev2/TrendServiceV2.java
View file @
aaffe893
package
net
.
wanji
.
opt
.
servicev2
;
package
net
.
wanji
.
opt
.
servicev2
;
import
com.github.pagehelper.PageInfo
;
import
net.wanji.opt.vo2.*
;
import
net.wanji.opt.vo2.*
;
import
java.util.List
;
import
java.util.List
;
...
@@ -25,4 +26,7 @@ public interface TrendServiceV2 {
...
@@ -25,4 +26,7 @@ public interface TrendServiceV2 {
List
<
StatisticsEventTypeCountTimeVO
>
selectGreenEventTypeCountTimeList
(
EventTypeCountTimeVO
vo
)
throws
Exception
;
List
<
StatisticsEventTypeCountTimeVO
>
selectGreenEventTypeCountTimeList
(
EventTypeCountTimeVO
vo
)
throws
Exception
;
List
<
StatisticsEventTypeCountTimeVO
>
selectCrossEventTypeCountTimeList
(
EventTypeCountTimeVO
vo
)
throws
Exception
;
List
<
StatisticsEventTypeCountTimeVO
>
selectCrossEventTypeCountTimeList
(
EventTypeCountTimeVO
vo
)
throws
Exception
;
PageInfo
<
StatisticsEventTypeCountTimeVO
>
selectCrossGreenHistList
(
int
pageNo
,
int
pageSize
)
throws
Exception
;
}
}
\ No newline at end of file
signal-optimize-service/src/main/java/net/wanji/opt/servicev2/implv2/TrendServiceV2Impl.java
View file @
aaffe893
package
net
.
wanji
.
opt
.
servicev2
.
implv2
;
package
net
.
wanji
.
opt
.
servicev2
.
implv2
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.common.utils.tool.DateUtil
;
import
net.wanji.common.utils.tool.DateUtil
;
import
net.wanji.databus.dao.entity.GreenwaveHistPO
;
import
net.wanji.databus.dao.entity.GreenwaveHistPO
;
...
@@ -294,4 +296,11 @@ public class TrendServiceV2Impl implements TrendServiceV2 {
...
@@ -294,4 +296,11 @@ public class TrendServiceV2Impl implements TrendServiceV2 {
setCountDurationRate
(
currentList
,
lastDayList
);
setCountDurationRate
(
currentList
,
lastDayList
);
return
currentList
;
return
currentList
;
}
}
@Override
public
PageInfo
<
StatisticsEventTypeCountTimeVO
>
selectCrossGreenHistList
(
int
pageNo
,
int
pageSize
)
throws
Exception
{
PageHelper
.
startPage
(
pageNo
,
pageSize
);
List
<
StatisticsEventTypeCountTimeVO
>
results
=
holoEventMapper
.
selectCrossGreenHistList
();
return
new
PageInfo
<>(
results
);
}
}
}
\ No newline at end of file
signal-optimize-service/src/main/resources/mapper/HoloEventMapper.xml
View file @
aaffe893
...
@@ -319,4 +319,26 @@
...
@@ -319,4 +319,26 @@
order by duration desc
order by duration desc
</select>
</select>
<!-- 态势监测-事件告警-历史列表 -->
<select
id=
"selectCrossGreenHistList"
resultType=
"net.wanji.opt.vo2.StatisticsEventTypeCountTimeVO"
>
select t.name, t.id, t.type, t.wkt, t.duration, t.startTime
from
(
select distinct t1.name, t1.id, ifnull(t2.type, '708') type, t1.wkt,
ifnull(TIMESTAMPDIFF(SECOND, t2.start_time, ifnull(t2.end_time,now())), 0) duration,
DATE_FORMAT(ifnull(t2.start_time, curdate()), '%Y年%m月%d日%H:%i') as startTime
from t_greenwave_info t1
left join t_event_info t2 on t1.id = t2.green_id
and t2.type in ('705', '706') and t2.dt = curdate()
union all
select distinct t1.name, t1.id, ifnull(t2.type, '700') type, REPLACE(SUBSTRING(location, 7, 18), ' ', ',') as wkt,
ifnull(TIMESTAMPDIFF(SECOND, t2.start_time, ifnull(t2.end_time,now())), 0) duration,
DATE_FORMAT(ifnull(t2.start_time, curdate()), '%Y年%m月%d日%H:%i') as startTime
from t_base_cross_info t1
left join t_event_info t2 on t1.id = t2.cross_id
and t2.type in ('701', '702', '703', '707') and t2.dt = curdate()
where t1.is_signal = 1
) t order by startTime
</select>
</mapper>
</mapper>
\ No newline at end of file
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