Ver código fonte

考务文件导入去掉一个课程多个编号校验

xiaof 4 anos atrás
pai
commit
410acad832

+ 0 - 8
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -572,15 +572,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
         System.out.println(JSON.toJSONString(examinationImportDtoList));
 
         // 校验课程代码和试卷编号在印刷计划下是1对1的关系
-        List<String> courseCodeList = examinationImportDtoList.stream().map(ExaminationImportDto::getCourseCode).distinct().collect(Collectors.toList());
         List<String> paperNumberList = examinationImportDtoList.stream().map(ExaminationImportDto::getPaperNumber).distinct().collect(Collectors.toList());
-        for (String courseCode : courseCodeList) {
-            List<String> tmp = examinationImportDtoList.stream().filter(e -> courseCode.equals(e.getCourseCode()))
-                    .map(ExaminationImportDto::getPaperNumber).distinct().collect(Collectors.toList());
-            if (tmp.size() != 1) {
-                throw ExceptionResultEnum.ERROR.exception("课程代码为 " + courseCode + ",对应多个试卷编号 : " + tmp);
-            }
-        }
         for (String paperNumber : paperNumberList) {
             List<String> tmp = examinationImportDtoList.stream().filter(e -> paperNumber.equals(e.getPaperNumber()))
                     .map(ExaminationImportDto::getCourseCode).distinct().collect(Collectors.toList());