|
@@ -83,6 +83,9 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
private ExamScoreRepo examScoreRepo;
|
|
|
@Autowired
|
|
|
private ExamStudentCache examStudentCache;
|
|
|
+ @Autowired
|
|
|
+ private ExamStudentFinalScoreService examStudentFinalScoreService;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 同步考试记录数据
|
|
@@ -105,7 +108,8 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
ExamRecordDataBean transitionExamRecordData = req.getExamRecordData();
|
|
|
|
|
|
//必须先更新考生的考试次数,同步考试记录会用
|
|
|
- increaseUsedExamTimes(transitionExamRecordData.getExamStudentId());
|
|
|
+ Long examStudentId = transitionExamRecordData.getExamStudentId();
|
|
|
+ increaseUsedExamTimes(examStudentId);
|
|
|
|
|
|
//同步考试记录,并返回真实的考试记录id
|
|
|
Long realExamRecordDataId = syncExamRecordData(transitionExamRecordData);
|
|
@@ -116,6 +120,9 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
//同步考试分数表
|
|
|
Long examScoreId = syncExamScore(transitionExamRecordData, realExamRecordDataId);
|
|
|
|
|
|
+ //计算最终分数
|
|
|
+ examStudentFinalScoreService.calcAndSaveFinalScore(examStudentId);
|
|
|
+
|
|
|
//同步抓拍照片结果(同步抓拍的数据)
|
|
|
if (null != req.getExamSyncCapture()) {
|
|
|
syncExamSyncCapture(req.getExamSyncCapture(), realExamRecordDataId);
|
|
@@ -154,7 +161,7 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
|
|
|
//同步后续处理
|
|
|
processAfterSyncExamData(realExamRecordDataId, examScoreId, transitionExamRecordData.getObjectiveScore(),
|
|
|
- transitionExamRecordData.getExamStudentId());
|
|
|
+ examStudentId);
|
|
|
|
|
|
return new SyncExamDataResp();
|
|
|
}
|
|
@@ -173,7 +180,7 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
examScoreEntity.setSubjectiveScore(transitionExamRecordData.getSubjectiveScore());
|
|
|
examScoreEntity.setSuccPercent(transitionExamRecordData.getSuccPercent());
|
|
|
|
|
|
- ExamScoreEntity result = examScoreRepo.save(examScoreEntity);
|
|
|
+ ExamScoreEntity result = examScoreRepo.saveAndFlush(examScoreEntity);
|
|
|
|
|
|
return result.getId();
|
|
|
}
|