|
@@ -3,6 +3,7 @@ package cn.com.qmth.examcloud.core.oe.admin.service.impl;
|
|
|
import cn.com.qmth.examcloud.api.commons.enums.ExamSpecialSettingsType;
|
|
|
import cn.com.qmth.examcloud.api.commons.enums.ExamType;
|
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.base.utils.Check;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordFileAnswerRepo;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.ExamStudentRepo;
|
|
@@ -74,6 +75,9 @@ public class OfflineExamServiceImpl implements OfflineExamService {
|
|
|
@Autowired
|
|
|
private ExamRecordFileAnswerRepo examRecordFileAnswerRepo;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ExamStudentService examStudentService;
|
|
|
+
|
|
|
@Value("${app.upyun.uploadUrl}")
|
|
|
private String upyunUploadUrl;
|
|
|
|
|
@@ -164,6 +168,13 @@ public class OfflineExamServiceImpl implements OfflineExamService {
|
|
|
|
|
|
@Override
|
|
|
public void startOfflineExam(Long examStudentId) {
|
|
|
+ Check.isNull(examStudentId, "examStudentId不能为空");
|
|
|
+
|
|
|
+ boolean isEnable = examStudentService.isEnableExamStudent(examStudentId);
|
|
|
+ if (!isEnable) {
|
|
|
+ throw new StatusException("000500", "当前考生已禁用!");
|
|
|
+ }
|
|
|
+
|
|
|
SysPropertyCacheBean stuClientLoginLimit = CacheHelper.getSysProperty("STU_CLIENT_LOGIN_LIMIT");
|
|
|
boolean stuClientLoginLimitBoolean = false;
|
|
|
if (stuClientLoginLimit.getHasValue()) {
|