Commit 0058884f authored by 高建强's avatar 高建强

item:解决APP端,消息刷新不同步问题

parent 89cb794b
...@@ -186,7 +186,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -186,7 +186,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
return categorys; return categorys;
} }
@Transactional
public Optional<Equipment> fire(String batchNo, String stepCode, String contingencyPlanId, String buttonCode, String buttonState, String stepStateOnbutton) throws Exception { public Optional<Equipment> fire(String batchNo, String stepCode, String contingencyPlanId, String buttonCode, String buttonState, String stepStateOnbutton) throws Exception {
//火灾误报 //火灾误报
ContingencyOriginalData contingencyOriginalData = iContingencyOriginalDataDao.findByBatchNo(batchNo); ContingencyOriginalData contingencyOriginalData = iContingencyOriginalDataDao.findByBatchNo(batchNo);
...@@ -278,10 +278,10 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -278,10 +278,10 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
publisherPlanLog(stepCode, buttonCode, batchNo); publisherPlanLog(stepCode, buttonCode, batchNo);
// 更新记录之后发送消息刷新 // 更新记录之后发送消息刷新
String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan"); // String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
System.out.println("=========================> 刷新聊天记录 refreshRecord "); // System.out.println("=========================> 刷新聊天记录 refreshRecord ");
//
webMqttComponent.publish(topic, "{\"msgType\":\"refreshRecord\"}"); // webMqttComponent.publish(topic, "{\"msgType\":\"refreshRecord\"}");
} }
} else { } else {
throw new Exception("数据异常,请联系管理员."); throw new Exception("数据异常,请联系管理员.");
...@@ -585,6 +585,9 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -585,6 +585,9 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
} catch (Exception e) { } catch (Exception e) {
throw e; throw e;
} finally { } finally {
// 更新记录之后发送消息刷新
String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
webMqttComponent.publish(topic, "{\"msgType\":\"refreshRecord\"}");
fireQueue.removeFirst(); fireQueue.removeFirst();
} }
} }
......
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