Commit c760876f authored by zhengjiawei's avatar zhengjiawei

安全态势,风险评估 mqtt

parent 3ba69a15
......@@ -1292,6 +1292,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
fmeaMapper.updateRpn(fmea);
//2.计算上级风险值(风险点及父节点)
this.notifyRiskSource(fmeaId, fmea.getRiskSourceId(), nofityType, jpushMsgBo);
String topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/incidenceSeverityMatrix");
webMqttComponent.publish(topic, JSON.toJSONString(queryForMatrix()));
}
}
......@@ -1395,6 +1397,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
//1.3.更新fmea的rpn、风险等级及newOid
fmeaMapper.updateRpn(fmea);
String topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/incidenceSeverityMatrix");
webMqttComponent.publish(topic, JSON.toJSONString(queryForMatrix()));
//2.计算风险点rpn、rpni、riskLevelId
this.notifyRiskSource(fmeaId, fmea.getRiskSourceId(), notifyType, jpushMsgBo);
}
......@@ -1495,8 +1499,22 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
//6.通知全景监控屏幕数据刷新
iDataRefreshService.refreshViewData(DataRefreshTypeEum.rpn.getCode());
}
}
try {
String topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/situationMap");
webMqttComponent.publish(topic, JSON.toJSONString(queryRiskAreaRpn()));
topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/riskDegreeHistogram");
webMqttComponent.publish(topic, JSON.toJSONString(queryRPNReport()));
topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/riskDegreePie");
webMqttComponent.publish(topic, JSON.toJSONString(queryForRiseUp()));
topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/incidenceSeverityMatrix");
webMqttComponent.publish(topic, JSON.toJSONString(queryForMatrix()));
} catch (Exception e) {
log.error("数据获取失败", e);
}
}
@Override
......@@ -1660,6 +1678,18 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override
public void batchSaveRegionUe4(List<BindRegionBo> regionBoList) {
riskSourceMapper.batchSaveRegionUe4(regionBoList);
try {
String topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/situationMap");
webMqttComponent.publish(topic, JSON.toJSONString(queryRiskAreaRpn()));
topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/riskDegreeHistogram");
webMqttComponent.publish(topic, JSON.toJSONString(queryRPNReport()));
topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/riskDegreePie");
webMqttComponent.publish(topic, JSON.toJSONString(queryForRiseUp()));
topic = String.format("/%s/%s/%s", serviceName, "shaoxing","data/refresh/incidenceSeverityMatrix");
webMqttComponent.publish(topic, JSON.toJSONString(queryForMatrix()));
} catch (Exception e) {
log.error("数据获取失败", e);
}
}
private EvaluationModel getEvaluationModel(Long fmeaId) {
......
......@@ -5,7 +5,7 @@ security.appKeyWeb=CONVERTER_STATION
#environment
#spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://172.16.3.75:10001/eureka/
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/
eureka.client.register-with-eureka = true
eureka.client.fetch-registry = true
eureka.client.healthcheck.enabled = true
......
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