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 c416bc8d
authored
Jan 02, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
设备监控-设备有效位置校验
1 parent
c753404e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/GpsBsLocationServiceImpl.java
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/GpsBsLocationServiceImpl.java
View file @
c416bc8
...
...
@@ -61,6 +61,9 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
@Autowired
private
DeviceService
deviceService
;
@Autowired
private
EShieldService
eShieldService
;
@Override
public
List
<
GpsBsData
>
getLastGpsBsBatch
(
GpsBsLastBatchRequest
gpsBsLastBatchRequest
)
{
// 1、调用ICE批量获取数据
...
...
@@ -180,11 +183,14 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
boolean
gpsLocationVerify
=
isGpsBsDataValid
(
locationRequest
.
getGpsValidMinute
(),
gpsLocation
);
//基站有效定位验证
boolean
gmsLocationVerify
=
isGpsBsDataValid
(
locationRequest
.
getBsValidMinute
(),
bsLocation
);
boolean
bsLocationVerify
=
isGpsBsDataValid
(
locationRequest
.
getBsValidMinute
(),
bsLocation
);
gpsBsData
.
setGpsVerifyResult
(
gpsLocationVerify
);
gpsBsData
.
setBsVerifyResult
(
bsLocationVerify
);
// 新e盾激活是否也基站激活 ,回填GPS位置点等
if
(
gpsLocationVerify
||
gm
sLocationVerify
)
{
log
.
info
(
"设备{} GPS验证{},基站验证{}"
,
sn
,
gpsLocationVerify
,
gm
sLocationVerify
);
if
(
gpsLocationVerify
||
b
sLocationVerify
)
{
log
.
info
(
"设备{} GPS验证{},基站验证{}"
,
sn
,
gpsLocationVerify
,
b
sLocationVerify
);
if
(!
gpsLocationVerify
&&
locationRequest
.
getBsBackfillGps
())
{
fillGpsData
(
sn
,
gpsBsData
.
getBsLocation
());
}
...
...
@@ -222,9 +228,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
()))
{
...
...
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