|
@@ -19,6 +19,7 @@ import com.qmth.themis.business.dao.TOeExamRecordMapper;
|
|
|
import com.qmth.themis.business.dto.MqDto;
|
|
|
import com.qmth.themis.business.dto.response.MarkResultDto;
|
|
|
import com.qmth.themis.business.dto.response.TEStudentMonitorRecordDto;
|
|
|
+import com.qmth.themis.business.entity.TEExamStudent;
|
|
|
import com.qmth.themis.business.entity.TOeExamAnswer;
|
|
|
import com.qmth.themis.business.entity.TOeExamRecord;
|
|
|
import com.qmth.themis.business.entity.TSyncExamStudentScore;
|
|
@@ -29,6 +30,7 @@ import com.qmth.themis.common.contanst.Constants;
|
|
|
import com.qmth.themis.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
|
import com.qmth.themis.common.util.FileUtil;
|
|
|
+import com.qmth.themis.common.util.GsonUtil;
|
|
|
import com.qmth.themis.common.util.IpUtil;
|
|
|
import com.qmth.themis.common.util.SimpleBeanUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -430,19 +432,18 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
Map<String, ExamStudentAnswerCacheBean> answerMap = redisUtil
|
|
|
.getHashEntries(RedisKeyHelper.examAnswerKey(recordId));
|
|
|
if (!CollectionUtils.isEmpty(answerMap)) {
|
|
|
+ List<TOeExamAnswer> tOeExamAnswerList = new ArrayList<>(answerMap.size());
|
|
|
for (ExamStudentAnswerCacheBean answerCache : answerMap.values()) {
|
|
|
TOeExamAnswer answer = new TOeExamAnswer();
|
|
|
BeanUtils.copyProperties(answerCache, answer);
|
|
|
answer.setId(uidUtil.getId());
|
|
|
answer.setExamRecordId(recordId);
|
|
|
- examAnswerService.saveOrUpdate(answer);
|
|
|
+ tOeExamAnswerList.add(answer);
|
|
|
}
|
|
|
+ examAnswerService.saveOrUpdateBatch(tOeExamAnswerList);
|
|
|
}
|
|
|
- // //更新考生信息
|
|
|
- // ExamStudentCacheBean examStudentCache = examStudentService.getExamStudentCacheBean(er.getExamStudentId());
|
|
|
- // TEExamStudent examStudent = new TEExamStudent();
|
|
|
- // BeanUtils.copyProperties(examStudentCache, examStudent);
|
|
|
- // examStudentService.saveOrUpdate(examStudent);
|
|
|
+ //更新考生信息
|
|
|
+ teExamStudentService.updateExamStudentByCache(er.getExamStudentId());
|
|
|
//上传个人试卷结构
|
|
|
if (struct != null) {
|
|
|
ossUtil.upload(false, structFilePath, struct.getContent());
|
|
@@ -1512,13 +1513,15 @@ public class TOeExamRecordServiceImpl extends ServiceImpl<TOeExamRecordMapper, T
|
|
|
Map<String, ExamStudentAnswerCacheBean> answerMap = redisUtil
|
|
|
.getHashEntries(RedisKeyHelper.examAnswerKey(recordId));
|
|
|
if (!CollectionUtils.isEmpty(answerMap)) {
|
|
|
+ List<TOeExamAnswer> tOeExamAnswerList = new ArrayList<>(answerMap.size());
|
|
|
for (ExamStudentAnswerCacheBean answerCache : answerMap.values()) {
|
|
|
TOeExamAnswer answer = new TOeExamAnswer();
|
|
|
BeanUtils.copyProperties(answerCache, answer);
|
|
|
answer.setId(uidUtil.getId());
|
|
|
answer.setExamRecordId(recordId);
|
|
|
- examAnswerService.saveOrUpdate(answer);
|
|
|
+ tOeExamAnswerList.add(answer);
|
|
|
}
|
|
|
+ examAnswerService.saveOrUpdateBatch(tOeExamAnswerList);
|
|
|
}
|
|
|
}
|
|
|
|