Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
f98791b9
Commit
f98791b9
authored
Apr 02, 2022
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改告警消息推送逻辑
parent
0246d8e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+7
-7
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
f98791b9
...
@@ -282,7 +282,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -282,7 +282,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
}
static
void
upAlarmLogStatus
(
String
iotCode
,
String
equipmentSpecificIndexKey
,
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
)
{
public
List
<
EquipmentSpecificAlarmLog
>
upAlarmLogStatus
(
String
iotCode
,
String
equipmentSpecificIndexKey
,
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
)
{
LambdaQueryWrapper
<
EquipmentSpecificAlarmLog
>
queryWrapper
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
EquipmentSpecificAlarmLog
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
eq
(
EquipmentSpecificAlarmLog:
:
getIotCode
,
iotCode
);
queryWrapper
.
eq
(
EquipmentSpecificAlarmLog:
:
getIotCode
,
iotCode
);
queryWrapper
.
eq
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificIndexKey
,
equipmentSpecificIndexKey
);
queryWrapper
.
eq
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificIndexKey
,
equipmentSpecificIndexKey
);
...
@@ -295,6 +295,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -295,6 +295,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if
(!
logs
.
isEmpty
())
{
if
(!
logs
.
isEmpty
())
{
equipmentSpecificAlarmLogService
.
updateBatchById
(
logs
);
equipmentSpecificAlarmLogService
.
updateBatchById
(
logs
);
}
}
return
logs
;
}
}
public
void
publishDataToCanvas
(
List
<
EquipmentSpecificIndex
>
indexList
)
{
public
void
publishDataToCanvas
(
List
<
EquipmentSpecificIndex
>
indexList
)
{
...
@@ -723,16 +724,13 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -723,16 +724,13 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
}
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
}
else
{
}
else
{
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
equipmentSpecificAlarmLogService
);
equipmentAlarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
equipmentSpecificAlarmLogService
)
);
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
bool
=
Boolean
.
TRUE
;
bool
=
Boolean
.
TRUE
;
}
}
});
});
if
(
ObjectUtils
.
isEmpty
(
equipmentAlarmLogs
)){
return
;
}
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
@Override
public
void
afterCommit
()
{
public
void
afterCommit
()
{
...
@@ -770,7 +768,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -770,7 +768,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
}
// 向南瑞平台推送报警消息
// 向南瑞平台推送报警消息
syncDataService
.
syncCreatedSendAlarm
(
equipmentAlarmLogs
);
if
(!
bool
){
syncDataService
.
syncCreatedSendAlarm
(
equipmentAlarmLogs
);
}
}
}
}
}
});
});
...
...
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