Commit a7afeb69 authored by litengwei's avatar litengwei

bug 提交

parent e0c05230
......@@ -36,6 +36,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionSynchronization;
import org.springframework.transaction.support.TransactionSynchronizationManager;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
......@@ -249,7 +251,14 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
planOperationRecordDataSync(record);
result.setMessage(ReserveEnum.RUN.getText());
result.setBatchNo(batchNo);
equipmentHandlerService.executeDynamicPlan(batchNo, deviceData, equipment, equipmentSpecific, toke, operationRecord.getId());
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override
public void afterCommit() {
equipmentHandlerService.executeDynamicPlan(batchNo, deviceData, equipment, equipmentSpecific, toke, operationRecord.getId());
}
});
// app端使用
ContingencyRo contingencyRo = new ContingencyRo();
contingencyRo.setBatchNo(batchNo);
......@@ -273,7 +282,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
msgContext.put("content", "startPlanFirst");
map.put("contingency", new ContingencyRo());
// map.put("msgContext", "{\"content\":\"startPlan\"}");
// msgContext.put("content", "startPlan");
// msgContext.put("content", "startPlan");
map.put("contingency", contingencyRo);
map.put("msgContext", msgContext);
map.put("msgType", "refreshRecord");
......
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