Commit cfd7de99 authored by tangwei's avatar tangwei

增加警情

parent efdfcc32
...@@ -43,6 +43,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -43,6 +43,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Autowired @Autowired
RuleAlertCalledService ruleAlertCalledService; RuleAlertCalledService ruleAlertCalledService;
@Autowired
private EmqKeeper emqKeeper;
@Value("${mqtt.topic.command.alert.notice}")
private String topic;
/** /**
* *
* <pre> * <pre>
...@@ -105,7 +111,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -105,7 +111,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
alertCalledObjsDto.setAlertFormValue(alertFormValuelist); alertCalledObjsDto.setAlertFormValue(alertFormValuelist);
//调用规则 //调用规则
ruleAlertCalledService.fireAlertCalledRule(alertCalledObjsDto); ruleAlertCalledService.fireAlertCalledRule(alertCalledObjsDto);
} //通知实战指挥页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
emqKeeper.getMqttClient().publish(topic, "0".getBytes(), RuleConfig.DEFAULT_QOS, 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