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 4182aa8f
authored
Sep 13, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
374d88d5
505ffb5c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
13 deletions
src/main/java/cn/com/glsx/admin/modules/model/OrgVehicleModel.java
src/main/java/cn/com/glsx/admin/modules/service/DeviceMonitorApiService.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
src/main/resources/mapper/VehicleMapper.xml
src/test/java/cn/com/glsx/admin/modules/service/VehicleMonitorSeviceTest.java
src/main/java/cn/com/glsx/admin/modules/model/OrgVehicleModel.java
View file @
4182aa8
...
@@ -11,5 +11,6 @@ public class OrgVehicleModel {
...
@@ -11,5 +11,6 @@ public class OrgVehicleModel {
private
String
ownerName
;
private
String
ownerName
;
private
String
sns
;
private
String
sns
;
private
Long
creatorId
;
private
Long
creatorId
;
private
Integer
source
;
}
}
src/main/java/cn/com/glsx/admin/modules/service/DeviceMonitorApiService.java
View file @
4182aa8
...
@@ -33,13 +33,6 @@ public class DeviceMonitorApiService {
...
@@ -33,13 +33,6 @@ public class DeviceMonitorApiService {
* @return
* @return
*/
*/
public
List
<
DeviceLocationBo
>
listDeviceMonitorInfo
(
String
sn
,
String
deviceCode
)
{
public
List
<
DeviceLocationBo
>
listDeviceMonitorInfo
(
String
sn
,
String
deviceCode
)
{
DeviceLocationRequest
request
=
new
DeviceLocationRequest
();
request
.
setSns
(
sn
);
request
.
setDeviceCode
(
deviceCode
);
R
<
List
<
DeviceLocationBo
>>
listR2
=
gpsBsService
.
listDeviceMonitorInfo2
(
request
);
log
.
info
(
JsonUtils
.
toJsonStr
(
listR2
));
R
<
List
<
DeviceLocationBo
>>
listR
=
gpsBsService
.
listDeviceMonitorInfo
(
sn
,
deviceCode
);
R
<
List
<
DeviceLocationBo
>>
listR
=
gpsBsService
.
listDeviceMonitorInfo
(
sn
,
deviceCode
);
List
<
DeviceLocationBo
>
dataList
=
listR
.
getDataList
(
new
TypeToken
<
List
<
DeviceLocationBo
>>()
{
List
<
DeviceLocationBo
>
dataList
=
listR
.
getDataList
(
new
TypeToken
<
List
<
DeviceLocationBo
>>()
{
}.
getType
());
}.
getType
());
...
...
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
View file @
4182aa8
...
@@ -19,7 +19,6 @@ import org.springframework.beans.BeanUtils;
...
@@ -19,7 +19,6 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StopWatch
;
import
org.springframework.util.StopWatch
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -181,16 +180,19 @@ public class VehicleMonitorSevice {
...
@@ -181,16 +180,19 @@ public class VehicleMonitorSevice {
*/
*/
private
List
<
OrgVehicleTree
>
convert2ovt
(
List
<
OrgVehicleModel
>
modelList
)
{
private
List
<
OrgVehicleTree
>
convert2ovt
(
List
<
OrgVehicleModel
>
modelList
)
{
List
<
OrgVehicleTree
>
vehicleList
=
Lists
.
newArrayList
();
List
<
OrgVehicleTree
>
vehicleList
=
Lists
.
newArrayList
();
if
(
CollectionUtils
.
isEmpty
(
modelList
))
{
return
vehicleList
;
}
modelList
.
forEach
(
model
->
{
modelList
.
forEach
(
model
->
{
OrgVehicleTree
ovt
=
new
OrgVehicleTree
();
OrgVehicleTree
ovt
=
new
OrgVehicleTree
();
ovt
.
setId
(
"d"
+
model
.
getId
());
//加个前缀是为了保证前端树形控件id的唯一性(组织o,用户u,车辆v,设备d)
ovt
.
setId
(
"d"
+
model
.
getId
());
//加个前缀是为了保证前端树形控件id的唯一性(组织o,用户u,车辆v,设备d)
ovt
.
setLabel
(
model
.
getSns
());
ovt
.
setLabel
(
model
.
getSns
());
ovt
.
setParentId
(
model
.
getCreatorId
());
ovt
.
setParentId
(
model
.
getCreatorId
());
ovt
.
setVid
(
model
.
getVid
());
ovt
.
setVid
(
model
.
getVid
());
ovt
.
setLabel1
(
model
.
getOwnerName
()
);
ovt
.
setLabel1
(
StringUtils
.
isNotEmpty
(
model
.
getOwnerName
())
?
model
.
getOwnerName
()
:
"--"
);
ovt
.
setLabel2
(
model
.
getVin
());
ovt
.
setLabel2
(
model
.
getVin
());
ovt
.
setSource
(
model
.
get
Id
()
%
2
==
0
?
"有线"
:
"无线"
);
ovt
.
setSource
(
model
.
get
Source
()
==
null
?
"未知"
:
(
model
.
getSource
()
==
1
?
"有线"
:
"无线"
)
);
ovt
.
setOnline
(
model
.
getId
()
%
3
==
0
);
//
ovt.setOnline(model.getId() % 3 == 0);
vehicleList
.
add
(
ovt
);
vehicleList
.
add
(
ovt
);
});
});
return
vehicleList
;
return
vehicleList
;
...
...
src/main/resources/mapper/VehicleMapper.xml
View file @
4182aa8
...
@@ -250,9 +250,11 @@
...
@@ -250,9 +250,11 @@
tv.vin,
tv.vin,
tv.owner_name ownerName,
tv.owner_name ownerName,
tvd.sn sns,
tvd.sn sns,
tv.created_by creatorId
tv.created_by creatorId,
td.source
from t_vehicle tv
from t_vehicle tv
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
left join t_device td on td.sn = tvd.sn
where tv.del_flag = 0
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
and tv.created_by is not null
and tv.created_by is not null
...
...
src/test/java/cn/com/glsx/admin/modules/service/VehicleMonitorSeviceTest.java
View file @
4182aa8
...
@@ -38,7 +38,6 @@ public class VehicleMonitorSeviceTest {
...
@@ -38,7 +38,6 @@ public class VehicleMonitorSeviceTest {
private
VehicleMonitorSevice
vehicleMonitorSevice
;
private
VehicleMonitorSevice
vehicleMonitorSevice
;
@Test
@Test
public
void
getTrackHistory
()
{
public
void
getTrackHistory
()
{
LocationHistoryRequest
historyRequest
=
new
LocationHistoryRequest
();
LocationHistoryRequest
historyRequest
=
new
LocationHistoryRequest
();
historyRequest
.
setSn
(
"6200917729"
);
historyRequest
.
setSn
(
"6200917729"
);
...
...
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