Commit a6a112b6 by 汪志阳

fix:bug修复

parent bd36f727
......@@ -159,10 +159,6 @@ public class OffBedAlarm implements IAlarm {
LocalTime endTimeLimit = endTime.plusMinutes(-duration);
// 离床时间在范围内
if (isInTime && isOverTime) {
if (firstTime.isAfter(endTimeLimit)) {
log.info("handleCrossDay 第一次离床时间,{}+持续时间:{}将超过范围,{}", firstTime, duration, endTime);
return;
}
platAlarmCheckDTO.setAbnormalValue(String.valueOf(currentTimeMillis - firstOffBedLong));
platAlarmCheckDTO.setPlatAlarmConfig(config);
log.info("cross离床告警离床时间在范围时间内,配置:{}", config.getRuleConfig());
......@@ -198,7 +194,7 @@ public class OffBedAlarm implements IAlarm {
LocalTime startTime = ruleConfig.getOffBedStart();
LocalDateTime startLocalDteTime = LocalDateTime.of(LocalDate.now(), startTime);
LocalTime endTime = ruleConfig.getOffBedEnd();
LocalDateTime endLocalDteTime = LocalDateTime.of(LocalDate.now(), endTime);
// LocalDateTime endLocalDteTime = LocalDateTime.of(LocalDate.now(), endTime);
Long firstOffBedLong = alarmRedisDTO.getStartLong();
long currentTimeMillis = System.currentTimeMillis();
......
package com.makeit.iotapi;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.makeit.dto.platform.alarm.PlatAlarmCheckDTO;
import com.makeit.entity.platform.device.PlatDevice;
import com.makeit.module.admin.vo.plat.PlatTenantVO;
......@@ -89,6 +91,14 @@ public class IotDeviceInfoContentFall {
platDevice.setOrgId("1712384736845950978");
platDevice.setId("1732609639364812811");
platAlarmCheckDTO.setPlatDevice(platDevice);
JSONObject properties = JSON.parseObject("{\n" +
" \"person\": 0,\n" +
" \"personState\": 0,\n" +
" \"distance\": 50,\n" +
" \"hr\": 80,\n" +
" \"br\": 20,\n" +
" \"bodymove\": 50,\n}");
platAlarmCheckDTO.setProperties(properties);
offBedAlarm.checkConfig(platAlarmCheckDTO);
}
}
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