Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-miniappserver
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 5d7dc8d6
authored
Jul 14, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加日志打印
1 parent
145a794c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
src/main/java/cn/com/glsx/app/modules/service/DashboardService.java
src/main/java/cn/com/glsx/app/modules/service/DashboardService.java
View file @
5d7dc8d
...
@@ -195,14 +195,14 @@ public class DashboardService extends AbstractCommonService {
...
@@ -195,14 +195,14 @@ public class DashboardService extends AbstractCommonService {
List
<
Integer
>
listActiveDevice
=
vehicleDeviceMapper
.
countDeviceWithAuth
(
new
RangeTimeDTO
(),
activeSearch
);
List
<
Integer
>
listActiveDevice
=
vehicleDeviceMapper
.
countDeviceWithAuth
(
new
RangeTimeDTO
(),
activeSearch
);
int
totalActiveDevice
=
listActiveDevice
.
stream
().
reduce
(
0
,
Integer:
:
sum
);
int
totalActiveDevice
=
listActiveDevice
.
stream
().
reduce
(
0
,
Integer:
:
sum
);
stopWatch
.
stop
();
stopWatch
.
stop
();
log
.
info
(
"{} 耗时:{} ms"
,
"激活设备总数查询"
,
stopWatch
.
getLastTaskTimeMillis
());
log
.
info
(
"{} 耗时:{} ms"
,
"
看板统计信息 -
激活设备总数查询"
,
stopWatch
.
getLastTaskTimeMillis
());
//车辆总数
//车辆总数
stopWatch
.
start
();
stopWatch
.
start
();
List
<
Integer
>
listVehicle
=
vehicleMapper
.
countDeviceWithAuth
(
activeSearch
);
List
<
Integer
>
listVehicle
=
vehicleMapper
.
countDeviceWithAuth
(
activeSearch
);
int
totalVehicle
=
listVehicle
.
stream
().
reduce
(
0
,
Integer:
:
sum
);
int
totalVehicle
=
listVehicle
.
stream
().
reduce
(
0
,
Integer:
:
sum
);
stopWatch
.
stop
();
stopWatch
.
stop
();
log
.
info
(
"{} 耗时:{} ms"
,
"车辆总数查询"
,
stopWatch
.
getLastTaskTimeMillis
());
log
.
info
(
"{} 耗时:{} ms"
,
"
看板统计信息 -
车辆总数查询"
,
stopWatch
.
getLastTaskTimeMillis
());
//今日激活
//今日激活
stopWatch
.
start
();
stopWatch
.
start
();
...
@@ -210,19 +210,19 @@ public class DashboardService extends AbstractCommonService {
...
@@ -210,19 +210,19 @@ public class DashboardService extends AbstractCommonService {
List
<
Integer
>
listTodayActiveDevice
=
vehicleDeviceMapper
.
countDeviceWithAuth
(
today
,
activeSearch
);
List
<
Integer
>
listTodayActiveDevice
=
vehicleDeviceMapper
.
countDeviceWithAuth
(
today
,
activeSearch
);
int
todayActiveDevice
=
listTodayActiveDevice
.
stream
().
reduce
(
0
,
Integer:
:
sum
);
int
todayActiveDevice
=
listTodayActiveDevice
.
stream
().
reduce
(
0
,
Integer:
:
sum
);
stopWatch
.
stop
();
stopWatch
.
stop
();
log
.
info
(
"{} 耗时:{} ms"
,
"今日激活查询"
,
stopWatch
.
getLastTaskTimeMillis
());
log
.
info
(
"{} 耗时:{} ms"
,
"
看板统计信息 -
今日激活查询"
,
stopWatch
.
getLastTaskTimeMillis
());
//在线率
//在线率
stopWatch
.
start
();
stopWatch
.
start
();
String
onLineRate
=
getOnLineRate
(
totalActiveDevice
);
String
onLineRate
=
getOnLineRate
(
totalActiveDevice
);
stopWatch
.
stop
();
stopWatch
.
stop
();
log
.
info
(
"{} 耗时:{} ms"
,
"在线率查询"
,
stopWatch
.
getLastTaskTimeMillis
());
log
.
info
(
"{} 耗时:{} ms"
,
"
看板统计信息 -
在线率查询"
,
stopWatch
.
getLastTaskTimeMillis
());
//断电报警
//断电报警
stopWatch
.
start
();
stopWatch
.
start
();
List
<
String
>
sns
=
vehicleMapper
.
getAllDeviceSnByAuth
();
List
<
String
>
sns
=
vehicleMapper
.
getAllDeviceSnByAuth
();
stopWatch
.
stop
();
stopWatch
.
stop
();
log
.
info
(
"{} 耗时:{} ms"
,
"sn查询"
,
stopWatch
.
getLastTaskTimeMillis
());
log
.
info
(
"{} 耗时:{} ms"
,
"
看板统计信息 -
sn查询"
,
stopWatch
.
getLastTaskTimeMillis
());
stopWatch
.
start
();
stopWatch
.
start
();
AlarmTrackRecQueryDTO
query
=
new
AlarmTrackRecQueryDTO
();
AlarmTrackRecQueryDTO
query
=
new
AlarmTrackRecQueryDTO
();
...
@@ -232,21 +232,21 @@ public class DashboardService extends AbstractCommonService {
...
@@ -232,21 +232,21 @@ public class DashboardService extends AbstractCommonService {
query
.
setAlarmType
(
Constants
.
ALARM_TYPE_POWER_OFF
);
query
.
setAlarmType
(
Constants
.
ALARM_TYPE_POWER_OFF
);
Integer
powerOffCount
=
remoteAlarmService
.
getAlarmCount
(
query
);
Integer
powerOffCount
=
remoteAlarmService
.
getAlarmCount
(
query
);
stopWatch
.
stop
();
stopWatch
.
stop
();
log
.
info
(
"{} 耗时:{} ms"
,
"今日断电报警"
,
stopWatch
.
getLastTaskTimeMillis
());
log
.
info
(
"{} 耗时:{} ms"
,
"
看板统计信息 -
今日断电报警"
,
stopWatch
.
getLastTaskTimeMillis
());
//光感报警
//光感报警
stopWatch
.
start
();
stopWatch
.
start
();
query
.
setAlarmType
(
Constants
.
ALARM_TYPE_LIGHT
);
query
.
setAlarmType
(
Constants
.
ALARM_TYPE_LIGHT
);
Integer
lightCount
=
remoteAlarmService
.
getAlarmCount
(
query
);
Integer
lightCount
=
remoteAlarmService
.
getAlarmCount
(
query
);
stopWatch
.
stop
();
stopWatch
.
stop
();
log
.
info
(
"{} 耗时:{} ms"
,
"今日光感报警查询"
,
stopWatch
.
getLastTaskTimeMillis
());
log
.
info
(
"{} 耗时:{} ms"
,
"
看板统计信息 -
今日光感报警查询"
,
stopWatch
.
getLastTaskTimeMillis
());
//围栏报警
//围栏报警
stopWatch
.
start
();
stopWatch
.
start
();
List
<
Integer
>
fenceList
=
alarmElectricFenceMapper
.
countActiveDeviceFenceAlarm
(
today
);
List
<
Integer
>
fenceList
=
alarmElectricFenceMapper
.
countActiveDeviceFenceAlarm
(
today
);
int
fenceCount
=
fenceList
.
stream
().
reduce
(
0
,
Integer:
:
sum
);
int
fenceCount
=
fenceList
.
stream
().
reduce
(
0
,
Integer:
:
sum
);
stopWatch
.
stop
();
stopWatch
.
stop
();
log
.
info
(
"{} 耗时:{} ms"
,
"今日围栏报警查询"
,
stopWatch
.
getLastTaskTimeMillis
());
log
.
info
(
"{} 耗时:{} ms"
,
"
看板统计信息 -
今日围栏报警查询"
,
stopWatch
.
getLastTaskTimeMillis
());
return
new
StatisticalInfoVO
(
totalActiveDevice
,
totalVehicle
,
todayActiveDevice
,
powerOffCount
,
fenceCount
,
lightCount
,
onLineRate
);
return
new
StatisticalInfoVO
(
totalActiveDevice
,
totalVehicle
,
todayActiveDevice
,
powerOffCount
,
fenceCount
,
lightCount
,
onLineRate
);
}
}
...
...
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