Commit 1fe31ff4 by huangjy

fix:睡眠分析模型百分十的容错

parent ed634944
......@@ -192,7 +192,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
Integer sleepTimeActionThreshold = getSleepTimeActionThreshold();
Long sleepTimeActionDuration = getSleepTimeActionDuration();
Set<String> dataSet = redisTemplate.opsForZSet().rangeByScore(DEVICE_BR_ANALYSIS + platDevice.getOriDeviceId(), currentSecond - sleepTimeActionDuration, currentSecond);
if (CollectionUtils.isNotEmpty(dataSet)) {
if (CollectionUtils.isNotEmpty(dataSet) && dataSet.size() >= sleepTimeActionDuration * 0.9 ) {
boolean flag = dataSet.stream().allMatch(s -> {
JSONObject result = JSON.parseObject(s);
JSONObject properties = (JSONObject)result.get("properties");
......
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