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 da39bfbf
authored
Sep 29, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
b85aa2bc
e9f0d18d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
src/main/java/cn/com/glsx/devicemonitor/modules/components/HdaoGpsComponent.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 @
da39bfb
...
@@ -282,7 +282,7 @@ public class HdaoGpsComponent {
...
@@ -282,7 +282,7 @@ public class HdaoGpsComponent {
*/
*/
public
DataGpsLocation
mapGeoBsConvert
(
DataBsLocation
dataBsLocation
)
{
public
DataGpsLocation
mapGeoBsConvert
(
DataBsLocation
dataBsLocation
)
{
DataGpsLocation
dataGpsLocation
=
null
;
DataGpsLocation
dataGpsLocation
=
null
;
BsData
bsData
=
new
BsData
(
LocationUtil
.
hexToInt
(
dataBsLocation
.
getMnc
()),
LocationUtil
.
hexToInt
(
dataBsLocation
.
getLac
()),
LocationUtil
.
hexTo
Int
(
dataBsLocation
.
getLcid
()));
BsData
bsData
=
new
BsData
(
Integer
.
parseInt
(
dataBsLocation
.
getMnc
()),
Integer
.
parseInt
(
dataBsLocation
.
getLac
()),
Integer
.
parse
Int
(
dataBsLocation
.
getLcid
()));
BsDataReq
req
=
new
BsDataReq
(
bsData
);
BsDataReq
req
=
new
BsDataReq
(
bsData
);
BsDataRespHolder
resp
=
new
BsDataRespHolder
();
BsDataRespHolder
resp
=
new
BsDataRespHolder
();
try
{
try
{
...
...
src/main/java/cn/com/glsx/devicemonitor/modules/utils/DeviceUtils.java
View file @
da39bfb
...
@@ -78,12 +78,14 @@ public class DeviceUtils {
...
@@ -78,12 +78,14 @@ public class DeviceUtils {
*/
*/
public
static
void
parseSourceStatus
(
DeviceStatusModel
deviceStatus
,
Integer
speed
,
long
trackTime
,
long
offlineTime
)
{
public
static
void
parseSourceStatus
(
DeviceStatusModel
deviceStatus
,
Integer
speed
,
long
trackTime
,
long
offlineTime
)
{
long
now
=
System
.
currentTimeMillis
();
long
now
=
System
.
currentTimeMillis
();
if
(
now
-
trackTime
>
offlineTime
)
{
long
drivingTime
=
6
*
60
*
1000
;
if
(
now
-
trackTime
>
drivingTime
)
{
//大于6分钟 有源在线
//大于6分钟 有源在线
deviceStatus
.
setStatus
(
ConstantsDevice
.
DEVICE_STATUS_ONLINE
);
deviceStatus
.
setStatus
(
ConstantsDevice
.
DEVICE_STATUS_ONLINE
);
deviceStatus
.
setStatusTime
(
DateUtils
.
formatTimeInSec
((
now
-
trackTime
)
/
1000
));
deviceStatus
.
setStatusTime
(
DateUtils
.
formatTimeInSec
((
now
-
trackTime
)
/
1000
));
return
;
return
;
}
}
//否则 在6分钟内并且有速度 则为行驶中
if
(
speed
!=
null
&&
speed
>
0
)
{
if
(
speed
!=
null
&&
speed
>
0
)
{
//行驶状态
//行驶状态
deviceStatus
.
setStatus
(
ConstantsDevice
.
DEVICE_STATUS_DRIVING
);
deviceStatus
.
setStatus
(
ConstantsDevice
.
DEVICE_STATUS_DRIVING
);
...
...
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