Commit 2e36891d by huangjy

fix:空间跌倒设备取10秒数据

parent 42f513b8
...@@ -233,8 +233,9 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService { ...@@ -233,8 +233,9 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
boolean spaceNoPersonFlag = false; boolean spaceNoPersonFlag = false;
for (PlatDevice device : spaceDeviceList) { for (PlatDevice device : spaceDeviceList) {
// 无人 // 无人
Set<String> dataSet = redisTemplate.opsForZSet().rangeByScore(DEVICE_SPACE_TEMP_DATA + platDevice.getOriDeviceId(), currentSecond - 30, currentSecond); Set<String> dataSet = redisTemplate.opsForZSet().rangeByScore(DEVICE_SPACE_TEMP_DATA + platDevice.getOriDeviceId(), currentSecond - 10, currentSecond);
if (CollectionUtils.isEmpty(dataSet)) { if (CollectionUtils.isEmpty(dataSet)) {
log.info("空间设备当前没有上报数据直接返回");
spaceNoPersonFlag = true; spaceNoPersonFlag = true;
continue; continue;
} }
...@@ -279,8 +280,9 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService { ...@@ -279,8 +280,9 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
boolean fallNoPersonFlag = false; boolean fallNoPersonFlag = false;
for (PlatDevice device : fallDeviceList) { for (PlatDevice device : fallDeviceList) {
// 无人 // 无人
Set<String> dataSet = redisTemplate.opsForZSet().rangeByScore(DEVICE_FALL_TEMP_DATA + platDevice.getOriDeviceId(), currentSecond - 30, currentSecond); Set<String> dataSet = redisTemplate.opsForZSet().rangeByScore(DEVICE_FALL_TEMP_DATA + platDevice.getOriDeviceId(), currentSecond - 10, currentSecond);
if (CollectionUtils.isEmpty(dataSet)) { if (CollectionUtils.isEmpty(dataSet)) {
log.info("跌倒设备当前没有上报数据直接返回");
fallNoPersonFlag = true; fallNoPersonFlag = true;
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