Commit 06ca2800 by 汪志阳

fix:组织config查询

parent 19788a3c
......@@ -64,10 +64,10 @@ public class OffBedAlarm implements IAlarm {
}
// PlatAlarmConfig config = alarmConfigCacheUtil.get(platDevice.getOrgId(), PlatAlarmConfigEnum.AlarmTypeEnum.OFF_BED.getValue());
// PlatAlarmConfig platAlarmConfig = platAlarmCheckDTO.getPlatAlarmConfig();
List<PlatAlarmConfig> configList = platAlarmConfigService.listOfBed(platDevice.getOriDeviceId());
List<PlatAlarmConfig> configList = platAlarmConfigService.listOfBed(platDevice.getId());
if(CollUtil.isNotEmpty(configList)) {
configList.forEach(c -> {
log.info("离床告警dto,org_config:{}", c.getRuleConfig());
log.info("离床告警dto,org_config:{},设备id:{}", c.getRuleConfig(), platDevice.getId());
offBedCheckAlarm(c, platAlarmCheckDTO, platDevice);
});
}
......@@ -243,7 +243,7 @@ public class OffBedAlarm implements IAlarm {
}
LocalDateTime now = currentTime();
LocalTime localTime = LocalTime.now().plusHours(13);
LocalTime localTime = LocalTime.now().plusHours(12);
if (!isInTime && localTime.isAfter(startTime) && localTime.isBefore(endTime)) {
long mills = Duration.between(startLocalDteTime, now).toMillis() / 1000;
boolean noInOverTime = mills >= duration * 60;
......@@ -328,7 +328,7 @@ public class OffBedAlarm implements IAlarm {
}
private LocalDateTime currentTime() {
return LocalDateTime.now().plusHours(13);
return LocalDateTime.now().plusHours(12);
// return LocalDateTime.now();
}
......
......@@ -27,7 +27,7 @@
select *
from plat_alarm_config
where org_id in (
select org_id from plat_device where ori_device_id = #{orgDeviceId} and del_flag = 0)
select org_id from plat_device where id = #{orgDeviceId} and del_flag = 0)
and alarm_type = 5 and tenant_id != 0
</select>
</mapper>
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