Commit d12c59ed authored by KeYong's avatar KeYong

修改bug

parent 5a4174b4
......@@ -170,5 +170,10 @@ public class EquipmentSpecificIndex extends BaseEntity {
@TableField(exist = false)
private String equipmentName;
@TableField(exist = false)
private String equipmentType;
// 直流中心方便前端刷新展示
@TableField(exist = false)
private String UUID;
}
......@@ -363,6 +363,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
equipmentSpeIndex.setTraceId(traceId);
equipmentSpeIndex.setValueLabel(valueTranslate(value, equipmentSpecificIndex.getValueEnum()));
equipmentSpeIndex.setUpdateDate(new Date());
equipmentSpeIndex.setEquipmentType(topicEntity.getType());
equipmentSpeIndex.setUUID(UUIDUtils.getUUID());
equipmentSpecificIndexService.updateById(equipmentSpeIndex);
// 更新设备表指标状态
......@@ -449,7 +451,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if(!ObjectUtils.isEmpty(equipmentSpecificAlarms)){
equipmentSpecificAlarmService.saveOrUpdateBatch(equipmentSpecificAlarms);
}
// 需要在事务提交之后,否事务隔离查询不出数据
// 需要在事务提交之后,否事务隔离查询不出数据
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override
public void afterCommit() {
......@@ -488,6 +490,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
// 向其他系统推送报警
equipmentAlarmLogsToOtherSystems(alarmLogs);
// 直流中心消息推送刷新
publishDataToDCCenterPage(equipmentSpecificIndexList);
}
});
}
......@@ -1070,7 +1075,6 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
JSONObject jsonObject = new JSONObject();
jsonObject.put("seqNo", UUID.randomUUID().toString().replace("-", "").toLowerCase());
mqttSendGateway.sendToMqtt(TopicEnum.ALARM_LOG_INSERT.getTopic(), jsonObject.toString());
mqttSendGateway.sendToMqtt(TopicEnum.EQZXDT.getTopic(), UUIDUtils.getUUID());
// 数字换流站数据处理(高斯库同步及南瑞告警推送)
if (syncSwitch) {
List<FireEquipmentFireAlarm> alarmList = createFireEquipmentFireAlarmVo(equipmentAlarmLogs);
......@@ -1257,6 +1261,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
iEquipmentSpecificSerivce.integrationPageSysDataRefresh(topicEntity.getCode());
}
public void publishDataToDCCenterPage(List<EquipmentSpecificIndex> equipmentSpecificIndexList) {
mqttSendGateway.sendToMqtt(TopicEnum.EQZXDT.getTopic(), JSON.toJSONString(equipmentSpecificIndexList));
log.info(String.format("直流中心指标消息发送:%s", JSON.toJSONString(equipmentSpecificIndexList)));
}
/**
* 更新数据报表表
*
......
[
{
"name": "排油系统",
"name": "事故排油系统",
"code": "fireONLSys"
},
{
......@@ -8,7 +8,7 @@
"code": "fireWaterSys"
},
{
"name": "火灾报警系统",
"name": "火灾自动报警系统",
"code": "fireAlarmSys"
},
{
......
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