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
dbda0ea3
authored
Dec 28, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
去掉非必要log
parent
a79878d0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
8 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/OffBedAlarm.java
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/BehaviorAlarm.java
View file @
dbda0ea3
...
@@ -112,7 +112,6 @@ public class BehaviorAlarm implements IAlarm {
...
@@ -112,7 +112,6 @@ public class BehaviorAlarm implements IAlarm {
long
count
=
endLong
-
startLong
;
long
count
=
endLong
-
startLong
;
//进入空间时间满足告警时长,判断是否已经告警过了
//进入空间时间满足告警时长,判断是否已经告警过了
if
(
duration
!=
0
&&
count
/
1000
>=
duration
&&
StringUtils
.
equals
(
alarmRedisDTO
.
getAlarm
(),
CommonEnum
.
NO
.
getValue
()))
{
if
(
duration
!=
0
&&
count
/
1000
>=
duration
&&
StringUtils
.
equals
(
alarmRedisDTO
.
getAlarm
(),
CommonEnum
.
NO
.
getValue
()))
{
log
.
error
(
"空间雷达发出告警,设备plat_id:"
+
platDevice
.
getId
());
if
(
duration1
!=
0
)
{
if
(
duration1
!=
0
)
{
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
YES
.
getValue
());
alarmRedisDTO
.
setAlarm
(
CommonEnum
.
YES
.
getValue
());
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_BEHAVIOR_ID
+
deviceId
,
alarmRedisDTO
);
RedisUtil
.
set
(
RedisConst
.
ALARM_DEVICE_BEHAVIOR_ID
+
deviceId
,
alarmRedisDTO
);
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/BreathAlarm.java
View file @
dbda0ea3
...
@@ -59,12 +59,10 @@ public class BreathAlarm implements IAlarm {
...
@@ -59,12 +59,10 @@ public class BreathAlarm implements IAlarm {
platAlarmRecordService
.
getElderListByDeviceId
(
platAlarmCheckDTO
);
platAlarmRecordService
.
getElderListByDeviceId
(
platAlarmCheckDTO
);
List
<
PlatElder
>
platElderList
=
platAlarmCheckDTO
.
getPlatElderList
();
List
<
PlatElder
>
platElderList
=
platAlarmCheckDTO
.
getPlatElderList
();
if
(
CollectionUtils
.
isEmpty
(
platElderList
)){
if
(
CollectionUtils
.
isEmpty
(
platElderList
)){
log
.
error
(
"呼吸设备未关联长者,设备plat_id:"
+
platAlarmCheckDTO
.
getPlatDevice
().
getId
());
return
;
return
;
}
}
PlatAlarmConfig
config
=
platAlarmCheckDTO
.
getPlatAlarmConfig
();
PlatAlarmConfig
config
=
platAlarmCheckDTO
.
getPlatAlarmConfig
();
if
(
CommonEnum
.
NO
.
getValue
().
equals
(
config
.
getStatus
()))
{
if
(
CommonEnum
.
NO
.
getValue
().
equals
(
config
.
getStatus
()))
{
log
.
error
(
"呼吸告警配置为禁用,告警配置id:"
+
config
.
getId
());
return
;
return
;
}
}
PlatElder
platElder
=
platElderList
.
get
(
0
);
PlatElder
platElder
=
platElderList
.
get
(
0
);
...
@@ -94,7 +92,6 @@ public class BreathAlarm implements IAlarm {
...
@@ -94,7 +92,6 @@ public class BreathAlarm implements IAlarm {
int
hasPerson
=
(
int
)
properties
.
get
(
"person"
);
int
hasPerson
=
(
int
)
properties
.
get
(
"person"
);
if
(
0
==
hasPerson
)
{
if
(
0
==
hasPerson
)
{
log
.
info
(
"当前上报数据无人,不需要告警"
);
RedisUtil
.
delete
(
RedisConst
.
ALARM_DEVICE_BR_ID
+
deviceId
);
RedisUtil
.
delete
(
RedisConst
.
ALARM_DEVICE_BR_ID
+
deviceId
);
return
;
return
;
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/FallAlarm.java
View file @
dbda0ea3
...
@@ -69,7 +69,7 @@ public class FallAlarm implements IAlarm {
...
@@ -69,7 +69,7 @@ public class FallAlarm implements IAlarm {
*/
*/
@Override
@Override
public
void
checkConfig
(
PlatAlarmCheckDTO
platAlarmCheckDTO
)
{
public
void
checkConfig
(
PlatAlarmCheckDTO
platAlarmCheckDTO
)
{
log
.
info
(
"跌倒预警config开始"
);
//
log.info("跌倒预警config开始");
JSONObject
properties
=
platAlarmCheckDTO
.
getProperties
();
JSONObject
properties
=
platAlarmCheckDTO
.
getProperties
();
PlatDevice
platDevice
=
platAlarmCheckDTO
.
getPlatDevice
();
PlatDevice
platDevice
=
platAlarmCheckDTO
.
getPlatDevice
();
String
deviceId
=
platDevice
.
getId
();
String
deviceId
=
platDevice
.
getId
();
...
@@ -77,7 +77,7 @@ public class FallAlarm implements IAlarm {
...
@@ -77,7 +77,7 @@ public class FallAlarm implements IAlarm {
properties
=
new
JSONObject
();
properties
=
new
JSONObject
();
}
}
String
personState
=
Convert
.
toStr
(
properties
.
get
(
"personState"
));
String
personState
=
Convert
.
toStr
(
properties
.
get
(
"personState"
));
log
.
info
(
"跌倒预警personState:{}"
,
personState
);
//
log.info("跌倒预警personState:{}", personState);
//记录停留时长
//记录停留时长
recordDuration
(
platAlarmCheckDTO
);
recordDuration
(
platAlarmCheckDTO
);
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/HeartAlarm.java
View file @
dbda0ea3
...
@@ -107,7 +107,6 @@ public class HeartAlarm implements IAlarm {
...
@@ -107,7 +107,6 @@ public class HeartAlarm implements IAlarm {
RedisUtil
.
delete
(
RedisConst
.
ALARM_DEVICE_HR_ID
+
deviceId
);
RedisUtil
.
delete
(
RedisConst
.
ALARM_DEVICE_HR_ID
+
deviceId
);
return
;
return
;
}
}
log
.
info
(
"hr:{},end:{},start:{},mes:{}"
,
hr
,
end
,
start
,
messageType
);
if
((
hr
>
end
||
hr
<
start
)
&&
StringUtils
.
equalsAnyIgnoreCase
(
messageType
,
"REPORT_PROPERTY"
))
{
if
((
hr
>
end
||
hr
<
start
)
&&
StringUtils
.
equalsAnyIgnoreCase
(
messageType
,
"REPORT_PROPERTY"
))
{
if
(
alarmRedisDTO
==
null
){
if
(
alarmRedisDTO
==
null
){
alarmRedisDTO
=
new
AlarmRedisDTO
();
alarmRedisDTO
=
new
AlarmRedisDTO
();
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/OffBedAlarm.java
View file @
dbda0ea3
...
@@ -54,7 +54,6 @@ public class OffBedAlarm implements IAlarm {
...
@@ -54,7 +54,6 @@ public class OffBedAlarm implements IAlarm {
//log.info("执行离床checkConfig方法:");
//log.info("执行离床checkConfig方法:");
List
<
PlatElder
>
platElderList
=
platAlarmCheckDTO
.
getPlatElderList
();
List
<
PlatElder
>
platElderList
=
platAlarmCheckDTO
.
getPlatElderList
();
if
(
CollectionUtils
.
isEmpty
(
platElderList
))
{
if
(
CollectionUtils
.
isEmpty
(
platElderList
))
{
log
.
error
(
"离床告警心率设备未关联长者,设备plat_id:"
+
platAlarmCheckDTO
.
getPlatDevice
().
getId
());
return
;
return
;
}
}
PlatAlarmConfig
config
=
alarmConfigCacheUtil
.
get
(
platDevice
.
getOrgId
(),
PlatAlarmConfigEnum
.
AlarmTypeEnum
.
OFF_BED
.
getValue
());
PlatAlarmConfig
config
=
alarmConfigCacheUtil
.
get
(
platDevice
.
getOrgId
(),
PlatAlarmConfigEnum
.
AlarmTypeEnum
.
OFF_BED
.
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