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
f92d1460
authored
Dec 06, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat: 睡眠分析报告过滤呼吸心率是0和255
parent
90de48d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderSleepServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderSleepServiceImpl.java
View file @
f92d1460
...
@@ -164,6 +164,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
...
@@ -164,6 +164,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
DeviceInfoContentBreathe
.
Properties
breatheProperties
;
DeviceInfoContentBreathe
.
Properties
breatheProperties
;
Integer
bodymove
;
Integer
bodymove
;
int
reportSize
=
deviceInfoContentBreathes
.
size
();
// 记录总呼吸率和总心率
// 记录总呼吸率和总心率
int
maxBr
=
0
;
int
maxBr
=
0
;
int
minBr
=
0
;
int
minBr
=
0
;
...
@@ -182,6 +183,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
...
@@ -182,6 +183,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
boolean
isMoveBed
=
true
;
boolean
isMoveBed
=
true
;
boolean
awakeMinuteActionFlag
=
true
;
// 清醒每分钟体动是否满足要求
boolean
awakeMinuteActionFlag
=
true
;
// 清醒每分钟体动是否满足要求
int
noPersonCount
=
0
;
// 无人跳过计数
int
sleepDeepMinuteCount
=
0
;
// 深睡每分钟体动和翻身次数
int
sleepDeepMinuteCount
=
0
;
// 深睡每分钟体动和翻身次数
int
sleepModerateAMinuteCount
=
0
;
// 中度睡每分钟体动和翻身次数
int
sleepModerateAMinuteCount
=
0
;
// 中度睡每分钟体动和翻身次数
for
(
DeviceInfoContentBreathe
infoContentBreathe
:
deviceInfoContentBreathes
)
{
for
(
DeviceInfoContentBreathe
infoContentBreathe
:
deviceInfoContentBreathes
)
{
...
@@ -191,6 +193,21 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
...
@@ -191,6 +193,21 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
int
br
=
breatheProperties
.
getBr
();
int
br
=
breatheProperties
.
getBr
();
int
hr
=
breatheProperties
.
getHr
();
int
hr
=
breatheProperties
.
getHr
();
Integer
hasPerson
=
breatheProperties
.
getPerson
();
// 0无人,1有人
Integer
hasPerson
=
breatheProperties
.
getPerson
();
// 0无人,1有人
if
(
breatheProperties
.
getPerson
()
==
0
)
{
noPersonCount
++;
continue
;
}
// 0和255直接跳过
if
(
breatheProperties
.
getHr
()
==
255
||
breatheProperties
.
getHr
()
==
0
)
{
noPersonCount
++;
continue
;
}
if
(
breatheProperties
.
getBr
()
==
255
||
breatheProperties
.
getBr
()
==
0
)
{
noPersonCount
++;
continue
;
}
if
(
bodymove
>
actionThreshold
)
{
if
(
bodymove
>
actionThreshold
)
{
bodymoveCount
++;
bodymoveCount
++;
}
}
...
@@ -234,12 +251,15 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
...
@@ -234,12 +251,15 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
hrBrCount
++;
hrBrCount
++;
}
}
}
}
if
(
reportSize
==
noPersonCount
)
{
continue
;
}
analysisVO
.
setTotalBr
(
totalBr
);
analysisVO
.
setTotalBr
(
totalBr
);
analysisVO
.
setAvgBr
(
totalBr
/
60
);
analysisVO
.
setAvgBr
(
totalBr
/
reportSize
);
analysisVO
.
setTotalHr
(
totalHr
);
analysisVO
.
setTotalHr
(
totalHr
);
analysisVO
.
setAvgHr
(
totalHr
/
60
);
analysisVO
.
setAvgHr
(
totalHr
/
reportSize
);
analysisVO
.
setMaxBr
(
maxBr
);
analysisVO
.
setMaxBr
(
maxBr
);
analysisVO
.
setMinBr
(
minBr
);
analysisVO
.
setMinBr
(
minBr
);
...
...
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