Commit f6ef9cdd authored by KeYong's avatar KeYong

去掉风险点推送

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