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
a6a6d251
authored
Dec 12, 2023
by
汪志阳
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:bug修改
parent
8705a55d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/OffBedAlarm.java
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/OffBedAlarm.java
View file @
a6a6d251
...
...
@@ -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
);
...
...
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