Commit c2f55dd1 authored by litengwei's avatar litengwei

任务 11717

parent e965ab96
...@@ -440,10 +440,12 @@ public class CheckServiceImpl implements ICheckService { ...@@ -440,10 +440,12 @@ public class CheckServiceImpl implements ICheckService {
} }
} }
// 巡检站端与中心级数据同步 // 巡检站端与中心级数据同步
Check finalCheck1 = check;
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() { TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override @Override
public void afterCommit() { public void afterCommit() {
// 事物提交后业务逻辑 // 事物提交后业务逻辑
patrolDataSyncService.checkDataSync(finalCheck1);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("idList", checkInputList.stream().map(CheckInput::getId).collect(Collectors.toList())); map.put("idList", checkInputList.stream().map(CheckInput::getId).collect(Collectors.toList()));
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map); List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
...@@ -700,7 +702,6 @@ public class CheckServiceImpl implements ICheckService { ...@@ -700,7 +702,6 @@ public class CheckServiceImpl implements ICheckService {
map.put("idList", checkInputList.stream().map(CheckInput::getId).collect(Collectors.toList())); map.put("idList", checkInputList.stream().map(CheckInput::getId).collect(Collectors.toList()));
List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map); List<CheckInputSyncBo> checkInputSyncBoList = checkInputMapper.getCheckInputSyncBoList(map);
patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList); patrolDataSyncService.checkInputBoDataSync(checkInputSyncBoList);
patrolDataSyncService.checkInputDataSync(checkInputList);
} }
}); });
return checkDto; return checkDto;
......
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