ting.yin 1 năm trước cách đây
mục cha
commit
850928f88e

+ 2 - 4
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/mark/service/Impl/MarkServiceImpl.java

@@ -1739,9 +1739,6 @@ public class MarkServiceImpl implements MarkService {
                 String subjectCode = question.getSubjectCode();
                 boolean objective = question.isObjective();
                 ExamSubject subject = subjectService.find(examId, subjectCode);
-                double totalScore = objective ? BigDecimalUtils.sub(subject.getObjectiveScore(),
-                        question.getTotalScore()) : BigDecimalUtils.sub(subject.getSubjectiveScore(),
-                        question.getTotalScore());
                 questionService.deleteById(question.getId());
                 if (objective) {
                     examService.updateObjectiveStatus(examId, ObjectiveStatus.WAITING);
@@ -1765,7 +1762,8 @@ public class MarkServiceImpl implements MarkService {
                         }
                     }
                 }
-                subjectService.updateScore(examId, subjectCode, objective, totalScore);
+                subjectService.updateScore(examId, subjectCode, objective,
+                        questionService.sumTotalScore(examId, subject.getCode(), objective));
             }
         }
         return true;