Commit a6a6d251 by 汪志阳

fix:bug修改

parent 8705a55d
......@@ -79,8 +79,7 @@ public class OffBedAlarm implements IAlarm {
log.error("离床告警配置解析失败,config:{}", JSONUtil.toJsonStr(config));
return;
}
if (!"0".equals(ruleConfig.getStartTimeType())
|| ruleConfig.getOffBedStart().isAfter(ruleConfig.getOffBedEnd())) {
if (!"0".equals(ruleConfig.getStartTimeType())) {
return;
}
JSONObject properties = platAlarmCheckDTO.getProperties();
......@@ -96,6 +95,10 @@ public class OffBedAlarm implements IAlarm {
}
LocalDateTime startTime = timeRange.get(0);
LocalDateTime endTime = "1".equals(ruleConfig.getEndTimeType()) ? timeRange.get(1).plusDays(1) : timeRange.get(1);
if (startTime.isAfter(endTime)) {
log.error("离床告警配置开始时间大于结束时间,config:{}", JSONUtil.toJsonStr(ruleConfig));
return;
}
Integer duration = ruleConfig.getDuration();
String personState = Convert.toStr(properties.get("person"));
boolean isOffBed = "0".equals(personState);
......
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