Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
06ca2800
authored
Dec 19, 2023
by
汪志阳
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:组织config查询
parent
19788a3c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/OffBedAlarm.java
server-service/src/main/resources/mappers/PlatAlarmConfigMapper.xml
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/OffBedAlarm.java
View file @
06ca2800
...
...
@@ -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
.
get
OriDevice
Id
());
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
(
1
3
);
LocalTime
localTime
=
LocalTime
.
now
().
plusHours
(
1
2
);
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
(
1
3
);
return
LocalDateTime
.
now
().
plusHours
(
1
2
);
// return LocalDateTime.now();
}
...
...
server-service/src/main/resources/mappers/PlatAlarmConfigMapper.xml
View file @
06ca2800
...
...
@@ -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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment