|
@@ -23,10 +23,12 @@ import cn.com.qmth.examcloud.core.basic.api.response.GetStudentResp;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.response.SaveCourseResp;
|
|
|
import cn.com.qmth.examcloud.core.examwork.dao.ExamCourseRelationRepo;
|
|
|
import cn.com.qmth.examcloud.core.examwork.dao.ExamOrgSettingsRepo;
|
|
|
+import cn.com.qmth.examcloud.core.examwork.dao.ExamPaperTypeRelationRepo;
|
|
|
import cn.com.qmth.examcloud.core.examwork.dao.ExamRepo;
|
|
|
import cn.com.qmth.examcloud.core.examwork.dao.ExamStudentRepo;
|
|
|
import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamCourseRelationEntity;
|
|
|
import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamEntity;
|
|
|
+import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamPaperTypeRelationEntity;
|
|
|
import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamStudentEntity;
|
|
|
import cn.com.qmth.examcloud.core.examwork.service.ExamStudentService;
|
|
|
import cn.com.qmth.examcloud.core.examwork.service.bean.ExamStudentInfo;
|
|
@@ -74,6 +76,9 @@ public class ExamStudentServiceImpl implements ExamStudentService {
|
|
|
@Autowired
|
|
|
ExamRecordCloudService examRecordCloudService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ ExamPaperTypeRelationRepo examPaperTypeRelationRepo;
|
|
|
+
|
|
|
private boolean isStarted(Long examId, Long StudentId, Long courseId) {
|
|
|
CheckExamIsStartedReq checkExamIsStartedReq = new CheckExamIsStartedReq();
|
|
|
checkExamIsStartedReq.setExamId(examId);
|
|
@@ -243,13 +248,19 @@ public class ExamStudentServiceImpl implements ExamStudentService {
|
|
|
ExamStudentEntity saved = examStudentRepo.saveAndFlush(examStudent);
|
|
|
|
|
|
ExamCourseRelationEntity relation = new ExamCourseRelationEntity();
|
|
|
- relation.setExamId(saved.getId());
|
|
|
+ relation.setExamId(saved.getExamId());
|
|
|
relation.setCourseId(saved.getCourseId());
|
|
|
relation.setCourseLevel(saved.getCourseLevel());
|
|
|
relation.setCourseCode(courseBean.getCode());
|
|
|
relation.setCourseName(saved.getCourseName());
|
|
|
examCourseRelationRepo.save(relation);
|
|
|
|
|
|
+ ExamPaperTypeRelationEntity pt = new ExamPaperTypeRelationEntity();
|
|
|
+ pt.setCourseId(saved.getCourseId());
|
|
|
+ pt.setExamId(saved.getExamId());
|
|
|
+ pt.setPageType(saved.getPaperType());
|
|
|
+ examPaperTypeRelationRepo.save(pt);
|
|
|
+
|
|
|
// 同步操作
|
|
|
SyncExamStudentReq req = new SyncExamStudentReq();
|
|
|
req.setSyncType("update");
|