Commit 95d30d50 by 汪志阳

fix:bug fix

parent cfe92280
......@@ -212,9 +212,7 @@ public class OffBedAlarm implements IAlarm {
log.info("deviceId:{},uncross_config:{},第一次离床时间:{}", deviceId, config.getRuleConfig(), longToTime(alarmRedisDTO.getStartLong()));
Integer duration = ruleConfig.getDuration();
LocalTime startTime = ruleConfig.getOffBedStart();
// LocalDateTime startLocalDteTime = LocalDateTime.of(LocalDate.now(), startTime);
LocalTime endTime = ruleConfig.getOffBedEnd();
// LocalDateTime endLocalDteTime = LocalDateTime.of(LocalDate.now(), endTime);
Long firstOffBedLong = alarmRedisDTO.getStartLong();
long currentTimeMillis = currentLong();
......@@ -236,7 +234,7 @@ public class OffBedAlarm implements IAlarm {
return;
}
LocalTime localTime = LocalTime.now().plusHours(6);
LocalTime localTime = LocalTime.now().plusHours(6).plusMinutes(25);
if (!isInTime && localTime.isAfter(startTime) && localTime.isBefore(endTime)) {
LocalDateTime dateTime = LocalDateTime.of(LocalDate.now(), startTime);
long mills = Duration.between(dateTime, currentTime()).toMillis() / 1000;
......@@ -334,7 +332,7 @@ public class OffBedAlarm implements IAlarm {
}
private static LocalDateTime currentTime() {
return LocalDateTime.now().plusHours(6);
return LocalDateTime.now().plusHours(6).plusMinutes(25);
// return LocalDateTime.now();
}
......
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