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
2e60d81c
authored
Sep 25, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
9f2927c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/FallAlarm.java
server-web/src/main/resources/application-dev.yml
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/FallAlarm.java
View file @
2e60d81c
...
@@ -47,9 +47,14 @@ public class FallAlarm implements IAlarm {
...
@@ -47,9 +47,14 @@ public class FallAlarm implements IAlarm {
String
deviceId
=
platDevice
.
getOriDeviceId
();
String
deviceId
=
platDevice
.
getOriDeviceId
();
String
personState
=
Convert
.
toStr
(
properties
.
get
(
"personState"
));
String
personState
=
Convert
.
toStr
(
properties
.
get
(
"personState"
));
AlarmRedisDTO
alarmRedisDTO
=
RedisUtil
.
get
(
RedisConst
.
ALARM_DEVICE_FALL_ID
+
deviceId
);
AlarmRedisDTO
alarmRedisDTO
=
RedisUtil
.
get
(
RedisConst
.
ALARM_DEVICE_FALL_ID
+
deviceId
);
if
(
alarmRedisDTO
==
null
){
alarmRedisDTO
=
new
AlarmRedisDTO
();
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
NO
.
getValue
());
}
if
(
StringUtils
.
equals
(
personState
,
CommonEnum
.
YES
.
getValue
()))
{
if
(
StringUtils
.
equals
(
personState
,
CommonEnum
.
YES
.
getValue
()))
{
if
(
StringUtils
.
equals
(
alarmRedisDTO
.
getAlarm
(),
CommonEnum
.
YES
.
getValue
())){
if
(
StringUtils
.
equals
(
alarmRedisDTO
.
getAlarm
(),
CommonEnum
.
YES
.
getValue
())){
log
.
error
(
"长者跌倒,已告警过,设备iot_id:"
+
deviceId
);
log
.
error
(
"长者跌倒,已告警过,设备iot_id:"
+
deviceId
);
return
;
}
}
notice
(
platAlarmCheckDTO
);
notice
(
platAlarmCheckDTO
);
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
YES
.
getValue
());
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
YES
.
getValue
());
...
...
server-web/src/main/resources/application-dev.yml
View file @
2e60d81c
...
@@ -119,7 +119,7 @@ mqtt:
...
@@ -119,7 +119,7 @@ mqtt:
defaultTopic
:
/device/*/*/**
defaultTopic
:
/device/*/*/**
timeout
:
10
timeout
:
10
keepalive
:
60
keepalive
:
60
msgSwitch
:
fals
e
msgSwitch
:
tru
e
wx
:
wx
:
miniapp
:
miniapp
:
...
...
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