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 2b3c880a
authored
May 24, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加标识
1 parent
f7f0628b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 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 @
2b3c880
...
@@ -95,7 +95,12 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
...
@@ -95,7 +95,12 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
gpsBsData
.
setGpsLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
gpsLocation
));
gpsBsData
.
setGpsLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
gpsLocation
));
}
}
//补充获取wifi的定位
//补充获取wifi的定位
DataGpsLocation
wifiLocation
=
getDeviceLastWifiInfoBySn
(
sn
);
boolean
hasWifi
=
isHasWifi
(
sn
);
gpsBsData
.
setHasWifi
(
hasWifi
);
if
(!
hasWifi
)
{
continue
;
}
DataGpsLocation
wifiLocation
=
hdaoGpsComponent
.
getWifiLocation
(
sn
);
if
(
wifiLocation
!=
null
)
{
if
(
wifiLocation
!=
null
)
{
gpsBsData
.
setWifiLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
wifiLocation
));
gpsBsData
.
setWifiLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
wifiLocation
));
}
}
...
@@ -139,7 +144,12 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
...
@@ -139,7 +144,12 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
if
(
bsLocation
!=
null
)
{
if
(
bsLocation
!=
null
)
{
gpsBsData
.
setBsLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
bsLocation
));
gpsBsData
.
setBsLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
bsLocation
));
}
}
DataGpsLocation
wifiLocation
=
getDeviceLastWifiInfoBySn
(
sn
);
boolean
hasWifi
=
isHasWifi
(
sn
);
gpsBsData
.
setHasWifi
(
hasWifi
);
DataGpsLocation
wifiLocation
=
null
;
if
(
hasWifi
)
{
wifiLocation
=
hdaoGpsComponent
.
getWifiLocation
(
sn
);
}
if
(
wifiLocation
!=
null
)
{
if
(
wifiLocation
!=
null
)
{
gpsBsData
.
setWifiLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
wifiLocation
));
gpsBsData
.
setWifiLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
wifiLocation
));
}
}
...
@@ -361,6 +371,15 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
...
@@ -361,6 +371,15 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
*/
*/
public
DataGpsLocation
getDeviceLastWifiInfoBySn
(
String
sn
)
{
public
DataGpsLocation
getDeviceLastWifiInfoBySn
(
String
sn
)
{
//具有wifi定位的设备起始号
//具有wifi定位的设备起始号
boolean
hasWifi
=
isHasWifi
(
sn
);
if
(!
hasWifi
)
{
return
null
;
}
DataGpsLocation
wifiLocation
=
hdaoGpsComponent
.
getWifiLocation
(
sn
);
return
wifiLocation
;
}
private
boolean
isHasWifi
(
String
sn
)
{
String
wifiSns
=
PropertiesUtils
.
getProperty
(
"wifi.sn.start.location"
);
String
wifiSns
=
PropertiesUtils
.
getProperty
(
"wifi.sn.start.location"
);
boolean
hasWifi
=
false
;
boolean
hasWifi
=
false
;
if
(
StringUtils
.
isNotBlank
(
wifiSns
))
{
if
(
StringUtils
.
isNotBlank
(
wifiSns
))
{
...
@@ -372,11 +391,7 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
...
@@ -372,11 +391,7 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
}
}
}
}
}
}
if
(!
hasWifi
)
{
return
hasWifi
;
return
null
;
}
DataGpsLocation
wifiLocation
=
hdaoGpsComponent
.
getWifiLocation
(
sn
);
return
wifiLocation
;
}
}
@Override
@Override
...
...
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