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 2ebdbdb3
authored
Jul 11, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
9ccfcc23
51b135a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
src/main/java/cn/com/glsx/app/modules/mapper/AlarmElectricFenceMapper.java
src/main/java/cn/com/glsx/app/modules/service/DashboardService.java
src/main/resources/mapper/AlarmElectricFenceMapper.xml
src/main/java/cn/com/glsx/app/modules/mapper/AlarmElectricFenceMapper.java
View file @
2ebdbdb
...
...
@@ -26,7 +26,7 @@ public interface AlarmElectricFenceMapper extends CommonBaseMapper<AlarmElectric
List
<
FenceAlarmVO
>
getFenceAlarmInfo
();
/**
* 获取当前用户有权限的报警数量
* 获取当前用户有权限的报警
数量
* @param query 查询条件
* @return 当前用户有权限的报警数量
*/
...
...
src/main/java/cn/com/glsx/app/modules/service/DashboardService.java
View file @
2ebdbdb
...
...
@@ -162,6 +162,9 @@ public class DashboardService extends AbstractCommonService {
RangeTimeDTO
today
=
new
RangeTimeDTO
(
DateUtil
.
getTodayFirstDateTimeStr
(),
DateUtil
.
getTodayLastDateTimeStr
());
Integer
todayActiveDevice
=
vehicleDeviceMapper
.
countDeviceWithAuth
(
today
,
activeSearch
);
//在线率
String
onLineRate
=
getOnLineRate
(
totalActiveDevice
);
//断电报警
AlarmTrackRecQueryBO
queryBO
=
new
AlarmTrackRecQueryBO
();
queryBO
.
setStartTime
(
DateUtil
.
getTodayFirstDateTimeStr
());
...
...
@@ -169,15 +172,12 @@ public class DashboardService extends AbstractCommonService {
queryBO
.
setAlarmType
(
Constants
.
ALARM_TYPE_POWER_OFF
);
Integer
powerOffCount
=
alarmTrackRecMapper
.
countAlarmByType
(
queryBO
);
//围栏报警
Integer
fenceCount
=
alarmElectricFenceMapper
.
countActiveDeviceFenceAlarm
(
today
);
//光感报警
queryBO
.
setAlarmType
(
Constants
.
ALARM_TYPE_LIGHT
);
Integer
lightCount
=
alarmTrackRecMapper
.
countAlarmByType
(
queryBO
);
//
在线率
String
onLineRate
=
getOnLineRate
(
totalActiveDevice
);
//
围栏报警
Integer
fenceCount
=
alarmElectricFenceMapper
.
countActiveDeviceFenceAlarm
(
today
);
return
new
StatisticalInfoVO
(
totalActiveDevice
,
totalVehicle
,
todayActiveDevice
,
powerOffCount
,
fenceCount
,
lightCount
,
onLineRate
);
}
...
...
src/main/resources/mapper/AlarmElectricFenceMapper.xml
View file @
2ebdbdb
...
...
@@ -61,9 +61,11 @@
<select
id=
"countActiveDeviceFenceAlarm"
resultType=
"java.lang.Integer"
>
select count(taef.id)
from t_alarm_electric_fence taef
left join t_electric_fence tef on tef.id = taef.fence_id
inner join t_vehicle_device tvd on tvd.id = taef.vd_id
<where>
and taef.del_flag = 0
and tef.del_flag = 0
and tvd.del_flag = 0
and tvd.bind_status = 1
<if
test=
"startTime != null"
>
...
...
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