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
90de48d8
authored
Dec 06, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat: 生成报告过滤呼吸心率是0和255
parent
fc6176f2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
server-common/src/main/java/com/makeit/module/iot/service/IotProductDeviceService.java
server-common/src/main/java/com/makeit/module/iot/service/IotProductDeviceService.java
View file @
90de48d8
...
@@ -233,6 +233,7 @@ public class IotProductDeviceService extends IotCommonService {
...
@@ -233,6 +233,7 @@ public class IotProductDeviceService extends IotCommonService {
DeviceInfoContentBreathe
.
Properties
tempProperties
;
DeviceInfoContentBreathe
.
Properties
tempProperties
;
for
(
Map
.
Entry
<
String
,
List
<
DeviceInfoContentBreathe
>>
entry
:
minuteMap
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
List
<
DeviceInfoContentBreathe
>>
entry
:
minuteMap
.
entrySet
())
{
deviceInfoContentBreathes
=
entry
.
getValue
();
deviceInfoContentBreathes
=
entry
.
getValue
();
int
reportCount
=
deviceInfoContentBreathes
.
size
();
DeviceInfoContentBreathe
.
Properties
breatheProperties
;
DeviceInfoContentBreathe
.
Properties
breatheProperties
;
Integer
bodymove
=
0
;
Integer
bodymove
=
0
;
int
br
=
0
;
int
br
=
0
;
...
@@ -246,15 +247,27 @@ public class IotProductDeviceService extends IotCommonService {
...
@@ -246,15 +247,27 @@ public class IotProductDeviceService extends IotCommonService {
noPersonCount
++;
noPersonCount
++;
continue
;
continue
;
}
}
// 0和255直接跳过
if
(
breatheProperties
.
getHr
()
==
255
||
breatheProperties
.
getHr
()
==
0
)
{
noPersonCount
++;
continue
;
}
if
(
breatheProperties
.
getBr
()
==
255
||
breatheProperties
.
getBr
()
==
0
)
{
noPersonCount
++;
continue
;
}
hr
+=
breatheProperties
.
getHr
();
hr
+=
breatheProperties
.
getHr
();
br
+=
breatheProperties
.
getBr
();
br
+=
breatheProperties
.
getBr
();
bodymove
+=
breatheProperties
.
getBodymove
();
bodymove
+=
breatheProperties
.
getBodymove
();
}
}
temp
=
new
DeviceInfoContentBreathe
();
temp
=
new
DeviceInfoContentBreathe
();
tempProperties
=
new
DeviceInfoContentBreathe
.
Properties
();
tempProperties
=
new
DeviceInfoContentBreathe
.
Properties
();
tempProperties
.
setHr
(
noPersonCount
==
60
?
0
:
hr
/
(
60
-
noPersonCount
));
if
(
noPersonCount
==
reportCount
)
{
tempProperties
.
setBr
(
noPersonCount
==
60
?
0
:
br
/
(
60
-
noPersonCount
));
continue
;
tempProperties
.
setBodymove
(
noPersonCount
==
60
?
0
:
bodymove
/
(
60
-
noPersonCount
));
}
tempProperties
.
setHr
(
hr
/
(
reportCount
-
noPersonCount
));
tempProperties
.
setBr
(
br
/
(
reportCount
-
noPersonCount
));
tempProperties
.
setBodymove
(
bodymove
/
(
reportCount
-
noPersonCount
));
temp
.
setTimestamp
(
timestamp
);
temp
.
setTimestamp
(
timestamp
);
temp
.
setProperties
(
tempProperties
);
temp
.
setProperties
(
tempProperties
);
tempList
.
add
(
temp
);
tempList
.
add
(
temp
);
...
...
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