Browse Source

feature 解决模板内容不正确的问题

xiahan 1 year ago
parent
commit
b006cfeb01

+ 7 - 3
rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/service/impl/ExportQuestionnaireRecordingsServiceImpl.java

@@ -246,11 +246,14 @@ public class ExportQuestionnaireRecordingsServiceImpl implements ExportQuestionn
 
         return String.format(SECOND_SUFFIX, firstList.get(0).getTempName(), firstList.get(0).getQuestionName(),
                 calculatePercentage(firstList.get(0).getPqxy() + firstList.get(0).getBjxy(), firstList.get(0).getTotalCount()),
+
                 secondList.get(0).getTempName(), secondList.get(0).getQuestionName(),
                 calculatePercentage(secondList.get(0).getPqxy() + secondList.get(0).getBjxy(), secondList.get(0).getTotalCount()),
-                secondList.get(2).getTempName(), secondList.get(2).getQuestionName(),
+
+                secondList.get(2).getQuestionName(),
                 calculatePercentage(secondList.get(2).getPqxy() + secondList.get(2).getBjxy(), secondList.get(2).getTotalCount()),
-                secondList.get(3).getTempName(), secondList.get(3).getQuestionName(),
+
+                secondList.get(3).getQuestionName(),
                 calculatePercentage(secondList.get(3).getPqxy() + secondList.get(3).getBjxy(), secondList.get(3).getTotalCount())
         );
     }
@@ -310,7 +313,8 @@ public class ExportQuestionnaireRecordingsServiceImpl implements ExportQuestionn
         List<QuestionnaireRecordingVo> fourth = values.get(3).stream()
                 .sorted(Comparator.comparingInt((QuestionnaireRecordingVo info) -> info.getPqxy() + info.getBjxy()).reversed())
                 .collect(Collectors.toList());
-        return String.format(String.format(SUMMARY, first.getTempName(), first.getTempName(), first.getQuestionName(), second.get(0).getTempName(),
+        return String.format(String.format(SUMMARY,
+                first.getTempName(), first.getTempName(), first.getQuestionName(), second.get(0).getQuestionName(),
                 second.get(0).getTempName(),second.get(0).getTempName(), second.get(0).getQuestionName(), second.get(1).getQuestionName(), second.get(2).getQuestionName(),
                 third.getTempName(), third.getTempName(), third.getQuestionName(), third.getQuestionName(),
                 fourth.get(0).getTempName(),fourth.get(0).getTempName(), fourth.get(0).getQuestionName(), fourth.get(1).getQuestionName()));