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
8ccf0086
authored
Jan 03, 2024
by
罗志长
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
去除部分日志
parent
cc7954f8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 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/elder/impl/PlatElderRealTimeServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/BreathAlarm.java
View file @
8ccf0086
...
@@ -99,7 +99,7 @@ public class BreathAlarm implements IAlarm {
...
@@ -99,7 +99,7 @@ public class BreathAlarm implements IAlarm {
//呼吸率
//呼吸率
int
br
=
(
int
)
properties
.
get
(
"br"
);
int
br
=
(
int
)
properties
.
get
(
"br"
);
if
(
br
==
255
)
{
if
(
br
==
255
)
{
log
.
info
(
"当前上报呼吸数据255,无上报数据"
);
//
log.info("当前上报呼吸数据255,无上报数据");
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 @
8ccf0086
...
@@ -177,8 +177,8 @@ public class FallAlarm implements IAlarm {
...
@@ -177,8 +177,8 @@ public class FallAlarm 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
)
{
log
.
error
(
"空间雷达发出告警,设备plat_id:"
+
platDevice
.
getId
());
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
);
PlatAlarmCheckDTO
platAlarmCheckDTO_behavior
=
BeanDtoVoUtils
.
convert
(
platAlarmCheckDTO
,
PlatAlarmCheckDTO
.
class
);
PlatAlarmCheckDTO
platAlarmCheckDTO_behavior
=
BeanDtoVoUtils
.
convert
(
platAlarmCheckDTO
,
PlatAlarmCheckDTO
.
class
);
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/alarmStrategy/HeartAlarm.java
View file @
8ccf0086
...
@@ -87,7 +87,7 @@ public class HeartAlarm implements IAlarm {
...
@@ -87,7 +87,7 @@ public class HeartAlarm implements IAlarm {
//心率
//心率
int
hr
=
(
int
)
properties
.
get
(
"hr"
);
int
hr
=
(
int
)
properties
.
get
(
"hr"
);
if
(
hr
==
255
)
{
if
(
hr
==
255
)
{
log
.
info
(
"当前上报心率255,无上报数据"
);
//
log.info("当前上报心率255,无上报数据");
RedisUtil
.
delete
(
RedisConst
.
ALARM_DEVICE_HR_ID
+
deviceId
);
RedisUtil
.
delete
(
RedisConst
.
ALARM_DEVICE_HR_ID
+
deviceId
);
return
;
return
;
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderRealTimeServiceImpl.java
View file @
8ccf0086
...
@@ -230,7 +230,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
...
@@ -230,7 +230,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
brNoPersonFlag
=
true
;
brNoPersonFlag
=
true
;
}
}
}
else
{
}
else
{
log
.
info
(
"当前呼吸设备没有上报数据直接返回:"
+
platElderIdDTO
.
getElderId
());
//
log.info("当前呼吸设备没有上报数据直接返回:" + platElderIdDTO.getElderId());
redisTemplate
.
delete
(
DEVICE_BR_ANALYSIS
+
platDevice
.
getOriDeviceId
());
redisTemplate
.
delete
(
DEVICE_BR_ANALYSIS
+
platDevice
.
getOriDeviceId
());
return
platElderRealTimeNowVO
;
return
platElderRealTimeNowVO
;
}
}
...
@@ -405,7 +405,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
...
@@ -405,7 +405,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
}
}
vo
.
setDeviceId
(
platDevice
.
getOriDeviceId
());
vo
.
setDeviceId
(
platDevice
.
getOriDeviceId
());
String
result
=
redisTemplate
.
opsForValue
().
get
(
DEVICE_BR_DATA
+
platDevice
.
getOriDeviceId
());
String
result
=
redisTemplate
.
opsForValue
().
get
(
DEVICE_BR_DATA
+
platDevice
.
getOriDeviceId
());
log
.
info
(
"实时获取设备呼吸数据:{}"
,
result
);
//
log.info("实时获取设备呼吸数据:{}",result);
if
(
result
!=
null
)
{
if
(
result
!=
null
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
result
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
result
);
if
(
jsonObject
!=
null
)
{
if
(
jsonObject
!=
null
)
{
...
@@ -539,7 +539,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
...
@@ -539,7 +539,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
}
}
vo
.
setDeviceId
(
platDevice
.
getOriDeviceId
());
vo
.
setDeviceId
(
platDevice
.
getOriDeviceId
());
String
result
=
redisTemplate
.
opsForValue
().
get
(
DEVICE_BR_DATA
+
platDevice
.
getOriDeviceId
());
String
result
=
redisTemplate
.
opsForValue
().
get
(
DEVICE_BR_DATA
+
platDevice
.
getOriDeviceId
());
log
.
info
(
"实时获取设备呼吸数据:{}"
,
result
);
//
log.info("实时获取设备呼吸数据:{}",result);
if
(
result
!=
null
)
{
if
(
result
!=
null
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
result
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
result
);
if
(
jsonObject
!=
null
)
{
if
(
jsonObject
!=
null
)
{
...
...
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