Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-devicemonitor
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 337b6c7c
authored
Dec 22, 2021
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
设备监控-设备有效位置校验
1 parent
96299015
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
src/main/java/cn/com/glsx/devicemonitor/modules/components/HdaoGpsComponent.java
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/GpsBsLocationServiceImpl.java
src/main/java/cn/com/glsx/devicemonitor/modules/utils/DeviceUtils.java
src/main/java/cn/com/glsx/devicemonitor/modules/components/HdaoGpsComponent.java
View file @
337b6c7
...
...
@@ -137,14 +137,12 @@ public class HdaoGpsComponent {
||
StringUtils
.
isEmpty
(
poiSearchHolder
.
value
))
{
return
resultAddress
;
}
resultAddress
=
poiSearchHolder
.
value
;
}
catch
(
Ice
.
LocalException
e
)
{
log
.
error
(
"mapGeoConvert ice localexception"
+
e
.
getMessage
(),
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"mapGeoConvert ice exception"
+
e
.
getMessage
(),
e
);
}
log
.
info
(
"mapGeoConvert ice添加接口调用结束"
);
return
resultAddress
;
}
...
...
@@ -176,7 +174,7 @@ public class HdaoGpsComponent {
BsInfo
[]
bsInfos
=
res
.
value
.
record
.
bsInfos
;
if
(
bsInfos
!=
null
&&
bsInfos
.
length
>
0
)
{
log
.
info
(
"基站位置信息:{}"
,
JSON
.
toJSONString
(
bsInfos
));
//
log.info("基站位置信息:{}", JSON.toJSONString(bsInfos));
for
(
int
i
=
0
;
i
<
bsInfos
.
length
;
i
++)
{
BsInfo
bsInfo
=
bsInfos
[
i
];
if
(
bsInfo
.
lac
>
0
&&
bsInfo
.
cellId
>
0
)
{
...
...
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/GpsBsLocationServiceImpl.java
View file @
337b6c7
...
...
@@ -204,9 +204,9 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
throw
BusinessException
.
create
(
String
.
format
(
"设备%s已激活"
,
dli
.
getSn
()));
}
if
(
Objects
.
equals
(
deviceDTO
.
getSource
(),
dli
.
getWireType
()))
{
throw
BusinessException
.
create
(
"设备有线无线类型校验有误"
);
}
//
if (Objects.equals(deviceDTO.getSource(), dli.getWireType())) {
//
throw BusinessException.create("设备有线无线类型校验有误");
//
}
if
(
StringUtils
.
isNotEmpty
(
dli
.
getCheckCode
()))
{
//如果设备参数带了设备验证码就校验验证码正确性
if
(!
dli
.
getCheckCode
().
equals
(
deviceDTO
.
getCheckCode
()))
{
...
...
src/main/java/cn/com/glsx/devicemonitor/modules/utils/DeviceUtils.java
View file @
337b6c7
...
...
@@ -64,7 +64,7 @@ public class DeviceUtils {
}
//无源设备 在线
// 定位问题
log
.
info
(
deviceStatus
.
getSn
()
+
"设备source字段为"
+
deviceStatus
.
getSource
());
//
log.info(deviceStatus.getSn() + "设备source字段为" + deviceStatus.getSource());
if
(
deviceStatus
.
getSource
()
!=
null
&&
ConstantsDevice
.
SOURCE_NO
==
deviceStatus
.
getSource
())
{
deviceStatus
.
setStatus
(
ConstantsDevice
.
DEVICE_STATUS_ONLINE
);
deviceStatus
.
setStatusTime
(
DateUtils
.
formatTimeInSec
((
now
-
trackTime
)
/
1000
));
...
...
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