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 d599a6e9
authored
Oct 26, 2021
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复obd设备类型错误bug
1 parent
570d4f8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/MonitorServiceImpl.java
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/MonitorServiceImpl.java
View file @
d599a6e
...
@@ -105,13 +105,21 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -105,13 +105,21 @@ public class MonitorServiceImpl implements MonitorService {
String
startTime
=
trackRequest
.
getStartTime
();
String
startTime
=
trackRequest
.
getStartTime
();
String
endTime
=
trackRequest
.
getEndTime
();
String
endTime
=
trackRequest
.
getEndTime
();
Device
device
=
deviceService
.
getBySn
(
sn
);
DeviceTypeRelationEnum
dtre
=
DeviceTypeRelationEnum
.
findByDeviceCode
(
"gps"
);
if
(
device
!=
null
)
{
//查询数据库设备类型,
dtre
=
DeviceTypeRelationEnum
.
findByBizDeviceType
(
device
.
getDeviceType
());
}
Integer
locationType
=
trackRequest
.
getLocationType
();
Integer
locationType
=
trackRequest
.
getLocationType
();
List
<
GpsLocation
>
gpsBsData
=
null
;
List
<
GpsLocation
>
gpsBsData
=
null
;
// 0:gps; 1:基站
// 0:gps; 1:基站
if
(
locationType
==
0
)
{
if
(
locationType
==
0
)
{
gpsBsData
=
gpsBsLocationService
.
getLastGpsBsHistoryBySn
(
sn
,
DeviceTypeRelationEnum
.
findByDeviceCode
(
"gps"
)
,
startTime
,
endTime
);
gpsBsData
=
gpsBsLocationService
.
getLastGpsBsHistoryBySn
(
sn
,
dtre
,
startTime
,
endTime
);
}
else
{
}
else
{
gpsBsData
=
gpsBsLocationService
.
getBaseStationPoint
(
sn
,
DeviceTypeRelationEnum
.
findByDeviceCode
(
"gps"
)
,
startTime
,
endTime
);
gpsBsData
=
gpsBsLocationService
.
getBaseStationPoint
(
sn
,
dtre
,
startTime
,
endTime
);
}
}
if
(
CollectionUtils
.
isEmpty
(
gpsBsData
))
{
if
(
CollectionUtils
.
isEmpty
(
gpsBsData
))
{
return
resList
;
return
resList
;
...
@@ -147,7 +155,7 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -147,7 +155,7 @@ public class MonitorServiceImpl implements MonitorService {
String
startTime
=
trackRequest
.
getStartTime
();
String
startTime
=
trackRequest
.
getStartTime
();
String
endTime
=
trackRequest
.
getEndTime
();
String
endTime
=
trackRequest
.
getEndTime
();
StayPointRecord
[]
recordArr
=
mileComponent
.
listStayPointQuery
(
sn
,
DateUtils
.
parse
(
startTime
),
DateUtils
.
parse
(
endTime
));
StayPointRecord
[]
recordArr
=
mileComponent
.
listStayPointQuery
(
sn
,
DateUtils
.
parse
(
startTime
),
DateUtils
.
parse
(
endTime
));
for
(
StayPointRecord
record:
recordArr
)
{
for
(
StayPointRecord
record
:
recordArr
)
{
retList
.
add
(
handleStayPointRecord
(
sn
,
record
));
retList
.
add
(
handleStayPointRecord
(
sn
,
record
));
}
}
return
retList
;
return
retList
;
...
@@ -188,6 +196,7 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -188,6 +196,7 @@ public class MonitorServiceImpl implements MonitorService {
/**
/**
* 设备离线状态
* 设备离线状态
*
* @param deviceLocationBo
* @param deviceLocationBo
* @param offlineTime
* @param offlineTime
* @return
* @return
...
...
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