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
925f7211
authored
Sep 27, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 设备告警数据
parent
49a6f210
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
server-web/src/main/java/com/makeit/mqtt/PushCallback.java
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
View file @
925f7211
...
@@ -365,7 +365,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
...
@@ -365,7 +365,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
;
;
//todo 要支持 设备绑定多个空间
//todo 要支持 设备绑定多个空间
List
<
PlatRoomBedDevice
>
platRoomBedDeviceList
=
platRoomBedDeviceService
.
list
(
roomBedDeviceLambdaQueryWrapper
);
List
<
PlatRoomBedDevice
>
platRoomBedDeviceList
=
platRoomBedDeviceService
.
list
(
roomBedDeviceLambdaQueryWrapper
);
if
(
CollectionUtils
.
is
Not
Empty
(
platRoomBedDeviceList
)){
if
(
CollectionUtils
.
isEmpty
(
platRoomBedDeviceList
)){
log
.
error
(
"设备没绑定房间:"
+
platDevice
.
getId
());
log
.
error
(
"设备没绑定房间:"
+
platDevice
.
getId
());
return
;
return
;
}
}
...
...
server-web/src/main/java/com/makeit/mqtt/PushCallback.java
View file @
925f7211
...
@@ -94,13 +94,13 @@ public class PushCallback implements MqttCallback {
...
@@ -94,13 +94,13 @@ public class PushCallback implements MqttCallback {
//iot设备id
//iot设备id
PlatDevice
platDevice
=
deviceCacheUtil
.
get
(
deviceId
+
":"
+
iot_tenantId
);
PlatDevice
platDevice
=
deviceCacheUtil
.
get
(
deviceId
+
":"
+
iot_tenantId
);
if
(
platDevice
==
null
)
{
if
(
platDevice
==
null
)
{
logger
.
error
(
"获取设备信息异常,设备iot-id
:"
+
device
Id
);
logger
.
error
(
"获取设备信息异常,设备iot-id
,iot_tenantId:"
+
deviceId
+
","
+
iot_tenant
Id
);
return
;
return
;
}
}
List
<
PlatAlarmConfig
>
deviceAlarmConfigList
=
alarmConfigCacheUtil
.
getDeviceAlarmConfigMap
(
platDevice
);
List
<
PlatAlarmConfig
>
deviceAlarmConfigList
=
alarmConfigCacheUtil
.
getDeviceAlarmConfigMap
(
platDevice
);
deviceAlarmConfigList
.
removeIf
(
Objects:
:
isNull
);
deviceAlarmConfigList
.
removeIf
(
Objects:
:
isNull
);
if
(
CollectionUtils
.
isEmpty
(
deviceAlarmConfigList
))
{
if
(
CollectionUtils
.
isEmpty
(
deviceAlarmConfigList
))
{
logger
.
error
(
"该设备没有告警配置,设备iot-id
:"
+
device
Id
);
logger
.
error
(
"该设备没有告警配置,设备iot-id
,iot_tenantId:"
+
deviceId
+
","
+
iot_tenant
Id
);
return
;
return
;
}
}
for
(
PlatAlarmConfig
config
:
deviceAlarmConfigList
)
{
for
(
PlatAlarmConfig
config
:
deviceAlarmConfigList
)
{
...
...
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