Commit 6626bf8b by 汪志阳

fix:bug修改

parent b6efebe9
...@@ -128,16 +128,16 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper, ...@@ -128,16 +128,16 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
noPersonCount++; noPersonCount++;
isMoveBed = true; isMoveBed = true;
awakeMinuteActionFlag = true; awakeMinuteActionFlag = true;
continue; // continue;
} }
// 0和255直接跳过 // 0和255直接跳过
if (breatheProperties.getHr() == 255 || breatheProperties.getHr() == 0) { if (breatheProperties.getHr() == 255 || breatheProperties.getHr() == 0) {
noPersonCount++; noPersonCount++;
continue; // continue;
} }
if (breatheProperties.getBr() == 255 || breatheProperties.getBr() == 0) { if (breatheProperties.getBr() == 255 || breatheProperties.getBr() == 0) {
noPersonCount++; noPersonCount++;
continue; // continue;
} }
if (bodyMove > actionThreshold) { if (bodyMove > actionThreshold) {
bodymoveCount++; bodymoveCount++;
...@@ -179,9 +179,9 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper, ...@@ -179,9 +179,9 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
hrBrCount++; hrBrCount++;
} }
} }
if (reportSize == noPersonCount) { // if (reportSize == noPersonCount) {
continue; // continue;
} // }
// 每分钟的数据 // 每分钟的数据
analysisVO.setTotalBr(totalBr); analysisVO.setTotalBr(totalBr);
analysisVO.setAvgBr(totalBr / reportSize); analysisVO.setAvgBr(totalBr / reportSize);
...@@ -461,6 +461,14 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper, ...@@ -461,6 +461,14 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
SleepCountDTO sleepCountDTO = new SleepCountDTO(); SleepCountDTO sleepCountDTO = new SleepCountDTO();
sleepCountDTO.setDaySleepMap(daySleepMap); sleepCountDTO.setDaySleepMap(daySleepMap);
sleepCountDTO.setRestSleepMap(restSleepMap); sleepCountDTO.setRestSleepMap(restSleepMap);
TreeMap<String, TreeMap<String, AnalysisVO>> allSleepMap = new TreeMap<>();
if (CollUtil.isNotEmpty(daySleepMap)) {
allSleepMap.putAll(daySleepMap);
}
if (CollUtil.isNotEmpty(restSleepMap)) {
allSleepMap.putAll(restSleepMap);
}
sleepCountDTO.setAllSleepMap(allSleepMap);
return sleepCountDTO; return sleepCountDTO;
} }
...@@ -778,17 +786,14 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper, ...@@ -778,17 +786,14 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
for (PlatRoomBedDevice platRoomBedDevice : platRoomBedDeviceList) { for (PlatRoomBedDevice platRoomBedDevice : platRoomBedDeviceList) {
TreeMap<String, AnalysisVO> totalMap = new TreeMap<>(); TreeMap<String, AnalysisVO> totalMap = new TreeMap<>();
// if (!"1732647368962203650".equals(platRoomBedDevice.getId())) {
// continue;
// }
String bedId = platRoomBedDevice.getBedId(); String bedId = platRoomBedDevice.getBedId();
PlatElder elder = platElderService.getOne(new QueryWrapper<PlatElder>().lambda() PlatElder elder = platElderService.getOne(new QueryWrapper<PlatElder>().lambda()
.eq(PlatElder::getBedId, bedId)); .eq(PlatElder::getBedId, bedId));
if (elder == null) { if (elder == null || !"1712648603580764161".equals(elder.getId())) {
continue; continue;
} }
PlatDevice platDevice = platDeviceService.getById(platRoomBedDevice.getDeviceId()); PlatDevice platDevice = platDeviceService.getById(platRoomBedDevice.getDeviceId());
if (platDevice == null ) { if (platDevice == null || !"218A00XE2669104".equals(platDevice.getOriDeviceId())) {
continue; continue;
} }
String tenantId = elder.getTenantId(); String tenantId = elder.getTenantId();
...@@ -812,7 +817,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper, ...@@ -812,7 +817,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
TreeMap<String, AnalysisVO> statisticsMap = getPerMinuteData(minuteMap, analysisModel); TreeMap<String, AnalysisVO> statisticsMap = getPerMinuteData(minuteMap, analysisModel);
if (CollUtil.isNotEmpty(statisticsMap)) { if (CollUtil.isNotEmpty(statisticsMap)) {
//测试环境数据 device_minute_info //测试环境数据 device_minute_info
// testLogService.saveEntity(statisticsMap, platRoomBedDevice.getId()); // deviceLogService.saveEntity(statisticsMap, platRoomBedDevice.getId());
totalMap.putAll(statisticsMap); totalMap.putAll(statisticsMap);
} }
} }
...@@ -831,7 +836,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper, ...@@ -831,7 +836,7 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
// 获取睡眠和小憩 // 获取睡眠和小憩
SleepCountDTO sleepCountDTO = deepSleepAndRestData(sleepTypeMap, analysisModel, sleepTimeAnalysisVOList); SleepCountDTO sleepCountDTO = deepSleepAndRestData(sleepTypeMap, analysisModel, sleepTimeAnalysisVOList);
// 满足睡眠条件的map // 满足睡眠条件的map
TreeMap<String, TreeMap<String, AnalysisVO>> daySleepMap = sleepCountDTO.getDaySleepMap(); TreeMap<String, TreeMap<String, AnalysisVO>> daySleepMap = sleepCountDTO.getAllSleepMap();
// 深度睡眠 // 深度睡眠
deepSleepData(daySleepMap, analysisModel, sleepTimeAnalysisVOList); deepSleepData(daySleepMap, analysisModel, sleepTimeAnalysisVOList);
// 中度睡眠 // 中度睡眠
......
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