|
@@ -77,12 +77,20 @@ public class UpdateCorrectAnswerAndReFixScoreTask {
|
|
|
public void process(Long examId, CourseVO course, User user) {
|
|
|
List<ExamStudentVO> examStudents = this.getExamStudentList(user.getKey(), user.getToken(), examId, course.getCourseId());
|
|
|
|
|
|
+ int index = 0, total = examStudents.size();
|
|
|
for (ExamStudentVO examStudent : examStudents) {
|
|
|
// 按考生逐个更新正确答案并重新算分
|
|
|
this.fix(user.getKey(), user.getToken(), examId, course.getCourseId(), examStudent.getExamStudentId());
|
|
|
+
|
|
|
+ index++;
|
|
|
+ if (index % 100 == 0) {
|
|
|
+ float rate = index * 100f / total;
|
|
|
+ log.info("examId:{} courseCode:{} total:{} index:{} 进度:{}%", examId, course.getCourseCode(), total, index, rate);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
examStudents.clear();
|
|
|
+ log.info("examId:{} courseCode:{} total:{} 已处理!", examId, course.getCourseCode(), total);
|
|
|
}
|
|
|
|
|
|
private void fix(String key, String token, Long examId, Long courseId, Long examStudentId) {
|
|
@@ -130,7 +138,7 @@ public class UpdateCorrectAnswerAndReFixScoreTask {
|
|
|
|
|
|
sum += page.getContent().size();
|
|
|
float rate = sum * 100f / page.getTotalElements();
|
|
|
- log.info("examId={} courseId={} 已获取考生数:{} 进度:{}%", examId, courseId, sum, rate);
|
|
|
+ log.info("examId:{} courseId:{} 已获取考生数:{} 进度:{}%", examId, courseId, sum, rate);
|
|
|
}
|
|
|
|
|
|
return all;
|