Commit 3a59225c authored by 高建强's avatar 高建强

item:应急处置流程执行修改

parent 1b0dbc75
......@@ -52,6 +52,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
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.core.foundation.context.RequestContext;
......@@ -370,6 +372,10 @@ public class ContingencyAction implements CustomerAction {
content = instedParams(content, contingencyRo);
iContingencyInstance.createInstanceRecord(contingencyRo.getBatchNo(), "", "DEFAULT", content, "MESSAGE", "");
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override
public void afterCommit() {
// 事物提交后业务逻辑
SafteyPlanResult result = new SafteyPlanResult();
Map<String, Object> tempmap1 = new HashMap<>();
try {
......@@ -392,8 +398,10 @@ public class ContingencyAction implements CustomerAction {
}
result.add(tempmap1);
System.out.println("--------------------messageRecord----------------------" + result);
this.sendcmd("recordarea", paramObj, result);
this.sendweb("recordarea", paramObj, result);
sendcmd("recordarea", paramObj, result);
sendweb("recordarea", paramObj, result);
}
});
}
}
......
......@@ -391,12 +391,6 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Override
public Page<ContingencyPlanInstanceVO> getPlaneRecordByNew(Integer pageNum, Integer size, String batchNo, AgencyUserModel user) {
try {
// TODO 为了配合流程,前端获取执行记录消息的数据,后续处理
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
Integer planInstanceCount = contingencyPlanInstanceMapper.getPlanInstanceCount(batchNo);
// 根据批次号获取预案记录
List<ContingencyPlanInstance> planInstanceListByPage = contingencyPlanInstanceMapper.getPlanInstanceListByPage(batchNo, (pageNum - 1) * size, size);
......
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