Commit 8383f541 by 汪志阳

fix:中度睡眠计算

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