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
a087ff23
authored
Sep 28, 2023
by
杨伟程
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
老人图表bug
parent
3c10f89c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderReportMonthServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderReportMonthServiceImpl.java
View file @
a087ff23
...
...
@@ -17,7 +17,9 @@ import com.makeit.service.platform.elder.*;
import
com.makeit.service.saas.PlatTenantService
;
import
com.makeit.utils.data.convert.BeanDtoVoUtils
;
import
com.makeit.utils.data.convert.StreamUtil
;
import
com.makeit.utils.data.validate.CollectionUtils
;
import
com.makeit.utils.data.validate.MapUtil
;
import
com.makeit.utils.old.StringUtils
;
import
com.makeit.utils.time.LocalDateTimeUtils
;
import
com.makeit.vo.platform.elder.report.day.PlatElderHeartRespiratoryEvaluationVO
;
import
com.makeit.vo.platform.elder.report.day.PlatElderReportMonthVO
;
...
...
@@ -173,8 +175,10 @@ public class PlatElderReportMonthServiceImpl extends ServiceImpl<PlatElderReport
List
<
DeviceInfoContentBreathe
>
breatheList
=
iotProductDeviceService
.
getDeviceLogByTimeRangeBreathe
(
platDevice
.
getOriDeviceId
(),
2
*
24
*
3600
,
yesStart
,
yesEnd
);
reportMonth
.
setHeartRate
((
int
)
(
StreamUtil
.
reduce
(
breatheList
,
i
->
(
long
)
i
.
getProperties
().
getHr
(),
0L
,
Long:
:
sum
)
/
breatheList
.
size
()));
reportMonth
.
setRespiratoryRate
((
int
)
(
StreamUtil
.
reduce
(
breatheList
,
i
->
(
long
)
i
.
getProperties
().
getBr
(),
0L
,
Long:
:
sum
)
/
breatheList
.
size
()));
if
(
CollectionUtils
.
isNotEmpty
(
breatheList
))
{
reportMonth
.
setHeartRate
((
int
)
(
StreamUtil
.
reduce
(
breatheList
,
i
->
(
long
)
i
.
getProperties
().
getHr
(),
0L
,
Long:
:
sum
)
/
breatheList
.
size
()));
reportMonth
.
setRespiratoryRate
((
int
)
(
StreamUtil
.
reduce
(
breatheList
,
i
->
(
long
)
i
.
getProperties
().
getBr
(),
0L
,
Long:
:
sum
)
/
breatheList
.
size
()));
}
List
<
PlatAlarmRecord
>
rList
=
Optional
.
ofNullable
(
recordMap
.
get
(
e
.
getId
())).
orElse
(
new
ArrayList
<>(
10
));
...
...
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