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
8f2fcb58
authored
Nov 03, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
9852247d
469f2909
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/BreathAlarm.java
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/FallAlarm.java
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/HeartAlarm.java
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/BreathAlarm.java
View file @
8f2fcb58
...
@@ -113,7 +113,7 @@ public class BreathAlarm implements IAlarm {
...
@@ -113,7 +113,7 @@ public class BreathAlarm implements IAlarm {
}
}
if
((
br
>
end
||
br
<
start
))
{
if
((
br
>
end
||
br
<
start
)
&&
StringUtils
.
equalsAnyIgnoreCase
(
messageType
,
"REPORT_PROPERTY"
)
)
{
if
(
alarmRedisDTO
==
null
){
if
(
alarmRedisDTO
==
null
){
alarmRedisDTO
=
new
AlarmRedisDTO
();
alarmRedisDTO
=
new
AlarmRedisDTO
();
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
NO
.
getValue
());
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
NO
.
getValue
());
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/FallAlarm.java
View file @
8f2fcb58
...
@@ -106,10 +106,11 @@ public class FallAlarm implements IAlarm {
...
@@ -106,10 +106,11 @@ public class FallAlarm implements IAlarm {
String
ruleConfigStr
=
config
.
getRuleConfig
();
String
ruleConfigStr
=
config
.
getRuleConfig
();
JSONObject
properties
=
platAlarmCheckDTO
.
getProperties
();
JSONObject
properties
=
platAlarmCheckDTO
.
getProperties
();
String
messageType
=
platAlarmCheckDTO
.
getMessageType
();
String
messageType
=
platAlarmCheckDTO
.
getMessageType
();
String
deviceId
=
platDevice
.
getId
();
String
deviceId
=
platDevice
.
getId
();
if
(
properties
==
null
){
properties
=
new
JSONObject
();
}
String
personState
=
Convert
.
toStr
(
properties
.
get
(
"personState"
));
String
person
=
Convert
.
toStr
(
properties
.
get
(
"person"
));
String
person
=
Convert
.
toStr
(
properties
.
get
(
"person"
));
PlatAlarmConfigBehaviorDTOVO
ruleConfig
=
JsonUtil
.
toObj
(
ruleConfigStr
,
PlatAlarmConfigBehaviorDTOVO
.
class
);
PlatAlarmConfigBehaviorDTOVO
ruleConfig
=
JsonUtil
.
toObj
(
ruleConfigStr
,
PlatAlarmConfigBehaviorDTOVO
.
class
);
Integer
duration
=
ruleConfig
.
getAverageDuration
();
//分钟
Integer
duration
=
ruleConfig
.
getAverageDuration
();
//分钟
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/HeartAlarm.java
View file @
8f2fcb58
...
@@ -102,7 +102,7 @@ public class HeartAlarm implements IAlarm {
...
@@ -102,7 +102,7 @@ public class HeartAlarm implements IAlarm {
return
;
return
;
}
}
if
((
hr
>
end
||
hr
<
start
))
{
if
((
hr
>
end
||
hr
<
start
)
&&
StringUtils
.
equalsAnyIgnoreCase
(
messageType
,
"REPORT_PROPERTY"
)
)
{
if
(
alarmRedisDTO
==
null
){
if
(
alarmRedisDTO
==
null
){
alarmRedisDTO
=
new
AlarmRedisDTO
();
alarmRedisDTO
=
new
AlarmRedisDTO
();
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
NO
.
getValue
());
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
NO
.
getValue
());
...
...
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