Ver Fonte

fix bug

wangliang há 1 ano atrás
pai
commit
1c1e7c2bf4

+ 1 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ObeCourseRequirementDto.java

@@ -41,8 +41,7 @@ public class ObeCourseRequirementDto implements Serializable {
     public ObeCourseRequirementDto(CourseRequirementMatrixDto courseRequirementMatrixDto) {
         this.courseCode = courseRequirementMatrixDto.getCourseCode();
         this.courseName = courseRequirementMatrixDto.getCourseName();
-        //todo 待xf补充
-        this.semesterName = "测试学期1";
+        this.semesterName = courseRequirementMatrixDto.getSemesterName();
     }
 
     public ObeCourseRequirementDto(ObeCourseRequirementDto obeCourseRequirementDto) {

+ 13 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TRBasicInfoServiceImpl.java

@@ -522,24 +522,35 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
         header2_1_set.add("课程目标");
         header2_1_set.add("考核项目及比例(%)");
 
+        Set<String> header2_2_set = new LinkedHashSet<>();
+        String finalSocreTitle = null;
         for (int i = 0; i < courseTargetWordDtoList.size(); i++) {
             CourseTargetWordDto courseTargetWordDto = courseTargetWordDtoList.get(i);
             UsualScoreWordDto usualScoreWordDto = courseTargetWordDto.getUsualScoreDto();
             if (Objects.nonNull(usualScoreWordDto) && !CollectionUtils.isEmpty(usualScoreWordDto.getUsualScoreDetailList())) {
                 Set<String> headTemp = usualScoreWordDto.getUsualScoreDetailList().stream().map(s -> s.getEvaluation()).collect(Collectors.toSet());
-                header2_1_set.addAll(headTemp);
+                header2_2_set.addAll(headTemp);
             }
             FinalScoreWordDto finalScoreWordDto = courseTargetWordDto.getFinalScoreDto();
             if (Objects.nonNull(finalScoreWordDto)) {
-                header2_1_set.add(finalScoreWordDto.getEvaluation());
+                finalSocreTitle = finalScoreWordDto.getEvaluation();
             }
         }
+        List<String> list_header = new ArrayList<>(header2_2_set);
+//        Collections.sort(list_header, Collections.reverseOrder());
+        Collections.sort(list_header);
+
         List<CellRenderData> cells_1 = new ArrayList<>(), cells_2 = new ArrayList<>();
         cells_1.add(Cells.of("课程目标").center().create());
         cells_1.add(Cells.of("考核项目及比例(%)").center().create());
         cells_2.add(Cells.of("课程目标").center().create());
 
         List<String> list = new ArrayList<>(header2_1_set);
+        if (Objects.nonNull(finalSocreTitle)) {
+            list.add(finalSocreTitle);
+        }
+        list.addAll(list_header);
+
         for (int i = 2; i < list.size(); i++) {
             cells_2.add(Cells.of(list.get(i)).center().create());
             if (i < list.size() - 1) {