Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
d02df7e4
Commit
d02df7e4
authored
Nov 07, 2021
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整三维推送火灾及故障逻辑
parent
0cae761a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
HandlerMqttMessageImpl.java
...mos/fas/business/service/impl/HandlerMqttMessageImpl.java
+17
-6
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/HandlerMqttMessageImpl.java
View file @
d02df7e4
...
@@ -172,12 +172,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -172,12 +172,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
* 推送告警数据
* 推送告警数据
* 影响区域:消防安全=>火灾告警
* 影响区域:消防安全=>火灾告警
*/
*/
String
title
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"fireSafety"
);
refreshFireSafety
(
equipmentSpecific
.
getOrgCode
());
List
<
SafetyExecuteBo
>
dataList
=
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
equipmentSpecific
.
getOrgCode
());
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"type"
,
"fire"
);
result
.
put
(
"dataList"
,
dataList
);
webMqttComponent
.
publish
(
title
,
JSON
.
toJSONString
(
result
));
// 报警触发调用规则服务
// 报警触发调用规则服务
if
(
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
specificIndexType
)
&&
!
ObjectUtils
.
isEmpty
(
equipment
))
{
if
(
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
specificIndexType
)
&&
!
ObjectUtils
.
isEmpty
(
equipment
))
{
this
.
startPlan
(
equipment
,
toke
,
eqSpecId
);
this
.
startPlan
(
equipment
,
toke
,
eqSpecId
);
...
@@ -216,6 +211,8 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -216,6 +211,8 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
String
dateString
=
formatter
.
format
(
new
Date
());
String
dateString
=
formatter
.
format
(
new
Date
());
String
topicOne
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"todaySafetyIndex"
);
String
topicOne
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"todaySafetyIndex"
);
webMqttComponent
.
publish
(
topicOne
,
JSON
.
toJSONString
(
view3dService
.
getSafetyIndexInfoByDate
(
equipmentSpecific
.
getOrgCode
(),
dateString
)));
webMqttComponent
.
publish
(
topicOne
,
JSON
.
toJSONString
(
view3dService
.
getSafetyIndexInfoByDate
(
equipmentSpecific
.
getOrgCode
(),
dateString
)));
refreshFireSafety
(
equipmentSpecific
.
getOrgCode
());
}
else
{
}
else
{
// 监测数据逻辑
// 监测数据逻辑
log
.
info
(
"(监测)Message type is: "
+
specificIndexType
);
log
.
info
(
"(监测)Message type is: "
+
specificIndexType
);
...
@@ -233,6 +230,20 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -233,6 +230,20 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
}
}
}
}
/**
* 三维故障火警模块推送最新5条数据
* @param orgCode
*/
private
void
refreshFireSafety
(
String
orgCode
){
String
title
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"fireSafety"
);
List
<
SafetyExecuteBo
>
dataList
=
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
orgCode
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"type"
,
"fire"
);
result
.
put
(
"dataList"
,
dataList
);
webMqttComponent
.
publish
(
title
,
JSON
.
toJSONString
(
result
));
}
private
void
startPlan
(
Equipment
equipment
,
Toke
toke
,
Long
fireEquipmentId
)
{
private
void
startPlan
(
Equipment
equipment
,
Toke
toke
,
Long
fireEquipmentId
)
{
PlanDetailVo
planDetailVo
=
planDetailMapper
.
getPlanDetailByEquipmentId
(
equipment
.
getId
());
PlanDetailVo
planDetailVo
=
planDetailMapper
.
getPlanDetailByEquipmentId
(
equipment
.
getId
());
//3d页面打开且存在预案,套用之前数字源码启动逻辑 进行预案的启动
//3d页面打开且存在预案,套用之前数字源码启动逻辑 进行预案的启动
...
...
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