Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5bfb4c80
authored
Jun 06, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
首页查询返回查询时间
1 parent
92137664
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
src/main/java/cn/com/glsx/admin/modules/service/HomeService.java
src/main/java/cn/com/glsx/admin/modules/service/HomeService.java
View file @
5bfb4c8
...
@@ -152,8 +152,11 @@ public class HomeService extends AbstractCommonService {
...
@@ -152,8 +152,11 @@ public class HomeService extends AbstractCommonService {
returnMap
.
put
(
"powerOffAlarmCount"
,
powerOffAlarmCount
);
returnMap
.
put
(
"powerOffAlarmCount"
,
powerOffAlarmCount
);
// 统计设备离线报警
// 统计设备离线报警
String
lostBegin
=
DateUtil
.
formatDate
(
DateUtils
.
addHours
(
new
Date
(),
-
72
));
Date
date
=
new
Date
();
String
lostBegin
=
DateUtil
.
formatDate
(
DateUtils
.
addHours
(
date
,
-
72
));
List
<
StatCountModel
>
offLineAlarmCountList
=
vehicleMapper
.
getOffLineAlarmCount
(
lostBegin
);
List
<
StatCountModel
>
offLineAlarmCountList
=
vehicleMapper
.
getOffLineAlarmCount
(
lostBegin
);
returnMap
.
put
(
"offLineAlarmStartTime"
,
lostBegin
);
returnMap
.
put
(
"offLineAlarmEndTime"
,
DateUtil
.
formatDate
(
date
));
//设备离线数
//设备离线数
Integer
offLineAlarmCount
=
offLineAlarmCountList
.
stream
().
map
(
StatCountModel:
:
getCnt
).
filter
(
Objects:
:
nonNull
).
reduce
(
0
,
Integer:
:
sum
);
Integer
offLineAlarmCount
=
offLineAlarmCountList
.
stream
().
map
(
StatCountModel:
:
getCnt
).
filter
(
Objects:
:
nonNull
).
reduce
(
0
,
Integer:
:
sum
);
returnMap
.
put
(
"offLineAlarmCount"
,
offLineAlarmCount
);
returnMap
.
put
(
"offLineAlarmCount"
,
offLineAlarmCount
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment