Commit 94cb5138 authored by tangwei's avatar tangwei

修改bug

parent 30aacaad
...@@ -59,7 +59,9 @@ ...@@ -59,7 +59,9 @@
and a.alert_type_code = #{par.alertTypeCode} and a.alert_type_code = #{par.alertTypeCode}
</if> </if>
<if test='par.alertId==null'>
and a.sequence_nbr =#{par.alertId}
</if>
<if test='par.whether24!=false'> <if test='par.whether24!=false'>
and a.call_time &gt;= (NOW() - interval 24 hour) and a.call_time &gt;= (NOW() - interval 24 hour)
</if> </if>
......
...@@ -124,6 +124,11 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -124,6 +124,11 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
@Value("${mqtt.topic.command.alert.notice}") @Value("${mqtt.topic.command.alert.notice}")
private String topic; private String topic;
@Value("${mqtt.topic.command.alert.noticeData}")
private String topicData;
@Value("${redis.cache.failure.time}") @Value("${redis.cache.failure.time}")
private long time; private long time;
@Value("${mqtt.topic.command.power.deployment}") @Value("${mqtt.topic.command.power.deployment}")
...@@ -394,6 +399,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -394,6 +399,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
null, null, null); null, null, null);
// 通知实战指挥页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化 // 通知实战指挥页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
emqKeeper.getMqttClient().publish(topic, "0".getBytes(), RuleConfig.DEFAULT_QOS, true); emqKeeper.getMqttClient().publish(topic, "0".getBytes(), RuleConfig.DEFAULT_QOS, true);
//tuisongxinjingqing
RequestData par=new RequestData();
par.setAlertId(alertCalled.getSequenceNbr());
List<AlertCalledZhDto> list = this.alertCalledListByAlertStatus(null, null, par);
String json=list!=null&&list.size()>0?JSONObject.toJSONString(list.get(0)):"";
emqKeeper.getMqttClient().publish(topicData, json.getBytes(), RuleConfig.DEFAULT_QOS, true);
/** /**
* 同步保存ES * 同步保存ES
*/ */
......
...@@ -27,6 +27,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; ...@@ -27,6 +27,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.biz.common.utils.WordConverterUtils; import com.yeejoin.amos.boot.biz.common.utils.WordConverterUtils;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto; import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue; import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam; import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient; import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
...@@ -154,6 +155,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -154,6 +155,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
private RuleTrigger ruleTrigger; private RuleTrigger ruleTrigger;
@Value("${mqtt.topic.command.alert.noticeJa}")
private String topicJa;
private final String msgType = "jcs119"; private final String msgType = "jcs119";
@Override @Override
...@@ -482,6 +486,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -482,6 +486,19 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
alertCalledAction.sendAlertCalleCmd(sCode, mobiles, smsParams); alertCalledAction.sendAlertCalleCmd(sCode, mobiles, smsParams);
} }
//警情結案推送
if(alertWay.equals(AlertBusinessTypeEnum.警情结案.getCode())) {
RequestData par=new RequestData();
par.setAlertId(alertCalled.getSequenceNbr());
List<AlertCalledZhDto> list = alertCalledService.alertCalledListByAlertStatus(null, null, par);
String json=list!=null&&list.size()>0?JSONObject.toJSONString(list.get(0)):"";
emqKeeper.getMqttClient().publish(topicJa, json.getBytes(), RuleConfig.DEFAULT_QOS, true);
}
emqKeeper.getMqttClient().publish(topic, alertCalledId.getBytes(), RuleConfig.DEFAULT_QOS, false); emqKeeper.getMqttClient().publish(topic, alertCalledId.getBytes(), RuleConfig.DEFAULT_QOS, false);
} }
......
...@@ -58,6 +58,10 @@ mqtt.topic.alert.reporting=alertReporting ...@@ -58,6 +58,10 @@ mqtt.topic.alert.reporting=alertReporting
## 实战指挥新警情主题 ## 实战指挥新警情主题
mqtt.topic.command.alert.notice=alertNotice mqtt.topic.command.alert.notice=alertNotice
mqtt.topic.command.alert.noticeData=alertNoticeData
mqtt.topic.command.alert.noticeJa=alertNoticeJa
## 跑马灯地震、天气预警信息 ## 跑马灯地震、天气预警信息
mqtt.topic.command.meteorological.notice=meteorological mqtt.topic.command.meteorological.notice=meteorological
......
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