Commit 49311086 by huangjy

fix:状态问题

parent 2b0aecac
......@@ -193,7 +193,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
Long sleepTimeActionDuration = getSleepTimeActionDuration();
Set<String> dataSet = redisTemplate.opsForZSet().rangeByScore(DEVICE_BR_ANALYSIS + platDevice.getOriDeviceId(), 0, Integer.MAX_VALUE);
if (CollectionUtils.isNotEmpty(dataSet) && sleepTimeActionDuration - dataSet.size() <= 2) {
boolean flag = dataSet.stream().anyMatch(s -> {
boolean flag = dataSet.stream().allMatch(s -> {
JSONObject result = JSON.parseObject(s);
JSONObject properties = (JSONObject)result.get("properties");
Integer bodymove = Integer.valueOf(properties.getString("bodymove"));
......@@ -219,6 +219,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
return platElderRealTimeNowVO;
}
} else {
redisTemplate.delete(DEVICE_BR_ANALYSIS + platDevice.getOriDeviceId());
brNoPersonFlag = true;
}
} else {
......
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