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
8593722a
Commit
8593722a
authored
Aug 20, 2024
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kafka接消息逻辑中处理稳压泵
parent
a9ef77d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+23
-1
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 @
8593722a
...
...
@@ -622,6 +622,16 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
public
void
afterCommit
()
{
iotDatalist
.
forEach
(
iotDataVO
->
{
String
indexKey
=
iotDataVO
.
getKey
();
String
indexValue
=
iotDataVO
.
getValue
().
toString
();
// 稳压泵启停信号处理
if
(
indexKey
.
equals
(
pressurePumpStart
))
{
pressurePump
(
indexKey
,
indexValue
,
iotDatalist
,
topicEntity
);
}
});
equipmentSpecificAlarms
.
forEach
(
action
->
{
if
(
AlarmStatusEnum
.
BJ
.
getCode
()
==
action
.
getStatus
())
{
alarmLogs
.
add
(
addEquipAlarmLogRecord
(
action
));
...
...
@@ -900,6 +910,16 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
public
void
afterCommit
()
{
iotDatalist
.
forEach
(
iotDataVO
->
{
String
indexKey
=
iotDataVO
.
getKey
();
String
indexValue
=
iotDataVO
.
getValue
().
toString
();
// 稳压泵启停信号处理
if
(
indexKey
.
equals
(
pressurePumpStart
))
{
pressurePump
(
indexKey
,
indexValue
,
iotDatalist
,
topicEntity
);
}
});
equipmentSpecificAlarms
.
forEach
(
action
->
{
if
(
AlarmStatusEnum
.
BJ
.
getCode
()
==
action
.
getStatus
())
{
alarmLogs
.
add
(
addEquipAlarmLogRecord
(
action
));
...
...
@@ -2460,6 +2480,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
// }
private
void
pressurePump
(
String
indexKey
,
String
indexValue
,
List
<
IotDataVO
>
iotDatalist
,
TopicEntityVo
topicEntity
)
{
log
.
info
(
"开始处理稳压泵逻辑:{}值:{}"
,
indexKey
,
indexValue
);
List
<
String
>
listIndex
=
new
ArrayList
<>();
listIndex
.
add
(
pressurePumpStart
);
// 获取全部启停泵信号
...
...
@@ -2487,6 +2508,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
PressurePumpValueEnum
valueEnum
=
PressurePumpValueEnum
.
getByCode
(
pressurePumpEnum
.
getCompareValue
());
assert
valueEnum
!=
null
;
EquipmentSpecificIndex
data
=
getPressurePumpDateByType
(
indexKey
,
valueEnum
,
topicEntity
,
equipmentSpeIndexList
,
pressurePumpEnum
);
log
.
info
(
"稳压泵获取{}, 值为{}"
,
valueEnum
.
getDescribe
(),
data
);
Date
newDate
=
new
Date
();
// 2. 校验
if
(!
ObjectUtils
.
isEmpty
(
data
.
getUpdateDate
()))
{
...
...
@@ -2513,7 +2535,6 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
else
{
throw
new
BadRequest
(
"装备物联编码错误,请确认!"
);
}
switch
(
valueEnum
)
{
case
LAST_STOP:
List
<
EquipmentSpecificIndex
>
lastStop
=
equipmentSpeIndexList
.
stream
().
filter
(
e
->
...
...
@@ -2613,6 +2634,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
assert
pumpCheckEnum
!=
null
;
String
leftValue
=
pressurePumpEnum
.
getLeftValue
();
String
rightValue
=
pressurePumpEnum
.
getRightValue
();
log
.
info
(
"检验方式:{},大于:{},小于:{}, 间隔:{}"
,
pumpCheckEnum
.
getDescribe
(),
leftValue
,
rightValue
,
diff
);
switch
(
pumpCheckEnum
)
{
case
LE:
if
(
StringUtil
.
isNotEmpty
(
rightValue
))
{
...
...
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