|
@@ -3,7 +3,6 @@ package com.keao.edu.user.service.impl;
|
|
|
import com.keao.edu.common.dal.BaseDAO;
|
|
|
import com.keao.edu.common.exception.BizException;
|
|
|
import com.keao.edu.common.page.PageInfo;
|
|
|
-import com.keao.edu.common.page.QueryInfo;
|
|
|
import com.keao.edu.common.service.impl.BaseServiceImpl;
|
|
|
import com.keao.edu.common.tenant.TenantContextHolder;
|
|
|
import com.keao.edu.user.dao.ExamSongDao;
|
|
@@ -20,7 +19,6 @@ import com.keao.edu.user.page.ExamSubjectSongQueryInfo;
|
|
|
import com.keao.edu.user.service.ExamSubjectSongService;
|
|
|
import com.keao.edu.util.collection.MapUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.poi.ss.formula.functions.T;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
@@ -65,6 +63,14 @@ public class ExamSubjectSongServiceImpl extends BaseServiceImpl<Long, ExamSubjec
|
|
|
throw new BizException("此状态考级项目不支持添加考级内容");
|
|
|
}
|
|
|
|
|
|
+ examSubjectSongs.stream()
|
|
|
+ .collect(Collectors.groupingBy(ExamSubjectSong::getExamSubjectId)).values().forEach(e->{
|
|
|
+ Set<Integer> levels = e.stream().map(ExamSubjectSong::getLevel).collect(Collectors.toSet());
|
|
|
+ if(levels.size()!=e.size()){
|
|
|
+ throw new BizException("考级内容等级重复");
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
List<ExamSubjectSong> existExamSubjectSongs=examSubjectSongDao.findByExam(examSubjectSongs.get(0).getExaminationBasicId());
|
|
|
Map<Long, List<Integer>> subjectLevelMap = new HashMap<>();
|
|
|
Set<Long> existSubjectIds = new HashSet<>();
|