Commit 21a5d771 by huangjy

fix:告警列表

parent 29918b74
......@@ -123,14 +123,16 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
@Override
public PageVO<PlatAlarmRecordVO> childrenPage(PageReqDTO<PlatAlarmRecordQueryDTO> dto) {
PlatElderChildrenInfo platElderChildrenInfo = platElderChildrenInfoService.getById(WechatUserUtil.getUserId());
List<PlatElderChildrenInfo> platElderChildrenInfoList = platElderChildrenInfoService.list(new QueryWrapper<PlatElderChildrenInfo>().lambda().eq(PlatElderChildrenInfo::getOpenid, platElderChildrenInfo)
.isNotNull(PlatElderChildrenInfo::getElderId));
log.info("子女端账号:"+platElderChildrenInfo.toString());
String elderId = platElderChildrenInfo.getElderId();
if(StringUtils.isBlank(elderId)){
if(CollectionUtils.isNotEmpty(platElderChildrenInfoList)){
return new PageVO<>();
}
String[] split = elderId.split(",");
List<String> elderIdList = platElderChildrenInfoList.stream().map(PlatElderChildrenInfo::getElderId).collect(Collectors.toList());
PlatAlarmRecordQueryDTO data = dto.getData();
data.setElderIdList(Arrays.asList(split));
data.setElderIdList(elderIdList);
data.setNoticeStatus(CommonEnum.YES.getValue());
return page(dto);
}
......
......@@ -206,6 +206,9 @@ public class PlatElderDayReportWeekServiceImpl implements PlatElderDayReportWeek
platElderSleepEvaluationVO.setScore(score);
platElderSleepEvaluationVO.setSleepDuration(sleepDuration);
platElderSleepEvaluationVO.setRestDuration(restDuration);
platElderSleepEvaluationVO.setSleepDurationHour(new BigDecimal(platElderSleepEvaluationVO.getSleepDuration()).divide(new BigDecimal(60), 2, BigDecimal.ROUND_HALF_UP));
platElderSleepEvaluationVO.setRestDurationHour(new BigDecimal(platElderSleepEvaluationVO.getRestDuration()).divide(new BigDecimal(60), 2, BigDecimal.ROUND_HALF_UP));
EvaluateReportVO evaluateReportVO = saasSleepEvaluateReportService.getByScore(platElderSleepEvaluationVO.getScore());
if (evaluateReportVO != null) {
......
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