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 e7f6ffdd
authored
Jan 04, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化Gps基站消费逻辑
1 parent
fdc1424a
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 @
e7f6ffd
...
...
@@ -5,7 +5,6 @@ import cn.com.glsx.kafka.queue.remote.RemoteDeviceLocationService;
import
cn.com.glsx.stdinterface.dto.DeviceLocationDto
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.glsx.plat.redis.utils.RedisUtils
;
import
com.google.common.collect.Lists
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -139,17 +138,17 @@ public class TransitHandleService {
// 合并Gps 基站 停留状态数据
snTempList
.
forEach
(
sn
->
{
DeviceLocationDto
gpsData
=
(
DeviceLocationDto
)
redisUtils
.
get
(
setKey
(
sn
,
Constants
.
GPS
));
log
.
info
(
"gpsData==="
+
JSONUtil
.
toJsonStr
(
gpsData
));
//
log.info("gpsData===" + JSONUtil.toJsonStr(gpsData));
if
(
ObjectUtil
.
isNull
(
gpsData
))
{
gpsData
=
new
DeviceLocationDto
();
}
DeviceLocationDto
bsData
=
(
DeviceLocationDto
)
redisUtils
.
get
(
setKey
(
sn
,
Constants
.
BS
));
log
.
info
(
"bsData==="
+
JSONUtil
.
toJsonStr
(
bsData
));
//
log.info("bsData===" + JSONUtil.toJsonStr(bsData));
if
(
ObjectUtil
.
isNull
(
bsData
))
{
bsData
=
new
DeviceLocationDto
();
}
DeviceLocationDto
stayStatusData
=
(
DeviceLocationDto
)
redisUtils
.
get
(
setKey
(
sn
,
Constants
.
STAY_STATUS
));
log
.
info
(
"stayStatusData==="
+
JSONUtil
.
toJsonStr
(
stayStatusData
));
//
log.info("stayStatusData===" + JSONUtil.toJsonStr(stayStatusData));
if
(
ObjectUtil
.
isNull
(
stayStatusData
))
{
stayStatusData
=
new
DeviceLocationDto
();
}
...
...
@@ -162,7 +161,8 @@ public class TransitHandleService {
});
// 数据入库
log
.
info
(
"deviceLocationList==="
+
JSONUtil
.
toJsonStr
(
deviceLocationList
));
log
.
info
(
"deviceLocationList size==="
+
deviceLocationList
.
size
());
// log.info("deviceLocationList===" + JSONUtil.toJsonStr(deviceLocationList));
remoteDeviceLocationService
.
saveOrUpdateDeviceLocationData
(
deviceLocationList
);
// 将sn解锁
snTempList
.
forEach
(
sn
->
{
...
...
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