Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-kafkaconsumer-gpsbs
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 6c1dd31e
authored
Jan 04, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化Gps基站消费逻辑
1 parent
dc6b2cd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
src/main/java/cn/com/glsx/kafka/service/TransitHandleService.java
src/main/java/cn/com/glsx/kafka/service/TransitHandleService.java
View file @
6c1dd31
...
@@ -158,7 +158,9 @@ public class TransitHandleService {
...
@@ -158,7 +158,9 @@ public class TransitHandleService {
if
(
ObjectUtil
.
isNull
(
gpsData
)
&&
ObjectUtil
.
isNull
(
bsData
)
&&
ObjectUtil
.
isNull
(
stayStatusData
))
{
if
(
ObjectUtil
.
isNull
(
gpsData
)
&&
ObjectUtil
.
isNull
(
bsData
)
&&
ObjectUtil
.
isNull
(
stayStatusData
))
{
return
;
return
;
}
}
DeviceLocationDto
deviceLogin
=
mergeDeviceLogin
(
gpsData
,
bsData
,
stayStatusData
);
DeviceLocationDto
deviceLogin
=
new
DeviceLocationDto
();
deviceLogin
.
setSn
(
sn
);
mergeDeviceLogin
(
deviceLogin
,
gpsData
,
bsData
,
stayStatusData
);
deviceLocationList
.
add
(
deviceLogin
);
deviceLocationList
.
add
(
deviceLogin
);
});
});
...
@@ -201,13 +203,12 @@ public class TransitHandleService {
...
@@ -201,13 +203,12 @@ public class TransitHandleService {
/**
/**
* 组合缓存中的 gps 基站 以及停留状态 字段
* 组合缓存中的 gps 基站 以及停留状态 字段
*
*
* @param deviceLogin 组合上点数据
* @param gpsData gps
* @param gpsData gps
* @param bsData 基站
* @param bsData 基站
* @param stayStatusData 设备停留状态
* @param stayStatusData 设备停留状态
* @return 组合上点数据
*/
*/
private
DeviceLocationDto
mergeDeviceLogin
(
DeviceLocationDto
gpsData
,
DeviceLocationDto
bsData
,
DeviceLocationDto
stayStatusData
)
{
private
void
mergeDeviceLogin
(
DeviceLocationDto
deviceLogin
,
DeviceLocationDto
gpsData
,
DeviceLocationDto
bsData
,
DeviceLocationDto
stayStatusData
)
{
DeviceLocationDto
deviceLogin
=
new
DeviceLocationDto
();
// 组合Gps数据
// 组合Gps数据
if
(
null
!=
gpsData
.
getSn
())
{
if
(
null
!=
gpsData
.
getSn
())
{
deviceLogin
.
setSn
(
gpsData
.
getSn
());
deviceLogin
.
setSn
(
gpsData
.
getSn
());
...
@@ -234,7 +235,6 @@ public class TransitHandleService {
...
@@ -234,7 +235,6 @@ public class TransitHandleService {
if
(
null
!=
stayStatusData
.
getStayStatus
())
{
if
(
null
!=
stayStatusData
.
getStayStatus
())
{
deviceLogin
.
setStayStatus
(
stayStatusData
.
getStayStatus
());
deviceLogin
.
setStayStatus
(
stayStatusData
.
getStayStatus
());
}
}
return
deviceLogin
;
}
}
...
...
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