|
@@ -24,6 +24,7 @@ import javax.annotation.Resource;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Api(tags = "教研分析学校公用Controller")
|
|
@Api(tags = "教研分析学校公用Controller")
|
|
@RestController
|
|
@RestController
|
|
@@ -50,7 +51,9 @@ public class SysReportController {
|
|
if (Objects.nonNull(tbExamList) && tbExamList.size() > 0) {
|
|
if (Objects.nonNull(tbExamList) && tbExamList.size() > 0) {
|
|
tbExamResultList = new ArrayList<>();
|
|
tbExamResultList = new ArrayList<>();
|
|
for (TBExam tbExam : tbExamList) {
|
|
for (TBExam tbExam : tbExamList) {
|
|
- tbExamResultList.add(new TBExamResult(tbExam.getId(), tbExam.getSemester()));
|
|
|
|
|
|
+ if (!tbExamResultList.stream().map(TBExam::getSemester).collect(Collectors.toList()).contains(tbExam.getSemester())){
|
|
|
|
+ tbExamResultList.add(new TBExamResult(tbExam.getId(), tbExam.getSemester()));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return ResultUtil.ok(tbExamResultList);
|
|
return ResultUtil.ok(tbExamResultList);
|