Commit a087ff23 by 杨伟程

老人图表bug

parent 3c10f89c
...@@ -17,7 +17,9 @@ import com.makeit.service.platform.elder.*; ...@@ -17,7 +17,9 @@ import com.makeit.service.platform.elder.*;
import com.makeit.service.saas.PlatTenantService; import com.makeit.service.saas.PlatTenantService;
import com.makeit.utils.data.convert.BeanDtoVoUtils; import com.makeit.utils.data.convert.BeanDtoVoUtils;
import com.makeit.utils.data.convert.StreamUtil; 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.data.validate.MapUtil;
import com.makeit.utils.old.StringUtils;
import com.makeit.utils.time.LocalDateTimeUtils; import com.makeit.utils.time.LocalDateTimeUtils;
import com.makeit.vo.platform.elder.report.day.PlatElderHeartRespiratoryEvaluationVO; import com.makeit.vo.platform.elder.report.day.PlatElderHeartRespiratoryEvaluationVO;
import com.makeit.vo.platform.elder.report.day.PlatElderReportMonthVO; import com.makeit.vo.platform.elder.report.day.PlatElderReportMonthVO;
...@@ -173,8 +175,10 @@ public class PlatElderReportMonthServiceImpl extends ServiceImpl<PlatElderReport ...@@ -173,8 +175,10 @@ public class PlatElderReportMonthServiceImpl extends ServiceImpl<PlatElderReport
List<DeviceInfoContentBreathe> breatheList = iotProductDeviceService.getDeviceLogByTimeRangeBreathe(platDevice.getOriDeviceId(), 2 * 24 * 3600, yesStart, yesEnd); List<DeviceInfoContentBreathe> breatheList = iotProductDeviceService.getDeviceLogByTimeRangeBreathe(platDevice.getOriDeviceId(), 2 * 24 * 3600, yesStart, yesEnd);
if (CollectionUtils.isNotEmpty(breatheList)) {
reportMonth.setHeartRate((int) (StreamUtil.reduce(breatheList, i -> (long) i.getProperties().getHr(), 0L, Long::sum) / breatheList.size())); 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())); 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)); List<PlatAlarmRecord> rList = Optional.ofNullable(recordMap.get(e.getId())).orElse(new ArrayList<>(10));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment