Commit 189ed2eb authored by KeYong's avatar KeYong

Merge remote-tracking branch 'origin/dev_upgrade' into dev_upgrade

parents 26cf3ee3 5de7491c
......@@ -42,7 +42,7 @@ public class EquipmentSpecificIndexController extends BaseController {
@Autowired
private EquipmentSpecificIndexService equipmentSpecificIndexService;
@Permission
// @Permission
@ApiOperation(httpMethod = "GET", value = "获取最新告警状态", notes = "获取最新告警状态")
@RequestMapping(value = "/queryInitAlarm", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryInitAlerm(@ApiParam(value = "物联采集属性值", required = true) @RequestParam String value,
......
package com.yeejoin.amos.fas.business.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.component.rule.RuleTrigger;
......@@ -581,7 +582,12 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
} finally {
// 更新记录之后发送消息刷新
String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
webMqttComponent.publish(topic, "{\"msgType\":\"refreshRecord\"}");
Map<String, Object> result = new HashMap<>();
result.put("contingency", new ContingencyRo());
result.put("msgContext", Collections.EMPTY_MAP);
result.put("msgType", "refreshRecord");
webMqttComponent.publish(topic, JSON.toJSONString(result));
// webMqttComponent.publish(topic, "{\"msgType\":\"refreshRecord\"}");
fireQueue.removeFirst();
}
}
......
......@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.component.rule.config.ClazzUtils;
import com.yeejoin.amos.fas.business.action.CustomerAction;
import com.yeejoin.amos.fas.business.action.model.ContingencyRo;
import com.yeejoin.amos.fas.business.action.mq.WebMqttComponent;
import com.yeejoin.amos.fas.business.dao.mapper.*;
import com.yeejoin.amos.fas.business.dao.repository.*;
import com.yeejoin.amos.fas.business.param.AlarmParam;
......@@ -76,7 +78,15 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
@Autowired
private ContingencyInstanceInfoService contingencyInstanceInfoService;
@Autowired
private WebMqttComponent webMqttComponent;
@Value("${station.name}")
private String stationName;
@Value("${spring.application.name}")
private String serviceName;
@Value("${systemctl.sync.switch}")
private Boolean dataSyncSwitch;
......@@ -236,6 +246,13 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
planOperationRecordDataSync(record);
result.setMessage(ReserveEnum.RUN.getText());
result.setBatchNo(batchNo);
String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
Map<String, Object> map = new HashMap<>();
map.put("contingency", new ContingencyRo());
map.put("msgContext", "{\"content\":\"startPlan\"}");
map.put("msgType", "refreshRecord");
webMqttComponent.publish(topic, JSON.toJSONString(map));
}
return result;
}
......
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