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 f562e41f
authored
Jul 11, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
统计围栏报警数量--筛选围栏状态
1 parent
4c2b3ec7
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 @
f562e41
...
@@ -26,7 +26,7 @@ public interface AlarmElectricFenceMapper extends CommonBaseMapper<AlarmElectric
...
@@ -26,7 +26,7 @@ public interface AlarmElectricFenceMapper extends CommonBaseMapper<AlarmElectric
List
<
FenceAlarmVO
>
getFenceAlarmInfo
();
List
<
FenceAlarmVO
>
getFenceAlarmInfo
();
/**
/**
* 获取当前用户有权限的报警数量
* 获取当前用户有权限的报警
数量
* @param query 查询条件
* @param query 查询条件
* @return 当前用户有权限的报警数量
* @return 当前用户有权限的报警数量
*/
*/
...
...
src/main/java/cn/com/glsx/app/modules/service/DashboardService.java
View file @
f562e41
...
@@ -158,6 +158,9 @@ public class DashboardService extends AbstractCommonService {
...
@@ -158,6 +158,9 @@ public class DashboardService extends AbstractCommonService {
RangeTimeDTO
today
=
new
RangeTimeDTO
(
DateUtil
.
getTodayFirstDateTimeStr
(),
DateUtil
.
getTodayLastDateTimeStr
());
RangeTimeDTO
today
=
new
RangeTimeDTO
(
DateUtil
.
getTodayFirstDateTimeStr
(),
DateUtil
.
getTodayLastDateTimeStr
());
Integer
todayActiveDevice
=
vehicleDeviceMapper
.
countDeviceWithAuth
(
today
,
activeSearch
);
Integer
todayActiveDevice
=
vehicleDeviceMapper
.
countDeviceWithAuth
(
today
,
activeSearch
);
//在线率
String
onLineRate
=
getOnLineRate
(
totalActiveDevice
);
//断电报警
//断电报警
AlarmTrackRecQueryBO
queryBO
=
new
AlarmTrackRecQueryBO
();
AlarmTrackRecQueryBO
queryBO
=
new
AlarmTrackRecQueryBO
();
queryBO
.
setStartTime
(
DateUtil
.
getTodayFirstDateTimeStr
());
queryBO
.
setStartTime
(
DateUtil
.
getTodayFirstDateTimeStr
());
...
@@ -165,15 +168,12 @@ public class DashboardService extends AbstractCommonService {
...
@@ -165,15 +168,12 @@ public class DashboardService extends AbstractCommonService {
queryBO
.
setAlarmType
(
Constants
.
ALARM_TYPE_POWER_OFF
);
queryBO
.
setAlarmType
(
Constants
.
ALARM_TYPE_POWER_OFF
);
Integer
powerOffCount
=
alarmTrackRecMapper
.
countAlarmByType
(
queryBO
);
Integer
powerOffCount
=
alarmTrackRecMapper
.
countAlarmByType
(
queryBO
);
//围栏报警
Integer
fenceCount
=
alarmElectricFenceMapper
.
countActiveDeviceFenceAlarm
(
today
);
//光感报警
//光感报警
queryBO
.
setAlarmType
(
Constants
.
ALARM_TYPE_LIGHT
);
queryBO
.
setAlarmType
(
Constants
.
ALARM_TYPE_LIGHT
);
Integer
lightCount
=
alarmTrackRecMapper
.
countAlarmByType
(
queryBO
);
Integer
lightCount
=
alarmTrackRecMapper
.
countAlarmByType
(
queryBO
);
//
在线率
//
围栏报警
String
onLineRate
=
getOnLineRate
(
totalActiveDevice
);
Integer
fenceCount
=
alarmElectricFenceMapper
.
countActiveDeviceFenceAlarm
(
today
);
return
new
StatisticalInfoVO
(
totalActiveDevice
,
totalVehicle
,
todayActiveDevice
,
powerOffCount
,
fenceCount
,
lightCount
,
onLineRate
);
return
new
StatisticalInfoVO
(
totalActiveDevice
,
totalVehicle
,
todayActiveDevice
,
powerOffCount
,
fenceCount
,
lightCount
,
onLineRate
);
}
}
...
...
src/main/resources/mapper/AlarmElectricFenceMapper.xml
View file @
f562e41
...
@@ -61,9 +61,11 @@
...
@@ -61,9 +61,11 @@
<select
id=
"countActiveDeviceFenceAlarm"
resultType=
"java.lang.Integer"
>
<select
id=
"countActiveDeviceFenceAlarm"
resultType=
"java.lang.Integer"
>
select count(taef.id)
select count(taef.id)
from t_alarm_electric_fence taef
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
inner join t_vehicle_device tvd on tvd.id = taef.vd_id
<where>
<where>
and taef.del_flag = 0
and taef.del_flag = 0
and tef.del_flag = 0
and tvd.del_flag = 0
and tvd.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
<if
test=
"startTime != null"
>
<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