Commit 718a5316 authored by maoying's avatar maoying

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

parent dc587efd
......@@ -19,13 +19,13 @@ public class DeviceRo implements Serializable{
private String pointCode;
@Label("值")
private String value;
@Label("装备ID")
@Label("电力装备ID")
private Long equipmentId;
@Label("装备编码")
@Label("电力装备编码")
private String equipmentCode;
@Label("重点装备编码")
@Label("消防装备编码")
private String equipmentSpecificCode;
@Label("重点装备ID")
@Label("消防装备ID")
private Long equipmentSpecificId;
@Label("物联编码")
private String iotCode;
......
......@@ -135,6 +135,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
@Value("${autoSys.fire.pool.index_key}")
private String firePoolIndexKey;
@Value("${plan.index}")
private String planIndex;
@Autowired
PlanDetailMapper planDetailMapper;
......@@ -198,17 +201,6 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
String msg = JSON.toJSONString(equipmentSpecificIndex);
String title = String.format("/%s/%s", serviceName, "data/refresh/indexStatus");
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();
......@@ -281,16 +273,18 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
String title = String.format("/%s/%s/%s", serviceName, stationName, "data/refresh/monitorData");
webMqttComponent.publish(title, JSON.toJSONString(view3dService.getEquipStatusList(equipmentSpecific.getOrgCode())));
}
DeviceRo deviceRo = new DeviceRo();
// Equipment equipment1 = impAndFireEquipMapper.queryImpEqumtByFireEquipmt(eqSpecId);
// deviceRo.setEquipmentCode(equipment1.getCode());
// deviceRo.setEquipmentId(equipment1.getId());
deviceRo.setEquipmentSpecificId(equipmentSpecific.getId());
deviceRo.setEquipmentSpecificCode(equipmentSpecific.getCode());
deviceRo.setIotCode(equipmentSpecific.getIotCode());
deviceRo.setValue(equipmentSpecificIndex.getValue());
deviceRo.setEquipmentIndexKey(equipmentSpecificIndex.getNameKey());
planAutoExec(equipment, toke, deviceRo);
//根据指标数据处理预案按钮
if(planIndex.contains(nameKey) && !ObjectUtils.isEmpty(equipment)){
DeviceRo deviceRo = new DeviceRo();
deviceRo.setEquipmentCode(equipment.getCode());
deviceRo.setEquipmentId(equipment.getId());
deviceRo.setEquipmentSpecificId(equipmentSpecific.getId());
deviceRo.setEquipmentSpecificCode(equipmentSpecific.getCode());
deviceRo.setIotCode(equipmentSpecific.getIotCode());
deviceRo.setValue(equipmentSpecificIndex.getValue());
deviceRo.setEquipmentIndexKey(equipmentSpecificIndex.getNameKey());
planAutoExec(equipment, toke, deviceRo);
}
}
/**
......
......@@ -113,6 +113,9 @@ privilege.fegin.name=AMOS-API-PRIVILEGE
#当前gateway的IP地址
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