|
|
@@ -5,10 +5,12 @@ import com.alibaba.fastjson2.util.DateUtils;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.google.common.collect.Sets;
|
|
|
+import com.ruoyi.common.core.content.VistorContextHolder;
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
import com.ruoyi.common.enums.ExamType;
|
|
|
import com.ruoyi.common.enums.UserRegStatus;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
+import com.ruoyi.dz.service.IDzControlService;
|
|
|
import com.ruoyi.dz.service.IDzSubjectService;
|
|
|
import com.ruoyi.enums.*;
|
|
|
import com.ruoyi.ie.domain.AMarjorPlan;
|
|
|
@@ -52,8 +54,9 @@ public class ExamService {
|
|
|
private final PaperService paperService;
|
|
|
private final IAMarjorPlanService marjorPlanService;
|
|
|
private final ISysUserService sysUserService;
|
|
|
+ private final IDzControlService dzControlService;
|
|
|
|
|
|
- public ExamService(LearnPaperMapper paperMapper, LearnKnowledgeTreeMapper knowledgeTreeMapper, LearnExamineeMapper examineeMapper, ILearnPaperService learnPaperService, PaperService paperService, IAMarjorPlanService marjorPlanService, LearnAnswerMapper learnAnswerMapper, LearnExamineeMapper learnExamineeMapper, ISysUserService sysUserService, LearnStudentMapper learnStudentMapper, ILearnPlanService learnPlanService, LearnQuestionsMapper learnQuestionsMapper, IDzSubjectService dzSubjectService, LearnWrongBookMapper wrongBookMapper, LearnWrongDetailMapper wrongDetailMapper, LearnKnowledgeCourseMapper learnKnowledgeCourseMapper, LearnTestStudentMapper learnTestStudentMapper) {
|
|
|
+ public ExamService(LearnPaperMapper paperMapper, LearnKnowledgeTreeMapper knowledgeTreeMapper, LearnExamineeMapper examineeMapper, ILearnPaperService learnPaperService, PaperService paperService, IAMarjorPlanService marjorPlanService, LearnAnswerMapper learnAnswerMapper, LearnExamineeMapper learnExamineeMapper, ISysUserService sysUserService, LearnStudentMapper learnStudentMapper, ILearnPlanService learnPlanService, LearnQuestionsMapper learnQuestionsMapper, IDzSubjectService dzSubjectService, LearnWrongBookMapper wrongBookMapper, LearnWrongDetailMapper wrongDetailMapper, LearnKnowledgeCourseMapper learnKnowledgeCourseMapper, LearnTestStudentMapper learnTestStudentMapper, IDzControlService dzControlService) {
|
|
|
this.paperMapper = paperMapper;
|
|
|
this.knowledgeTreeMapper = knowledgeTreeMapper;
|
|
|
this.examineeMapper = examineeMapper;
|
|
|
@@ -71,6 +74,7 @@ public class ExamService {
|
|
|
this.wrongDetailMapper = wrongDetailMapper;
|
|
|
this.learnKnowledgeCourseMapper = learnKnowledgeCourseMapper;
|
|
|
this.learnTestStudentMapper = learnTestStudentMapper;
|
|
|
+ this.dzControlService = dzControlService;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -433,8 +437,8 @@ public class ExamService {
|
|
|
throw new ValidationException("该专业只考技能展示/实践操作");
|
|
|
}
|
|
|
AMarjorPlan plan = marjorPlanService.selectAMarjorPlanById(ls.getMajorPlanId());
|
|
|
- if(null == plan) {
|
|
|
- throw new ValidationException("专业id无效");
|
|
|
+ if(null == plan || !plan.getMatchYear().equals(dzControlService.selectDzControl(VistorContextHolder.getContext()).getPlanYear())) {
|
|
|
+ throw new ValidationException("定向没设置或过期,请先重新选择定向");
|
|
|
}
|
|
|
LearnExaminee examinee = new LearnExaminee();
|
|
|
examinee.setStudentId(SecurityUtils.getLoginUser().getUser().getUserId());
|