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 b107821a
authored
Jun 17, 2024
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【ID1016891】 bug修复:警情时间轴剔除没有报警时间的离线警情
1 parent
7b7662e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
src/main/java/cn/com/glsx/admin/modules/service/RiskAssessmentService.java
src/main/java/cn/com/glsx/admin/modules/service/RiskAssessmentService.java
View file @
b107821
...
...
@@ -635,12 +635,14 @@ public class RiskAssessmentService {
List
<
String
>
vinList
=
Lists
.
newArrayList
(
vin
);
// 一 获取设备都离线 最后定位点在家庭围栏或者工作地围栏 获取车架通过权限控制 当存在设备都离线的车辆时才进行计算
List
<
String
>
fakeOfflineVinList
=
fakeOfflineVinMapper
.
getFakeOfflineVinByFence
(
vinList
);
log
.
info
(
"getFakeOfflineVinByFence:{}"
,
JSONUtil
.
toJsonStr
(
fakeOfflineVinList
));
if
(
CollectionUtils
.
isNotEmpty
(
fakeOfflineVinList
))
{
result
=
Boolean
.
TRUE
;
}
// 二 十日内状态反复变化 假性离线
List
<
FakeOfflineChangeFrequently
>
changeFrequentlyList
=
fakeOfflineChangeFrequentlyMapper
.
listByVin
(
vinList
);
log
.
info
(
"listByVin:{}"
,
JSONUtil
.
toJsonStr
(
changeFrequentlyList
));
if
(
CollectionUtils
.
isNotEmpty
(
changeFrequentlyList
))
{
result
=
Boolean
.
TRUE
;
}
...
...
@@ -650,6 +652,7 @@ public class RiskAssessmentService {
log
.
info
(
"isFakeOffline userId:"
+
ShieldContextHolder
.
getUserId
()
+
";deptIds:"
+
JSONUtil
.
toJsonStr
(
deptIds
));
// 从白名单列表获取白名单设备号及其车架号
List
<
String
>
writeListVinList
=
whitelistSnMapper
.
getWriteListVinListAndDeptIds
(
deptIds
,
vinList
);
log
.
info
(
"getWriteListVinListAndDeptIds:{}"
,
JSONUtil
.
toJsonStr
(
writeListVinList
));
// 白名单不为空 并且白名单包括车架号
if
(
CollectionUtils
.
isNotEmpty
(
writeListVinList
))
{
result
=
Boolean
.
TRUE
;
...
...
@@ -728,11 +731,7 @@ public class RiskAssessmentService {
private
AlarmTimeLinePointVo
getOffLinePoint
(
List
<
String
>
snList
,
Map
<
String
,
String
>
snDeviceNameMap
)
{
List
<
DeviceLocation
>
deviceLocationList
=
deviceLocationMapper
.
findLocationListBySnList
(
snList
);
if
(
CollectionUtils
.
isEmpty
(
deviceLocationList
))
{
AlarmTimeLinePointVo
pointVo
=
new
AlarmTimeLinePointVo
();
pointVo
.
setAlarmLevel
(
3
);
pointVo
.
setAlarmType
(
"离线报警"
);
pointVo
.
setDevice
(
snDeviceNameMap
.
get
(
snList
.
get
(
0
)));
return
pointVo
;
return
null
;
}
// 是否离线判断 前三天时间范围内存在上报记录则不算离线
...
...
@@ -770,12 +769,7 @@ public class RiskAssessmentService {
// 不存在基准时间则以第一个设备为准
if
(
Objects
.
isNull
(
latestTime
))
{
AlarmTimeLinePointVo
pointVo
=
new
AlarmTimeLinePointVo
();
pointVo
.
setAlarmLevel
(
3
);
pointVo
.
setAlarmType
(
"离线报警"
);
String
sn
=
deviceLocationList
.
get
(
0
).
getSn
();
pointVo
.
setDevice
(
snDeviceNameMap
.
get
(
sn
));
return
pointVo
;
return
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