Commit 718a5316 authored by maoying's avatar maoying

添加物联信号自动触发预案事件

parent dc587efd
...@@ -19,13 +19,13 @@ public class DeviceRo implements Serializable{ ...@@ -19,13 +19,13 @@ public class DeviceRo implements Serializable{
private String pointCode; private String pointCode;
@Label("值") @Label("值")
private String value; private String value;
@Label("装备ID") @Label("电力装备ID")
private Long equipmentId; private Long equipmentId;
@Label("装备编码") @Label("电力装备编码")
private String equipmentCode; private String equipmentCode;
@Label("重点装备编码") @Label("消防装备编码")
private String equipmentSpecificCode; private String equipmentSpecificCode;
@Label("重点装备ID") @Label("消防装备ID")
private Long equipmentSpecificId; private Long equipmentSpecificId;
@Label("物联编码") @Label("物联编码")
private String iotCode; private String iotCode;
......
...@@ -136,6 +136,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -136,6 +136,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
@Value("${autoSys.fire.pool.index_key}") @Value("${autoSys.fire.pool.index_key}")
private String firePoolIndexKey; private String firePoolIndexKey;
@Value("${plan.index}")
private String planIndex;
@Autowired @Autowired
PlanDetailMapper planDetailMapper; PlanDetailMapper planDetailMapper;
...@@ -198,17 +201,6 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -198,17 +201,6 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
String msg = JSON.toJSONString(equipmentSpecificIndex); String msg = JSON.toJSONString(equipmentSpecificIndex);
String title = String.format("/%s/%s", serviceName, "data/refresh/indexStatus"); String title = String.format("/%s/%s", serviceName, "data/refresh/indexStatus");
webMqttComponent.publish(title, msg); webMqttComponent.publish(title, msg);
// // 中心级系统指标推送消息
// if ("FIREALARM".equals(typeCode) && "true".equals(equipmentSpecificIndex.getValue()) && PlanFlagBo.getFlag()) {
// log.info("RocketMQ发送的主题是: " + rocketTopic + ", 消息体是: " + msg + "!");
// try {
// // rocketMQTemplate.convertAndSend(rocketTopic, msg);
// PlanFlagBo.setFlag(Boolean.FALSE);
// } catch (Exception e) {
// throw new RuntimeException("RocketMQ消息发送失败!");
// }
// }
} }
Equipment equipment = topicEntity.getEquipment() == null ? impAndFireEquipMapper.queryImpEqumtByFireEquipmt(eqSpecId) : topicEntity.getEquipment(); Equipment equipment = topicEntity.getEquipment() == null ? impAndFireEquipMapper.queryImpEqumtByFireEquipmt(eqSpecId) : topicEntity.getEquipment();
...@@ -281,10 +273,11 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -281,10 +273,11 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
String title = String.format("/%s/%s/%s", serviceName, stationName, "data/refresh/monitorData"); String title = String.format("/%s/%s/%s", serviceName, stationName, "data/refresh/monitorData");
webMqttComponent.publish(title, JSON.toJSONString(view3dService.getEquipStatusList(equipmentSpecific.getOrgCode()))); webMqttComponent.publish(title, JSON.toJSONString(view3dService.getEquipStatusList(equipmentSpecific.getOrgCode())));
} }
//根据指标数据处理预案按钮
if(planIndex.contains(nameKey) && !ObjectUtils.isEmpty(equipment)){
DeviceRo deviceRo = new DeviceRo(); DeviceRo deviceRo = new DeviceRo();
// Equipment equipment1 = impAndFireEquipMapper.queryImpEqumtByFireEquipmt(eqSpecId); deviceRo.setEquipmentCode(equipment.getCode());
// deviceRo.setEquipmentCode(equipment1.getCode()); deviceRo.setEquipmentId(equipment.getId());
// deviceRo.setEquipmentId(equipment1.getId());
deviceRo.setEquipmentSpecificId(equipmentSpecific.getId()); deviceRo.setEquipmentSpecificId(equipmentSpecific.getId());
deviceRo.setEquipmentSpecificCode(equipmentSpecific.getCode()); deviceRo.setEquipmentSpecificCode(equipmentSpecific.getCode());
deviceRo.setIotCode(equipmentSpecific.getIotCode()); deviceRo.setIotCode(equipmentSpecific.getIotCode());
...@@ -292,6 +285,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -292,6 +285,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
deviceRo.setEquipmentIndexKey(equipmentSpecificIndex.getNameKey()); deviceRo.setEquipmentIndexKey(equipmentSpecificIndex.getNameKey());
planAutoExec(equipment, toke, deviceRo); planAutoExec(equipment, toke, deviceRo);
} }
}
/** /**
* 触发规则(用来)动态执行规则步骤 * 触发规则(用来)动态执行规则步骤
......
...@@ -113,6 +113,9 @@ privilege.fegin.name=AMOS-API-PRIVILEGE ...@@ -113,6 +113,9 @@ privilege.fegin.name=AMOS-API-PRIVILEGE
#当前gateway的IP地址 #当前gateway的IP地址
now.gateway.address=http://172.16.10.72:10005/ now.gateway.address=http://172.16.10.72:10005/
#预案指标配置
plan.index =ONL_OilDischargeDeviceOilPillowDischargeOpen,CAFS_CAFSFireGunEquipmentValveStatus,DCCP_DCCPStreamTransformerCharged,WSS_DelugeValve_Start
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