|
|
@@ -7,6 +7,7 @@ import com.google.common.collect.Sets;
|
|
|
import com.ruoyi.common.annotation.Excel;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult2;
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
+import com.ruoyi.common.enums.ExamType;
|
|
|
import com.ruoyi.common.enums.SubjectType;
|
|
|
import com.ruoyi.common.utils.CommonUtils;
|
|
|
import com.ruoyi.common.utils.NumberUtils;
|
|
|
@@ -52,7 +53,7 @@ public class StudentService {
|
|
|
this.learnAnswerMapper = learnAnswerMapper;
|
|
|
}
|
|
|
|
|
|
- public List<DzSubject> getSubjectList(boolean directed, Integer subjectType) {
|
|
|
+ public List<DzSubject> getSubjectList(boolean directed) {
|
|
|
SysUser sysUser = SecurityUtils.getLoginUser().getUser();
|
|
|
DzSubject sCond = new DzSubject();
|
|
|
sCond.setLocations(sysUser.getLocation());
|
|
|
@@ -60,17 +61,13 @@ public class StudentService {
|
|
|
List<DzSubject> list = dzSubjectService.selectDzSubjectList(sCond);
|
|
|
Set<Long> subjectIdSet;
|
|
|
if (!directed) {
|
|
|
- if(null == subjectType) { // 非普通是返回的所有,还不确定有哪些
|
|
|
+ if(!ExamType.VHS.equals(sysUser.getExamType())){
|
|
|
return list;
|
|
|
- } // 职高对口
|
|
|
+ }
|
|
|
+ subjectIdSet = Sets.newHashSet(1L, 2L, 3L);
|
|
|
Integer userSubjectId = SecurityUtils.getLoginUser().getUser().getSelectSubject();
|
|
|
- if(subjectType == 1) {
|
|
|
- subjectIdSet = null == userSubjectId ? Sets.newHashSet() : Sets.newHashSet(userSubjectId.longValue());
|
|
|
- } else { // 职高对口所有
|
|
|
- subjectIdSet = Sets.newHashSet(1L, 2L, 3L);
|
|
|
- if(subjectType == 2) {
|
|
|
- subjectIdSet.add(userSubjectId.longValue());
|
|
|
- }
|
|
|
+ if(null != userSubjectId) {
|
|
|
+ subjectIdSet.add(userSubjectId.longValue());
|
|
|
}
|
|
|
} else {
|
|
|
LearnStudent learnStudent = learnStudentService.selectLearnStudentByStudentId(SecurityUtils.getUserId());
|