Commit bb7cb5ac by 汪志阳

fix:bug fix

parent f69cbffe
...@@ -20,7 +20,10 @@ public class AnalysisVO { ...@@ -20,7 +20,10 @@ public class AnalysisVO {
private Boolean isAction; // 每分钟是否动过 private Boolean isAction; // 每分钟是否动过
private Boolean isMoveBed; // 是否离开床 /**
* 是否离开床或无人
*/
private Boolean isMoveBed;
private Boolean isMinuteActionFlag; // 每分钟体动值是否大于阈值 private Boolean isMinuteActionFlag; // 每分钟体动值是否大于阈值
......
...@@ -40,6 +40,11 @@ public class SleepTimeAnalysisVO { ...@@ -40,6 +40,11 @@ public class SleepTimeAnalysisVO {
*/ */
private Integer turnedCount; private Integer turnedCount;
/**
* 所属睡眠区间开始时间
*/
private String belongToSleepTime;
private List<SleepTimeAnalysisVO> deepList; private List<SleepTimeAnalysisVO> deepList;
private List<SleepTimeAnalysisVO> midList; private List<SleepTimeAnalysisVO> midList;
/** /**
......
...@@ -11,13 +11,15 @@ import com.makeit.dto.platform.elder.PlatElderReportDTO; ...@@ -11,13 +11,15 @@ import com.makeit.dto.platform.elder.PlatElderReportDTO;
import com.makeit.entity.platform.alarm.PlatAlarmRecord; import com.makeit.entity.platform.alarm.PlatAlarmRecord;
import com.makeit.entity.platform.alarm.PlatDayDurationRecord; import com.makeit.entity.platform.alarm.PlatDayDurationRecord;
import com.makeit.entity.platform.device.PlatDevice; import com.makeit.entity.platform.device.PlatDevice;
import com.makeit.entity.platform.elder.*; import com.makeit.entity.platform.elder.PlatElder;
import com.makeit.entity.platform.elder.PlatElderBreatheAnalysis;
import com.makeit.entity.platform.elder.PlatElderSleep;
import com.makeit.entity.platform.elder.PlatElderSleepAnalysis;
import com.makeit.entity.saas.analysis.SaasSleepEvaluateStandardReport; import com.makeit.entity.saas.analysis.SaasSleepEvaluateStandardReport;
import com.makeit.enums.CommonEnum; import com.makeit.enums.CommonEnum;
import com.makeit.enums.platform.alarm.PlatAlarmConfigEnum; import com.makeit.enums.platform.alarm.PlatAlarmConfigEnum;
import com.makeit.enums.report.SleepTypeEnum; import com.makeit.enums.report.SleepTypeEnum;
import com.makeit.module.iot.service.IotProductDeviceService; import com.makeit.module.iot.service.IotProductDeviceService;
import com.makeit.module.iot.vo.analysis.EvaluateReportVO;
import com.makeit.module.iot.vo.fall.DeviceInfoContentFall; import com.makeit.module.iot.vo.fall.DeviceInfoContentFall;
import com.makeit.module.iot.vo.space.DeviceInfoContentSpace; import com.makeit.module.iot.vo.space.DeviceInfoContentSpace;
import com.makeit.service.platform.alarm.PlatAlarmRecordService; import com.makeit.service.platform.alarm.PlatAlarmRecordService;
...@@ -134,14 +136,12 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe ...@@ -134,14 +136,12 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
} }
// String sleepScore = platElderSleepAnalysis.getSleepScore(); // String sleepScore = platElderSleepAnalysis.getSleepScore();
Long sleepScore = getSleepScore(platElderSleepAnalysis); // Long sleepScore = getSleepScore(platElderSleepAnalysis);
// EvaluateReportVO evaluateReport = sleepEvaluateReportService.getByScore(sleepScore);
platElderSleepEvaluationVO.setScore(Integer.parseInt(platElderSleepAnalysis.getSleepScore()));
EvaluateReportVO evaluateReport = sleepEvaluateReportService.getByScore(sleepScore);
platElderSleepEvaluationVO.setScore(Integer.valueOf(sleepScore + ""));
platElderSleepEvaluationVO.setResult(platElderSleepAnalysis.getSleepResult()); platElderSleepEvaluationVO.setResult(platElderSleepAnalysis.getSleepResult());
platElderSleepEvaluationVO.setEvaluation(evaluateReport.getEvaluate()); platElderSleepEvaluationVO.setEvaluation(platElderSleepAnalysis.getSleepEvaluate());
platElderSleepEvaluationVO.setSleepDuration(Integer.valueOf(platElderSleepAnalysis.getSleepTime() + "")); platElderSleepEvaluationVO.setSleepDuration(Integer.valueOf(platElderSleepAnalysis.getSleepTime() + ""));
platElderSleepEvaluationVO.setRestDuration(Integer.valueOf(platElderSleepAnalysis.getRestTime() + "")); platElderSleepEvaluationVO.setRestDuration(Integer.valueOf(platElderSleepAnalysis.getRestTime() + ""));
...@@ -235,6 +235,7 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe ...@@ -235,6 +235,7 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
return contentVO; return contentVO;
}); });
contentList = contentList.stream().filter(f -> !"resting".equals(f.getSleepType())).collect(Collectors.toList());
vo.setContentList(contentList); vo.setContentList(contentList);
return vo; return vo;
}); });
......
...@@ -8,4 +8,9 @@ public class PlatSleepRangeVO { ...@@ -8,4 +8,9 @@ public class PlatSleepRangeVO {
private String sleepType; private String sleepType;
private String startTime; private String startTime;
private String endTime; private String endTime;
/**
* 所属睡眠区间开始时间
*/
private String belongToSleepTime;
} }
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