Commit d02df7e4 authored by maoying's avatar maoying

调整三维推送火灾及故障逻辑

parent 0cae761a
...@@ -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页面打开且存在预案,套用之前数字源码启动逻辑 进行预案的启动
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment