|
@@ -226,30 +226,27 @@ public class TCPaperStructController {
|
|
|
Map<Long, String> courseWeightFinalScoreMap = new LinkedHashMap<>();
|
|
|
for (CourseWeightDto courseWeightDto : courseWeightDtoList) {
|
|
|
List<CourseWeightDetailDto> courseWeightDetailDtoList = courseWeightDto.getEvaluationList();
|
|
|
- courseWeightDetailDtoList.stream().filter(s -> {
|
|
|
- if (Objects.equals(s.getEvaluationName(), SystemConstant.FINAL_SCORE_STR) && Objects.nonNull(s.getEnable()) && s.getEnable()) {
|
|
|
- courseWeightFinalScoreMap.put(courseWeightDto.getCourseTargetId(), courseWeightDto.getCourseTargetName());
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }).collect(Collectors.toList());
|
|
|
+ if (!CollectionUtils.isEmpty(courseWeightDetailDtoList)) {
|
|
|
+ courseWeightDetailDtoList.stream().filter(s -> {
|
|
|
+ if (Objects.equals(s.getEvaluationName(), SystemConstant.FINAL_SCORE_STR) && Objects.nonNull(s.getEnable()) && s.getEnable()) {
|
|
|
+ courseWeightFinalScoreMap.put(courseWeightDto.getCourseTargetId(), courseWeightDto.getCourseTargetName());
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ }
|
|
|
}
|
|
|
paperStructDimensionResultList.stream().peek(s -> {
|
|
|
s.setPaperNumber(tcPaperStruct.getPaperNumber());
|
|
|
List<CourseTargetWebDto> courseTargetWebDtoList = s.getTargetList();
|
|
|
- if (!CollectionUtils.isEmpty(courseTargetWebDtoList)) {
|
|
|
- courseTargetWebDtoList.stream().peek(m -> {
|
|
|
- if (!courseWeightFinalScoreMap.containsKey(m.getTargetId())) {
|
|
|
- paperStructDimensionResultNewList.add(s);
|
|
|
- }
|
|
|
- }).collect(Collectors.toList());
|
|
|
- }
|
|
|
+ courseTargetWebDtoList.stream().peek(m -> {
|
|
|
+ if (!courseWeightFinalScoreMap.containsKey(m.getTargetId())) {
|
|
|
+ paperStructDimensionResultNewList.add(s);
|
|
|
+ }
|
|
|
+ }).collect(Collectors.toList());
|
|
|
}).collect(Collectors.toList());
|
|
|
-
|
|
|
- if (!CollectionUtils.isEmpty(paperStructDimensionResultNewList)) {
|
|
|
- paperStructDimensionResultNewList.stream().peek(s -> s.getTargetList().clear()).collect(Collectors.toList());
|
|
|
- }
|
|
|
+ paperStructDimensionResultNewList.stream().peek(s -> s.getTargetList().clear()).collect(Collectors.toList());
|
|
|
}
|
|
|
}
|
|
|
return ResultUtil.ok(paperStructDimensionResultList);
|