wangliang 4 年之前
父節點
當前提交
04b73470dd

+ 4 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/CreatePdfUtil.java

@@ -108,8 +108,8 @@ public class CreatePdfUtil {
         if (Objects.nonNull(examDetailCourseList) && examDetailCourseList.size() > 0) {
 //            Set<Long> examDetailCourseIds = new HashSet<>();
 //            htmlMap.put("examDetailCourseId", StringUtils.join(examDetailCourseIds, ", "));
-            Set<String> paperNumbers = examDetailCourseList.stream().map(s -> s.getPaperNumber()).collect(Collectors.toSet());
-            Set<String> courseNames = examDetailCourseList.stream().map(s -> s.getCourseName()).collect(Collectors.toSet());
+            List<String> paperNumbers = examDetailCourseList.stream().map(s -> s.getPaperNumber()).collect(Collectors.toList());
+            List<String> courseNames = examDetailCourseList.stream().map(s -> s.getCourseName()).collect(Collectors.toList());
             htmlMap.put("courseName", String.join(", ", courseNames));
             htmlMap.put("courseCode", String.join(", ", paperNumbers));
         } else {
@@ -211,8 +211,8 @@ public class CreatePdfUtil {
         }
         Map<String, Object> htmlMap = new HashMap<>();
         if (Objects.nonNull(examDetailCourseList) && examDetailCourseList.size() > 0) {
-            Set<String> paperNumbers = examDetailCourseList.stream().map(s -> s.getPaperNumber()).collect(Collectors.toSet());
-            Set<String> courseNames = examDetailCourseList.stream().map(s -> s.getCourseName()).collect(Collectors.toSet());
+            List<String> paperNumbers = examDetailCourseList.stream().map(s -> s.getPaperNumber()).collect(Collectors.toList());
+            List<String> courseNames = examDetailCourseList.stream().map(s -> s.getCourseName()).collect(Collectors.toList());
             htmlMap.put("courseName", String.join(", ", courseNames));
             htmlMap.put("courseCode", String.join(", ", paperNumbers));
         } else {