|
@@ -52,7 +52,14 @@ public class OutletPaperStructServiceImpl implements OutletPaperStructService {
|
|
|
@Override
|
|
|
public List<OuterQuestionBean> getPaperStructQuestions(Long examId, String courseCode, QuestionCategory questionCategory) {
|
|
|
// 获取题库调卷规则
|
|
|
- ExtractConfigCacheBean extractConfig = CacheHelper.getExtractConfig(examId, courseCode);
|
|
|
+ ExtractConfigCacheBean extractConfig = null;
|
|
|
+ try {
|
|
|
+ extractConfig = CacheHelper.getExtractConfig(examId, courseCode);
|
|
|
+ } catch (Exception e) {
|
|
|
+ String err = "examId = " + examId + ", courseCode = " + courseCode + " " + e.getMessage();
|
|
|
+ log.warn(err, e);
|
|
|
+ }
|
|
|
+
|
|
|
if (extractConfig == null || CollectionUtils.isEmpty(extractConfig.getDetails())) {
|
|
|
// 调卷规则不存在
|
|
|
return new ArrayList<>();
|
|
@@ -60,7 +67,7 @@ public class OutletPaperStructServiceImpl implements OutletPaperStructService {
|
|
|
|
|
|
//需求调整20200904:考试下某课程存在多套试卷时,直接给出错误提示,101444这个错误码有外部使用,不要随便修改
|
|
|
if (extractConfig.getDetails().size() > 1) {
|
|
|
- throw new StatusException("101444", String.format("当前考试课程代码为:%s的试卷规则中存在多套试卷",courseCode));
|
|
|
+ throw new StatusException("101444", String.format("当前考试课程代码为:%s的试卷规则中存在多套试卷", courseCode));
|
|
|
}
|
|
|
|
|
|
// 默认选取调卷规则中的任意一份试卷
|