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
41ae3a8c
authored
Mar 27, 2024
by
罗志长
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 设备日志数据过滤
parent
7743fead
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
server-common/src/main/java/com/makeit/module/iot/service/IotProductDeviceService.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderBreatheAnalysisServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderSleepServiceImpl.java
server-common/src/main/java/com/makeit/module/iot/service/IotProductDeviceService.java
View file @
41ae3a8c
...
...
@@ -256,17 +256,21 @@ public class IotProductDeviceService extends IotCommonService {
for
(
DeviceInfoContentBreathe
deviceInfoContentBreathe
:
deviceInfoContentBreathes
)
{
timestamp
=
deviceInfoContentBreathe
.
getTimestamp
();
breatheProperties
=
deviceInfoContentBreathe
.
getProperties
();
if
(
breatheProperties
==
null
||
breatheProperties
.
getPerson
()
==
null
||
breatheProperties
.
getBr
()
==
null
||
breatheProperties
.
getHr
()
==
null
)
{
continue
;
}
if
(
breatheProperties
.
getPerson
()
==
0
)
{
noPersonCount
++;
continue
;
}
// 0和255直接跳过
Integer
propertiesHr
=
breatheProperties
.
getHr
()
!=
null
?
breatheProperties
.
getHr
()
:
0
;
Integer
propertiesHr
=
breatheProperties
.
getHr
();
if
(
propertiesHr
==
255
||
propertiesHr
==
0
)
{
noPersonCount
++;
continue
;
}
Integer
propertiesBr
=
breatheProperties
.
getBr
()
!=
null
?
breatheProperties
.
getBr
()
:
0
;
Integer
propertiesBr
=
breatheProperties
.
getBr
();
if
(
propertiesBr
==
255
||
propertiesBr
==
0
)
{
noPersonCount
++;
continue
;
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderBreatheAnalysisServiceImpl.java
View file @
41ae3a8c
...
...
@@ -159,6 +159,10 @@ public class PlatElderBreatheAnalysisServiceImpl extends ServiceImpl<PlatElderBr
deviceInfoContentBreatheList
.
forEach
(
deviceInfo
->
{
DeviceInfoContentBreathe
.
Properties
deviceProperties
=
deviceInfo
.
getProperties
();
if
(
deviceProperties
==
null
||
deviceProperties
.
getPerson
()
==
null
||
deviceProperties
.
getHr
()
==
null
||
deviceProperties
.
getBr
()
==
null
)
{
return
;
}
int
br
=
deviceProperties
.
getBr
();
int
hr
=
deviceProperties
.
getHr
();
Integer
hasPerson
=
deviceProperties
.
getPerson
();
// 0无人,1有人
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderSleepServiceImpl.java
View file @
41ae3a8c
...
...
@@ -123,6 +123,10 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
for
(
DeviceInfoContentBreathe
infoContentBreathe
:
deviceInfoContentBreathes
)
{
// 体动指数
breatheProperties
=
infoContentBreathe
.
getProperties
();
if
(
breatheProperties
==
null
||
breatheProperties
.
getPerson
()
==
null
||
breatheProperties
.
getBr
()
==
null
||
breatheProperties
.
getHr
()
==
null
)
{
continue
;
}
Integer
bodyMove
=
breatheProperties
.
getBodymove
();
int
br
=
breatheProperties
.
getBr
();
int
hr
=
breatheProperties
.
getHr
();
...
...
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