Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
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 01b3cdc5
authored
Apr 27, 2023
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.9.0 仲利车辆列表增加最后定位时间字段-- 优化空指针判断逻辑
1 parent
3c9199e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
01b3cdc
...
@@ -1063,11 +1063,10 @@ public class VehicleService extends AbstractCommonService {
...
@@ -1063,11 +1063,10 @@ public class VehicleService extends AbstractCommonService {
}
}
// 查询设备最后定位点数据
// 查询设备最后定位点数据
List
<
String
>
snList
=
vehicleInfoList
.
stream
().
map
(
VehicleInfoPageDTO:
:
getSn
).
filter
(
Objects:
:
nonNull
)
List
<
String
>
snList
=
vehicleInfoList
.
stream
().
map
(
VehicleInfoPageDTO:
:
getSn
).
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
Map
<
String
,
DeviceLocation
>
deviceLocationMap
=
Maps
.
newHashMap
();
Map
<
String
,
DeviceLocation
>
deviceLocationMap
=
Maps
.
newHashMap
();
List
<
DeviceLocation
>
deviceLocationList
=
deviceLocationMapper
.
findLocationListBySnList
(
snList
);
if
(
CollectionUtils
.
isNotEmpty
(
snList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
deviceLocationList
))
{
List
<
DeviceLocation
>
deviceLocationList
=
deviceLocationMapper
.
findLocationListBySnList
(
snList
);
deviceLocationMap
=
deviceLocationList
.
stream
().
collect
(
Collectors
.
toMap
(
DeviceLocation:
:
getSn
,
Function
.
identity
(),
(
k1
,
k2
)
->
k2
));
deviceLocationMap
=
deviceLocationList
.
stream
().
collect
(
Collectors
.
toMap
(
DeviceLocation:
:
getSn
,
Function
.
identity
(),
(
k1
,
k2
)
->
k2
));
}
}
...
...
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