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 69e2b776
authored
Dec 24, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
设置离线报警设备类型
1 parent
a91189a9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
src/main/java/cn/com/glsx/admin/modules/model/export/OfflineExport.java
src/main/java/cn/com/glsx/admin/modules/service/OfflineService.java
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
View file @
69e2b77
...
@@ -152,7 +152,7 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
...
@@ -152,7 +152,7 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
* @param offlineSearch
* @param offlineSearch
* @return
* @return
*/
*/
@DataPerm
(
showSql
=
true
)
//
@DataPerm(showSql = true)
List
<
OfflineExport
>
findOfflineList
(
OfflineSearch
offlineSearch
);
List
<
OfflineExport
>
findOfflineList
(
OfflineSearch
offlineSearch
);
/**
/**
...
...
src/main/java/cn/com/glsx/admin/modules/model/export/OfflineExport.java
View file @
69e2b77
...
@@ -79,6 +79,11 @@ public class OfflineExport {
...
@@ -79,6 +79,11 @@ public class OfflineExport {
private
Integer
source
;
private
Integer
source
;
/**
/**
* 设备类型 1有线 0无线 字符串
*/
private
String
sourceStr
;
/**
* GPS经度
* GPS经度
**/
**/
private
String
gpsAlarmLng
;
private
String
gpsAlarmLng
;
...
...
src/main/java/cn/com/glsx/admin/modules/service/OfflineService.java
View file @
69e2b77
...
@@ -45,7 +45,7 @@ public class OfflineService {
...
@@ -45,7 +45,7 @@ public class OfflineService {
offlineSearch
.
setSource
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
1
]));
offlineSearch
.
setSource
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
1
]));
}
}
List
<
OfflineExport
>
offlineList
=
vehicleMapper
.
findOfflineList
(
offlineSearch
);
List
<
OfflineExport
>
offlineList
=
vehicleMapper
.
findOfflineList
(
offlineSearch
);
if
(
CollectionUtil
.
isEmpty
(
offlineList
))
{
if
(
CollectionUtil
.
is
Not
Empty
(
offlineList
))
{
offlineList
.
forEach
(
offlineExport
->
{
offlineList
.
forEach
(
offlineExport
->
{
offlineExport
.
setDeviceTypeStr
(
TypeConverseEunm
.
DeviceTypeEnum
.
getStrByDeviceType
(
offlineExport
.
getDeviceType
()));
offlineExport
.
setDeviceTypeStr
(
TypeConverseEunm
.
DeviceTypeEnum
.
getStrByDeviceType
(
offlineExport
.
getDeviceType
()));
// 封装最后GPS数据和地址数据
// 封装最后GPS数据和地址数据
...
@@ -64,6 +64,8 @@ public class OfflineService {
...
@@ -64,6 +64,8 @@ public class OfflineService {
offlineExport
.
setGpsAlarmLat
(
bsLocation
.
getLat
());
offlineExport
.
setGpsAlarmLat
(
bsLocation
.
getLat
());
offlineExport
.
setGpsAlarmAddress
(
bsLocation
.
getAddress
());
offlineExport
.
setGpsAlarmAddress
(
bsLocation
.
getAddress
());
}
}
offlineExport
.
setSourceStr
(
TypeConverseEunm
.
SourceEnum
.
getStrBySourceType
(
offlineExport
.
getSource
()));
offlineExport
.
setDeviceTypeStr
(
TypeConverseEunm
.
DeviceTypeEnum
.
getStrByDeviceType
(
offlineExport
.
getDeviceType
()));
});
});
}
}
return
offlineList
;
return
offlineList
;
...
@@ -76,8 +78,11 @@ public class OfflineService {
...
@@ -76,8 +78,11 @@ public class OfflineService {
offlineSearch
.
setSource
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
1
]));
offlineSearch
.
setSource
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
1
]));
}
}
List
<
OfflineExport
>
offlineList
=
vehicleMapper
.
findOfflineList
(
offlineSearch
);
List
<
OfflineExport
>
offlineList
=
vehicleMapper
.
findOfflineList
(
offlineSearch
);
if
(
CollectionUtil
.
isEmpty
(
offlineList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
offlineList
))
{
offlineList
.
forEach
(
offlineExport
->
offlineExport
.
setDeviceTypeStr
(
TypeConverseEunm
.
DeviceTypeEnum
.
getStrByDeviceType
(
offlineExport
.
getDeviceType
())));
offlineList
.
forEach
(
offlineExport
->
{
offlineExport
.
setSourceStr
(
TypeConverseEunm
.
SourceEnum
.
getStrBySourceType
(
offlineExport
.
getSource
()));
offlineExport
.
setDeviceTypeStr
(
TypeConverseEunm
.
DeviceTypeEnum
.
getStrByDeviceType
(
offlineExport
.
getDeviceType
()));
});
}
}
return
offlineList
;
return
offlineList
;
}
}
...
...
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