Kaynağa Gözat

答题卡设置题型

yangfeng 1 yıl önce
ebeveyn
işleme
4f713dc581

+ 5 - 0
web/src/main/java/com/ynfy/buss/exam/exam/dto/AnswerCardDTO.java

@@ -15,6 +15,7 @@ public class AnswerCardDTO {
      */
     private Integer questionCount;
 
+
     /**
      * 分数
      */
@@ -25,4 +26,8 @@ public class AnswerCardDTO {
      */
     private List<Integer> indexList;
 
+    /**
+     * 题型
+     */
+    private Integer questionType;
 }

+ 1 - 0
web/src/main/java/com/ynfy/buss/exam/exam/service/impl/ExamServiceImpl.java

@@ -562,6 +562,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
         for (Map.Entry<Integer, List<UserExamQuestion>> item : map.entrySet()) {
             AnswerCardDTO answerCard = new AnswerCardDTO();
             List<UserExamQuestion> questions = item.getValue();
+            answerCard.setQuestionType(item.getKey());
             //题数和分数
             answerCard.setQuestionCount(questions.size());
             answerCard.setQuestionScore(questions.stream().mapToInt(UserExamQuestion::getQuestionScore).sum());