deason 3 жил өмнө
parent
commit
cf210eada2

+ 5 - 1
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/update_correct_answer/FixCorrectAnswerAndResetScoreService.java

@@ -98,7 +98,8 @@ public class FixCorrectAnswerAndResetScoreService {
         List<ExamRecordDataEntity> examRecordDataList = queryExamRecordDataList(examId, courseCode);
 
         if (examRecordDataList.isEmpty()) {
-            throw new StatusException("100001", "找不到对应的考试记录");
+            System.out.println("找不到对应的考试记录! examId=" + examId + ", courseCode=" + courseCode);
+            return;
         }
 
         System.out.println(String.format("total size is %s, start...", examRecordDataList.size()));
@@ -160,6 +161,7 @@ public class FixCorrectAnswerAndResetScoreService {
         for (ExamQuestionEntity eq : objectiveQuesList) {
             if (!StringUtils.isNullOrEmpty(eq.getStudentAnswer())
                     && !StringUtils.isNullOrEmpty(eq.getCorrectAnswer())
+                    // todo 兼容新结构
                     && eq.getStudentAnswer().equals(eq.getCorrectAnswer())) {
                 totalObjectiveScore += eq.getQuestionScore();
             }
@@ -180,6 +182,7 @@ public class FixCorrectAnswerAndResetScoreService {
         for (ExamQuestionEntity eq : objectiveQuesList) {
             if (!StringUtils.isNullOrEmpty(eq.getStudentAnswer())
                     && !StringUtils.isNullOrEmpty(eq.getCorrectAnswer())
+                    //todo 兼容新结构
                     && eq.getStudentAnswer().equals(eq.getCorrectAnswer())) {
                 correctNum += 1;
             }
@@ -270,6 +273,7 @@ public class FixCorrectAnswerAndResetScoreService {
         Double studentUnitScore = 0D;
         if (!StringUtils.isNullOrEmpty(rightAnswer)
                 && !(StringUtils.isNullOrEmpty(studentAnswer))
+                //todo 兼容新结构
                 && rightAnswer.equals(studentAnswer)) {
             studentUnitScore = curQues.getQuestionScore();
         }