|
@@ -2,19 +2,16 @@ package cn.com.qmth.examcloud.core.oe.student.service.impl;
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
-import cn.com.qmth.examcloud.support.cache.bean.CourseCacheBean;
|
|
|
-import cn.com.qmth.examcloud.support.cache.bean.ExamSettingsCacheBean;
|
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import cn.com.qmth.examcloud.api.commons.enums.ExamType;
|
|
|
-import cn.com.qmth.examcloud.core.basic.api.bean.CourseBean;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.dao.ExamRecordDataRepo;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.dao.entity.ExamRecordDataEntity;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.service.ExamRecordDataService;
|
|
|
-import cn.com.qmth.examcloud.examwork.api.bean.ExamBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.CourseCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.ExamSettingsCacheBean;
|
|
|
import cn.com.qmth.examcloud.support.enums.ExamRecordStatus;
|
|
|
import cn.com.qmth.examcloud.support.examing.ExamRecordData;
|
|
|
import cn.com.qmth.examcloud.support.examing.ExamingSession;
|
|
@@ -63,8 +60,7 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
|
|
|
examRecordData.setFaceStrangerCount(0);
|
|
|
examRecordData.setExamRecordStatus(ExamRecordStatus.EXAM_ING);
|
|
|
examRecordDataRepo.save(examRecordData);
|
|
|
- ExamRecordData bean = new ExamRecordData();
|
|
|
- BeanUtils.copyProperties(bean, examRecordData);
|
|
|
+ ExamRecordData bean = of(examRecordData);
|
|
|
//存入redis
|
|
|
saveExamRecordDataCache(examRecordData.getId(), bean);
|
|
|
return bean;
|
|
@@ -88,4 +84,44 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
|
|
|
redisClient.delete(key + examRecordDataId);
|
|
|
}
|
|
|
|
|
|
+ private ExamRecordData of(ExamRecordDataEntity et) {
|
|
|
+ ExamRecordData bean = new ExamRecordData();
|
|
|
+ bean.setId(et.getId());
|
|
|
+ bean.setExamId(et.getId());
|
|
|
+ bean.setExamType(et.getExamType());
|
|
|
+
|
|
|
+ bean.setExamStudentId(et.getExamStudentId());
|
|
|
+ bean.setStudentId(et.getStudentId());
|
|
|
+ bean.setCourseId(et.getCourseId());
|
|
|
+ bean.setOrgId(et.getOrgId());
|
|
|
+ bean.setRootOrgId(et.getRootOrgId());
|
|
|
+
|
|
|
+ bean.setBasePaperId(et.getBasePaperId());
|
|
|
+
|
|
|
+ bean.setPaperType(et.getPaperType());
|
|
|
+
|
|
|
+ bean.setStartTime(et.getStartTime());
|
|
|
+ bean.setEndTime(et.getEndTime());
|
|
|
+ bean.setUsedExamTime(et.getUsedExamTime());
|
|
|
+ bean.setIsContinued(et.getIsContinued());
|
|
|
+ bean.setContinuedCount(et.getContinuedCount());
|
|
|
+ bean.setIsExceed(et.getIsExceed());
|
|
|
+ bean.setFaceSuccessCount(et.getFaceSuccessCount());
|
|
|
+ bean.setFaceFailedCount(et.getFaceFailedCount());
|
|
|
+ bean.setFaceStrangerCount(et.getFaceStrangerCount());
|
|
|
+ bean.setFaceTotalCount(et.getFaceTotalCount());
|
|
|
+ bean.setExamRecordStatus(et.getExamRecordStatus());
|
|
|
+ bean.setHandInExamType(et.getHandInExamType());
|
|
|
+ bean.setFaceVerifyResult(et.getFaceVerifyResult());
|
|
|
+ bean.setCleanTime(et.getCleanTime());
|
|
|
+ bean.setIsWarn(et.getIsWarn());
|
|
|
+ bean.setIsAudit(et.getIsAudit());
|
|
|
+ bean.setIsIllegality(et.getIsIllegality());
|
|
|
+ bean.setTotalScore(et.getTotalScore());
|
|
|
+ bean.setObjectiveScore(et.getObjectiveScore());
|
|
|
+ bean.setObjectiveAccuracy(et.getObjectiveAccuracy());
|
|
|
+ bean.setSubjectiveScore(et.getSubjectiveScore());
|
|
|
+ bean.setSuccPercent(et.getSuccPercent());
|
|
|
+ return bean;
|
|
|
+ }
|
|
|
}
|