|
@@ -32,6 +32,7 @@ import com.qmth.teachcloud.common.bean.dto.MqDto;
|
|
|
import com.qmth.teachcloud.common.bean.dto.excel.DescribeImportDto;
|
|
|
import com.qmth.teachcloud.common.bean.params.BasicStudentExtrasParam;
|
|
|
import com.qmth.teachcloud.common.bean.result.BasicStudentResult;
|
|
|
+import com.qmth.teachcloud.common.bean.result.MenuResult;
|
|
|
import com.qmth.teachcloud.common.bean.result.SysUserResult;
|
|
|
import com.qmth.teachcloud.common.bean.result.TbTaskDetailResult;
|
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
@@ -1499,24 +1500,28 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
}
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(errorClassIds)) {
|
|
|
- Map<String, List<String>> finalMap = new HashMap<>();
|
|
|
- StringJoiner stringJoiner = new StringJoiner(",");
|
|
|
- List<BasicClazz> basicClazzList = basicClazzService.listByIds(errorClassIds);
|
|
|
- for (BasicClazz basicClazz : basicClazzList) {
|
|
|
- String key = usedClassIdsMap.get(basicClazz.getId().toString());
|
|
|
- List<String> value;
|
|
|
- if (finalMap.containsKey(key)) {
|
|
|
- value = finalMap.get(key);
|
|
|
- } else {
|
|
|
- value = new ArrayList<>();
|
|
|
+ // 选择学生时,不校验
|
|
|
+ boolean containsPrivilege = teachcloudCommonService.containsPrivilege(sysUser.getId(), "button", "SelectStudent");
|
|
|
+ if (!containsPrivilege) {
|
|
|
+ Map<String, List<String>> finalMap = new HashMap<>();
|
|
|
+ StringJoiner stringJoiner = new StringJoiner(",");
|
|
|
+ List<BasicClazz> basicClazzList = basicClazzService.listByIds(errorClassIds);
|
|
|
+ for (BasicClazz basicClazz : basicClazzList) {
|
|
|
+ String key = usedClassIdsMap.get(basicClazz.getId().toString());
|
|
|
+ List<String> value;
|
|
|
+ if (finalMap.containsKey(key)) {
|
|
|
+ value = finalMap.get(key);
|
|
|
+ } else {
|
|
|
+ value = new ArrayList<>();
|
|
|
+ }
|
|
|
+ value.add(basicClazz.getClazzName());
|
|
|
+ finalMap.put(key, value);
|
|
|
}
|
|
|
- value.add(basicClazz.getClazzName());
|
|
|
- finalMap.put(key, value);
|
|
|
- }
|
|
|
- for (Map.Entry<String, List<String>> entry : finalMap.entrySet()) {
|
|
|
- stringJoiner.add("考试对象[" + String.join(",", entry.getValue()) + "]已被" + entry.getKey() + "选择");
|
|
|
+ for (Map.Entry<String, List<String>> entry : finalMap.entrySet()) {
|
|
|
+ stringJoiner.add("考试对象[" + String.join(",", entry.getValue()) + "]已被" + entry.getKey() + "选择");
|
|
|
+ }
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(stringJoiner.toString());
|
|
|
}
|
|
|
- throw ExceptionResultEnum.ERROR.exception(stringJoiner.toString());
|
|
|
}
|
|
|
}
|
|
|
|