Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d3adc875
authored
Apr 08, 2024
by
龚榕城
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
强转修改
parent
101f8a18
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderRealTimeServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderRealTimeServiceImpl.java
View file @
d3adc875
package
com
.
makeit
.
service
.
platform
.
elder
.
impl
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -306,7 +307,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
JSONObject
result
=
JSON
.
parseObject
(
entity
);
JSONObject
properties
=
(
JSONObject
)
result
.
get
(
"properties"
);
Object
track
=
properties
.
get
(
"track"
);
List
<
Double
>
list
=
track
==
null
?
Lists
.
newArrayList
()
:
(
List
<
Double
>)
track
;
List
<
Double
>
list
=
track
==
null
?
Lists
.
newArrayList
()
:
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
track
),
Double
.
class
)
;
vo
.
setX
(
CollectionUtils
.
isNotEmpty
(
list
)
?
list
.
get
(
1
)
:
null
);
vo
.
setY
(
CollectionUtils
.
isNotEmpty
(
list
)
?
list
.
get
(
2
)
:
null
);
int
personState
=
properties
.
getInteger
(
"personState"
);
...
...
@@ -508,7 +509,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
vo
.
setDeviceId
(
platDevice
.
getId
());
vo
.
setOriDeviceId
(
platDevice
.
getOriDeviceId
());
Object
track
=
jsonObject
.
get
(
"track"
);
vo
.
setTrack
((
track
==
null
?
Lists
.
newArrayList
()
:
(
List
<
Double
>)
track
));
vo
.
setTrack
((
track
==
null
?
Lists
.
newArrayList
()
:
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
track
),
Double
.
class
)
));
vo
.
setPersonState
(
Integer
.
valueOf
(
jsonObject
.
getString
(
"personState"
)));
vo
.
setMount
(
Integer
.
valueOf
(
jsonObject
.
getString
(
"mount"
)));
vo
.
setType
(
2
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment