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 ca390aa1
authored
Sep 01, 2021
by
黄小葱
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改bug,增加打印日志
1 parent
49c84434
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
View file @
ca390aa
...
@@ -57,7 +57,7 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
...
@@ -57,7 +57,7 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
* @param sn
* @param sn
* @return
* @return
*/
*/
Vehicle
findVehicleInfoBySn
(
@Param
(
"sn"
)
String
sn
);
List
<
Vehicle
>
findVehicleInfoBySn
(
@Param
(
"sn"
)
String
sn
);
/**
/**
* 车辆监控树-搜索车辆设备信息
* 车辆监控树-搜索车辆设备信息
...
...
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
View file @
ca390aa
...
@@ -185,17 +185,21 @@ public class VehicleMonitorSevice {
...
@@ -185,17 +185,21 @@ public class VehicleMonitorSevice {
*/
*/
public
List
<
VehicleLocationBo
>
getVehicleLocation
(
String
sns
,
String
deviceCode
)
{
public
List
<
VehicleLocationBo
>
getVehicleLocation
(
String
sns
,
String
deviceCode
)
{
List
<
VehicleLocationBo
>
retVehilceBoList
=
new
ArrayList
<>();
List
<
VehicleLocationBo
>
retVehilceBoList
=
new
ArrayList
<>();
long
begin
=
System
.
currentTimeMillis
();
List
<
DeviceLocationBo
>
deviceLocationBos
=
monitorApiService
.
listDeviceMonitorInfo
(
sns
,
deviceCode
);
List
<
DeviceLocationBo
>
deviceLocationBos
=
monitorApiService
.
listDeviceMonitorInfo
(
sns
,
deviceCode
);
log
.
info
(
"use time:"
+
(
System
.
currentTimeMillis
()
-
begin
));
if
(
deviceLocationBos
==
null
)
{
if
(
deviceLocationBos
==
null
)
{
return
retVehilceBoList
;
return
retVehilceBoList
;
}
}
log
.
info
(
"查找到设备定位的数据个数:"
+
deviceLocationBos
.
size
());
//整合查询车辆数据
//整合查询车辆数据
for
(
DeviceLocationBo
deviceBo
:
deviceLocationBos
)
{
for
(
DeviceLocationBo
deviceBo
:
deviceLocationBos
)
{
VehicleLocationBo
vehicleBo
=
new
VehicleLocationBo
();
VehicleLocationBo
vehicleBo
=
new
VehicleLocationBo
();
BeanUtils
.
copyProperties
(
deviceBo
,
vehicleBo
);
BeanUtils
.
copyProperties
(
deviceBo
,
vehicleBo
);
String
sn
=
deviceBo
.
getSn
();
String
sn
=
deviceBo
.
getSn
();
Vehicle
vehicle
=
vehicleMapper
.
findVehicleInfoBySn
(
sn
);
List
<
Vehicle
>
vehicleList
=
vehicleMapper
.
findVehicleInfoBySn
(
sn
);
if
(
vehicle
!=
null
)
{
if
(
CollectionUtils
.
isNotEmpty
(
vehicleList
)
&&
vehicleList
.
size
()
==
1
)
{
Vehicle
vehicle
=
vehicleList
.
get
(
0
);
vehicleBo
.
setVin
(
vehicle
.
getVin
());
vehicleBo
.
setVin
(
vehicle
.
getVin
());
vehicleBo
.
setOwnerName
(
vehicle
.
getOwnerName
());
vehicleBo
.
setOwnerName
(
vehicle
.
getOwnerName
());
}
}
...
...
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