Commit 8383f541 by 汪志阳

fix:中度睡眠计算

parent aad41a52
......@@ -888,17 +888,17 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
PlatElder elder = platElderService.getOne(new QueryWrapper<PlatElder>().lambda()
.eq(PlatElder::getBedId, bedId));
// || !"1712648603580764161".equals(elder.getId())
if (elder == null || !"1712648603580764161".equals(elder.getId()) ) {
if (elder == null) {
continue;
}
PlatDevice platDevice = platDeviceService.getById(platRoomBedDevice.getDeviceId());
// || !"218A00XE2669104".equals(platDevice.getOriDeviceId())
if (platDevice == null || !"218A00XE2669104".equals(platDevice.getOriDeviceId())) {
if (platDevice == null) {
continue;
}
String tenantId = elder.getTenantId();
dayHourRangeList = Lists.newArrayList("2024-01-29 23:38:00~2024-01-30 01:53:00");
// dayHourRangeList = Lists.newArrayList("2024-01-29 23:38:00~2024-01-30 01:53:00");
for (String hourRange : dayHourRangeList) {
String[] hourRangeArray = hourRange.split("~");
List<DeviceOperationLogEntity> deviceOperationLogEntities = productDeviceService.getDeviceLogByTimeRange(platDevice.getOriDeviceId(), "reportProperty", 5000, hourRangeArray[0], hourRangeArray[1]);
......@@ -923,8 +923,6 @@ public class PlatElderSleepServiceImpl extends ServiceImpl<PlatElderSleepMapper,
totalMap.putAll(statisticsMap);
}
}
// 本地测试用
// totalMap = deviceLogService.getData();
if (CollUtil.isEmpty(totalMap)) {
continue;
}
......
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