|
@@ -572,15 +572,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
System.out.println(JSON.toJSONString(examinationImportDtoList));
|
|
System.out.println(JSON.toJSONString(examinationImportDtoList));
|
|
|
|
|
|
// 校验课程代码和试卷编号在印刷计划下是1对1的关系
|
|
// 校验课程代码和试卷编号在印刷计划下是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());
|
|
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) {
|
|
for (String paperNumber : paperNumberList) {
|
|
List<String> tmp = examinationImportDtoList.stream().filter(e -> paperNumber.equals(e.getPaperNumber()))
|
|
List<String> tmp = examinationImportDtoList.stream().filter(e -> paperNumber.equals(e.getPaperNumber()))
|
|
.map(ExaminationImportDto::getCourseCode).distinct().collect(Collectors.toList());
|
|
.map(ExaminationImportDto::getCourseCode).distinct().collect(Collectors.toList());
|