Commit 0d9374dd authored by 李腾威's avatar 李腾威

地图消息接口

parent b8a109d1
......@@ -267,18 +267,20 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
if(flag) {
// 记录处置记录后修改 案件状态
alertCalledServiceImpl.updateAlertStage(alertCalledVo,CZHJ);
// 警情伤亡消息 矩阵 消息
JSONObject jsonObject = new JSONObject();
jsonObject.put("userId",user.getUserId());
jsonObject.put("alertId",alertCalledVo.getSequenceNbr());
try {
emqKeeper.getMqttClient().publish(alertHeartpushTopic, jsonObject.toString().getBytes("UTF-8"), 1, false);
emqKeeper.getMqttClient().publish(alertMatrixpushTopic, jsonObject.toString().getBytes("UTF-8"), 1, false);
if(null != user) {
// 警情伤亡消息 矩阵 消息
JSONObject jsonObject = new JSONObject();
jsonObject.put("userId",user.getUserId());
jsonObject.put("alertId",String.valueOf(alertCalledVo.getSequenceNbr()));
try {
emqKeeper.getMqttClient().publish(alertHeartpushTopic, jsonObject.toString().getBytes("UTF-8"), 1, false);
emqKeeper.getMqttClient().publish(alertMatrixpushTopic, jsonObject.toString().getBytes("UTF-8"), 1, false);
} catch (MqttException e) {
logger.error("mqtt发送失败" +jsonObject );
} catch (UnsupportedEncodingException e) {
logger.error("mqtt发送失败" +jsonObject );
} catch (MqttException e) {
logger.error("mqtt发送失败" +jsonObject );
} catch (UnsupportedEncodingException e) {
logger.error("mqtt发送失败" +jsonObject );
}
}
}
return flag;
......
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