|
@@ -79,16 +79,18 @@ public class ExamSummaryJob extends QuartzJobBean {
|
|
|
log.info("examSummaryJob examId:{},examActivityId:{},startTime:{},endTime:{}", examId, e.getExamActivityId(), DateUtil.format(new Date(startTime), "yyyy-MM-dd HH:mm:ss"), DateUtil.format(new Date(endTime), "yyyy-MM-dd HH:mm:ss"));
|
|
|
if (startTime <= timestamp && endTime >= timestamp) {
|
|
|
log.info("examSummaryJob examId:{},examActivityId:{},roomCodeSet:{} 开始统计", examId, e.getExamActivityId(), roomCodeSet);
|
|
|
- teExamSummaryService.examSummary(examId, e.getExamActivityId(), roomCodeSet);
|
|
|
- teRegionSummaryService.regionSummary(examId, e.getExamActivityId());
|
|
|
- //统计机构信息
|
|
|
- if (orgExamIdMap.size() > 0) {
|
|
|
- List<Long> examIdAll = new ArrayList<>();
|
|
|
- orgExamIdMap.forEach((k, v) -> {
|
|
|
- teOrgSummaryService.orgSummary(k, v);
|
|
|
- examIdAll.addAll(v);
|
|
|
- });
|
|
|
- teOrgSummaryService.orgSummary(0L, examIdAll);
|
|
|
+ boolean change = teExamSummaryService.examSummary(examId, e.getExamActivityId(), roomCodeSet);
|
|
|
+ if (change) {
|
|
|
+ teRegionSummaryService.regionSummary(examId, e.getExamActivityId());
|
|
|
+ //统计机构信息
|
|
|
+ if (orgExamIdMap.size() > 0) {
|
|
|
+ List<Long> examIdAll = new ArrayList<>();
|
|
|
+ orgExamIdMap.forEach((k, v) -> {
|
|
|
+ teOrgSummaryService.orgSummary(k, v);
|
|
|
+ examIdAll.addAll(v);
|
|
|
+ });
|
|
|
+ teOrgSummaryService.orgSummary(0L, examIdAll);
|
|
|
+ }
|
|
|
}
|
|
|
} else if (endTime <= timestamp) {//超过考试结束时间则删除考试场次缓存
|
|
|
themisCacheService.removeCurrentExamListCache(entry.getKey(), e.getExamActivityId());
|