|
@@ -88,6 +88,7 @@ import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamStudentEntity;
|
|
|
import cn.com.qmth.examcloud.core.examwork.service.ExamService;
|
|
|
import cn.com.qmth.examcloud.core.examwork.service.bean.ExamInfo;
|
|
|
import cn.com.qmth.examcloud.core.examwork.service.bean.ExamSpecialSettingsInfo;
|
|
|
+import cn.com.qmth.examcloud.core.examwork.service.cache.ExamSettingsCache;
|
|
|
import cn.com.qmth.examcloud.core.examwork.service.impl.ExamStudentServiceImpl;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.ExamRecordCloudService;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.request.CheckExamIsStartedReq;
|
|
@@ -161,6 +162,9 @@ public class ExamController extends ControllerSupport {
|
|
|
@Autowired
|
|
|
DataSyncCloudService dataSyncCloudService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ ExamSettingsCache examSettingsCache;
|
|
|
+
|
|
|
private static final String[] EXAM_ORG_SETTINGS_EXCEL_HEADER = new String[]{"学习中心ID", "学习中心代码",
|
|
|
"学习中心名称", "是否可以考试(是/否)", "开始考试时间 yyyy-MM-dd hh:mm:ss", "结束考试时间 yyyy-MM-dd hh:mm:ss"};
|
|
|
|
|
@@ -556,6 +560,8 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
ExamEntity saved = examService.saveExam(examInfo, es);
|
|
|
|
|
|
+ examSettingsCache.remove(saved.getId());
|
|
|
+
|
|
|
return saved;
|
|
|
}
|
|
|
|
|
@@ -838,6 +844,10 @@ public class ExamController extends ControllerSupport {
|
|
|
dataSyncCloudService.syncExam(req);
|
|
|
}
|
|
|
|
|
|
+ for (Long examId : examIds) {
|
|
|
+ examSettingsCache.remove(examId);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "禁用考试", notes = "禁用考试")
|
|
@@ -875,6 +885,10 @@ public class ExamController extends ControllerSupport {
|
|
|
dataSyncCloudService.syncExam(req);
|
|
|
}
|
|
|
|
|
|
+ for (Long examId : examIds) {
|
|
|
+ examSettingsCache.remove(examId);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|