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
e2bff2fd
authored
Sep 28, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:
parent
d385fdc4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
6 deletions
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/BehaviorAlarm.java
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/BehaviorAlarm.java
View file @
e2bff2fd
...
...
@@ -112,13 +112,12 @@ public class BehaviorAlarm implements IAlarm {
if
(
duration
!=
0
&&
count
/
1000
>=
duration
&&
StringUtils
.
equals
(
alarmRedisDTO
.
getAlarm
(),
CommonEnum
.
NO
.
getValue
()))
{
log
.
error
(
"空间雷达发出告警,设备plat_id:"
+
platDevice
.
getId
());
if
(
duration1
!=
0
)
{
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
YES
.
getValue
());
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_BEHAVIOR_ID
+
deviceId
,
alarmRedisDTO
);
notice
(
platAlarmCheckDTO
);
}
else
{
return
;
}
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
YES
.
getValue
());
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_BEHAVIOR_ID
+
deviceId
,
alarmRedisDTO
);
}
}
else
{
//没人
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/BreathAlarm.java
View file @
e2bff2fd
...
...
@@ -121,11 +121,12 @@ public class BreathAlarm implements IAlarm {
}
fillRemark
(
platAlarmCheckDTO
,
br
,
start
,
end
);
platAlarmCheckDTO
.
setAbnormalValue
(
Convert
.
toStr
(
br
));
notice
(
platAlarmCheckDTO
);
alarmRedisDTO
.
setStartLong
(
endLong
);
alarmRedisDTO
.
setStart
(
now
);
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
YES
.
getValue
());
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_BR_ID
+
deviceId
,
alarmRedisDTO
);
notice
(
platAlarmCheckDTO
);
}
}
else
{
RedisUtil
.
delete
(
RedisConst
.
ALARM_DEVICE_BR_ID
+
deviceId
);
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/FallAlarm.java
View file @
e2bff2fd
...
...
@@ -57,9 +57,9 @@ public class FallAlarm implements IAlarm {
log
.
error
(
"长者跌倒,已告警过,设备plat_id:"
+
deviceId
);
return
;
}
notice
(
platAlarmCheckDTO
);
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
YES
.
getValue
());
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_FALL_ID
+
deviceId
,
alarmRedisDTO
);
notice
(
platAlarmCheckDTO
);
}
else
{
if
(
StringUtils
.
equals
(
alarmRedisDTO
.
getAlarm
(),
CommonEnum
.
YES
.
getValue
()))
{
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
NO
.
getValue
());
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/HeartAlarm.java
View file @
e2bff2fd
...
...
@@ -110,11 +110,12 @@ public class HeartAlarm implements IAlarm {
}
fillRemark
(
platAlarmCheckDTO
,
hr
,
start
,
end
);
platAlarmCheckDTO
.
setAbnormalValue
(
Convert
.
toStr
(
hr
));
notice
(
platAlarmCheckDTO
);
alarmRedisDTO
.
setStartLong
(
endLong
);
alarmRedisDTO
.
setStart
(
now
);
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
YES
.
getValue
());
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_HR_ID
+
deviceId
,
alarmRedisDTO
);
notice
(
platAlarmCheckDTO
);
}
}
else
{
...
...
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