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
d12c59ed
Commit
d12c59ed
authored
Nov 28, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
5a4174b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
EquipmentSpecificIndex.java
...oin/equipmanage/common/entity/EquipmentSpecificIndex.java
+5
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+11
-2
systemCode.json
...boot-system-equip/src/main/resources/json/systemCode.json
+2
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecificIndex.java
View file @
d12c59ed
...
...
@@ -170,5 +170,10 @@ public class EquipmentSpecificIndex extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
equipmentName
;
@TableField
(
exist
=
false
)
private
String
equipmentType
;
// 直流中心方便前端刷新展示
@TableField
(
exist
=
false
)
private
String
UUID
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
d12c59ed
...
...
@@ -363,6 +363,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
equipmentSpeIndex
.
setTraceId
(
traceId
);
equipmentSpeIndex
.
setValueLabel
(
valueTranslate
(
value
,
equipmentSpecificIndex
.
getValueEnum
()));
equipmentSpeIndex
.
setUpdateDate
(
new
Date
());
equipmentSpeIndex
.
setEquipmentType
(
topicEntity
.
getType
());
equipmentSpeIndex
.
setUUID
(
UUIDUtils
.
getUUID
());
equipmentSpecificIndexService
.
updateById
(
equipmentSpeIndex
);
// 更新设备表指标状态
...
...
@@ -449,7 +451,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if
(!
ObjectUtils
.
isEmpty
(
equipmentSpecificAlarms
)){
equipmentSpecificAlarmService
.
saveOrUpdateBatch
(
equipmentSpecificAlarms
);
}
// 需要在事务提交之后,否
侧
事务隔离查询不出数据
// 需要在事务提交之后,否
则
事务隔离查询不出数据
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
public
void
afterCommit
()
{
...
...
@@ -488,6 +490,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
// 向其他系统推送报警
equipmentAlarmLogsToOtherSystems
(
alarmLogs
);
// 直流中心消息推送刷新
publishDataToDCCenterPage
(
equipmentSpecificIndexList
);
}
});
}
...
...
@@ -1070,7 +1075,6 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"seqNo"
,
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
).
toLowerCase
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
ALARM_LOG_INSERT
.
getTopic
(),
jsonObject
.
toString
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
UUIDUtils
.
getUUID
());
// 数字换流站数据处理(高斯库同步及南瑞告警推送)
if
(
syncSwitch
)
{
List
<
FireEquipmentFireAlarm
>
alarmList
=
createFireEquipmentFireAlarmVo
(
equipmentAlarmLogs
);
...
...
@@ -1257,6 +1261,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
iEquipmentSpecificSerivce
.
integrationPageSysDataRefresh
(
topicEntity
.
getCode
());
}
public
void
publishDataToDCCenterPage
(
List
<
EquipmentSpecificIndex
>
equipmentSpecificIndexList
)
{
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
JSON
.
toJSONString
(
equipmentSpecificIndexList
));
log
.
info
(
String
.
format
(
"直流中心指标消息发送:%s"
,
JSON
.
toJSONString
(
equipmentSpecificIndexList
)));
}
/**
* 更新数据报表表
*
...
...
amos-boot-system-equip/src/main/resources/json/systemCode.json
View file @
d12c59ed
[
{
"name"
:
"排油系统"
,
"name"
:
"
事故
排油系统"
,
"code"
:
"fireONLSys"
},
{
...
...
@@ -8,7 +8,7 @@
"code"
:
"fireWaterSys"
},
{
"name"
:
"火灾报警系统"
,
"name"
:
"火灾
自动
报警系统"
,
"code"
:
"fireAlarmSys"
},
{
...
...
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