Merge branch 'refs/heads/zcwy0622-yang' into dev0525

This commit is contained in:
yang
2024-07-09 13:51:11 +08:00

View File

@@ -143,7 +143,6 @@ public class AloneExamServiceImpl implements IAloneExamService{
}).thenAccept(result -> {
log.info("同步考试成绩到课程项目完成:" + result);
});
}
@Override
@@ -486,6 +485,7 @@ public class AloneExamServiceImpl implements IAloneExamService{
}
HashMap<String, String> userIdAndWorkNumMap = thirdApi.getUserIdByWorkNum(token, workNumList);
String finalToken = token;
saveExamScoreDtoList.forEach(examScoreDto -> {
TransactionStatus status = null; // 事务状态
@@ -540,6 +540,18 @@ public class AloneExamServiceImpl implements IAloneExamService{
}
}
CompletableFuture.supplyAsync(() -> {
if (aloneExam.getRefType().equals("14")){
thirdApi.syncExamScoreToCourseSuite(aloneExam, finalToken);
}
return "完成结果";
}).exceptionally(ex -> {
log.error("异步操作中发生错误: " + ex.getMessage(), ex);
return "发生错误";
}).thenAccept(result -> {
log.info("同步考试成绩到课程项目完成:" + result);
});
// 提交事务
transactionManager.commit(status);
} catch (Exception e) {