|
@@ -24,7 +24,6 @@ import cn.com.qmth.examcloud.support.cache.bean.ExamSettingsCacheBean;
|
|
|
import cn.com.qmth.examcloud.support.enums.ExamProperties;
|
|
|
import cn.com.qmth.examcloud.support.helper.ExamCacheTransferHelper;
|
|
|
import cn.com.qmth.examcloud.support.helper.FaceBiopsyHelper;
|
|
|
-import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
|
|
|
import cn.com.qmth.examcloud.web.redis.RedisClient;
|
|
|
import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -201,10 +200,9 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
addExamRecordDataSync(tempExamRecordDataId, realExamRecordDataId);
|
|
|
|
|
|
//同步考试记录对应的试卷结构
|
|
|
- syncExamRecordPaperStruct(req.getExamRecordPaperStruct(), realExamRecordDataId);
|
|
|
-
|
|
|
+ syncExamRecordPaperStruct(req.getExamRecordPaperStruct(), realExamRecordData);
|
|
|
//同步作答记录
|
|
|
- syncExamRecordQuestions(req.getExamRecordQuestions(), realExamRecordDataId);
|
|
|
+ syncExamRecordQuestions(req.getExamRecordQuestions(), realExamRecordData);
|
|
|
|
|
|
//同步考试过程记录表
|
|
|
syncExamProcessRecords(req.getExamProcessRecords(), realExamRecordDataId);
|
|
@@ -561,13 +559,11 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
|
|
|
}
|
|
|
|
|
|
- private void syncExamRecordQuestions(ExamRecordQuestionsBean examRecordQuestions, Long realExamRecordDataId) {
|
|
|
- ExamRecordQuestionsEntity entity = copyExamRecordQuestionsFrom(examRecordQuestions, realExamRecordDataId);
|
|
|
+ private void syncExamRecordQuestions(ExamRecordQuestionsBean examRecordQuestions, ExamRecordDataEntity examRecordData) {
|
|
|
+ ExamRecordQuestionsEntity entity = copyExamRecordQuestionsFrom(examRecordQuestions, examRecordData.getId());
|
|
|
examRecordQuestionsRepo.save(entity);
|
|
|
|
|
|
//更新考试记录表中的作答记录id
|
|
|
- ExamRecordDataEntity examRecordData =
|
|
|
- GlobalHelper.getEntity(examRecordDataRepo, realExamRecordDataId, ExamRecordDataEntity.class);
|
|
|
examRecordData.setExamRecordQuestionsId(entity.getId());
|
|
|
examRecordDataRepo.save(examRecordData);
|
|
|
}
|
|
@@ -605,13 +601,11 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
return entity;
|
|
|
}
|
|
|
|
|
|
- private void syncExamRecordPaperStruct(ExamRecordPaperStructBean examRecordPaperStruct, Long examRecordDataId) {
|
|
|
+ private void syncExamRecordPaperStruct(ExamRecordPaperStructBean examRecordPaperStruct, ExamRecordDataEntity examRecordData) {
|
|
|
ExamRecordPaperStructEntity entity = copyExamRecordPaperStructFrom(examRecordPaperStruct);
|
|
|
examRecordPaperStructRepo.save(entity);
|
|
|
|
|
|
//更新考试记录表中的试卷结构id
|
|
|
- ExamRecordDataEntity examRecordData =
|
|
|
- GlobalHelper.getEntity(examRecordDataRepo, examRecordDataId, ExamRecordDataEntity.class);
|
|
|
examRecordData.setPaperStructId(entity.getId());
|
|
|
examRecordDataRepo.save(examRecordData);
|
|
|
}
|
|
@@ -851,7 +845,6 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
entity.setHasVirtualCamera(examCapture.getHasVirtualCamera());
|
|
|
entity.setCameraInfos(examCapture.getCameraInfos());
|
|
|
entity.setExtMsg(examCapture.getExtMsg());
|
|
|
-
|
|
|
return entity;
|
|
|
}
|
|
|
|
|
@@ -861,7 +854,6 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
entity.setContinuedTime(bean.getContinuedTime());
|
|
|
entity.setStartTime(bean.getStartTime());
|
|
|
entity.setUsedExamTime(bean.getUsedExamTime());
|
|
|
-
|
|
|
return entity;
|
|
|
}
|
|
|
|
|
@@ -871,7 +863,6 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
entity.setProcessName(bean.getProcessName());
|
|
|
entity.setRecordTime(bean.getRecordTime());
|
|
|
entity.setSourceIp(bean.getSourceIp());
|
|
|
-
|
|
|
return entity;
|
|
|
}
|
|
|
|