Commit f6ef9cdd authored by KeYong's avatar KeYong

去掉风险点推送

parent 28800c2c
...@@ -231,37 +231,37 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -231,37 +231,37 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
} else if (EquipmentRiskTypeEnum.GZ.getCode().equals(typeCode)) { } else if (EquipmentRiskTypeEnum.GZ.getCode().equals(typeCode)) {
// 设备故障处理逻辑 // 设备故障处理逻辑
log.info("(故障)Message typeCode is: " + typeCode); log.info("(故障)Message typeCode is: " + typeCode);
final String stateTrue = "true"; // final String stateTrue = "true";
final String stateFalse = "false"; // final String stateFalse = "false";
String state = equipmentSpecificIndex.getValue(); // String state = equipmentSpecificIndex.getValue();
if (stateTrue.equals(state)) { // if (stateTrue.equals(state)) {
//故障 // //故障
notifyAlarm(equipmentSpecificIndex, 1); // notifyAlarm(equipmentSpecificIndex, 1);
} else if (stateFalse.equals(state)) { // } else if (stateFalse.equals(state)) {
//故障恢复 // //故障恢复
notifyAlarm(equipmentSpecificIndex, 0); // notifyAlarm(equipmentSpecificIndex, 0);
} // }
long equipId = 0; // long equipId = 0;
if (StringUtil.isNotEmpty(equipment)) { // if (StringUtil.isNotEmpty(equipment)) {
equipId = equipment.getId(); // equipId = equipment.getId();
// 是否关联风险点 // // 是否关联风险点
List<FmeaEquipmentPoint> list = fmeaEquipmentPointMapper.listFmeaByEquipIndexIdAndEquipId(equipmentSpecificIndex.getId(), equipId); // List<FmeaEquipmentPoint> list = fmeaEquipmentPointMapper.listFmeaByEquipIndexIdAndEquipId(equipmentSpecificIndex.getId(), equipId);
if (list.size() > 0) { // if (list.size() > 0) {
// 关联风险点进行rpn,rpni值的修改 // // 关联风险点进行rpn,rpni值的修改
list.forEach(fmeaEqPoint -> { // list.forEach(fmeaEqPoint -> {
long fmeaId = fmeaEqPoint.getFmeaId(); // long fmeaId = fmeaEqPoint.getFmeaId();
updateFmeaRpn(fmeaId); // updateFmeaRpn(fmeaId);
}); // });
} else { // } else {
// 没有关联风险点,三维页面消息推送 // // 没有关联风险点,三维页面消息推送
fireEquipRuleMessagePush(deviceData, toke); // fireEquipRuleMessagePush(deviceData, toke);
} // }
} // }
// 今日安全 // // 今日安全
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); // SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
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()); refreshFireSafety(equipmentSpecific.getOrgCode());
String monitorData = String.format("/%s/%s/%s", serviceName, stationName, "data/refresh/monitorData"); String monitorData = String.format("/%s/%s/%s", serviceName, stationName, "data/refresh/monitorData");
......
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