|
@@ -18,6 +18,7 @@ import cn.com.qmth.examcloud.core.print.repository.CourseStatisticRepository;
|
|
import cn.com.qmth.examcloud.core.print.service.CourseStatisticService;
|
|
import cn.com.qmth.examcloud.core.print.service.CourseStatisticService;
|
|
import cn.com.qmth.examcloud.core.print.service.PrintingProjectService;
|
|
import cn.com.qmth.examcloud.core.print.service.PrintingProjectService;
|
|
import cn.com.qmth.examcloud.core.print.service.StatisticService;
|
|
import cn.com.qmth.examcloud.core.print.service.StatisticService;
|
|
|
|
+import cn.com.qmth.examcloud.core.print.service.bean.common.CourseInfo;
|
|
import cn.com.qmth.examcloud.core.print.service.bean.common.ExamCourseInfo;
|
|
import cn.com.qmth.examcloud.core.print.service.bean.common.ExamCourseInfo;
|
|
import cn.com.qmth.examcloud.core.print.service.bean.common.ExamInfo;
|
|
import cn.com.qmth.examcloud.core.print.service.bean.common.ExamInfo;
|
|
import cn.com.qmth.examcloud.core.print.service.bean.coursestatistic.*;
|
|
import cn.com.qmth.examcloud.core.print.service.bean.coursestatistic.*;
|
|
@@ -158,6 +159,9 @@ public class CourseStatisticServiceImpl implements CourseStatisticService {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //课程基本信息Maps
|
|
|
|
+ Map<Long, CourseInfo> courseMaps = new HashMap<>();
|
|
|
|
+
|
|
//按课程和试卷类型逐个更新统计信息
|
|
//按课程和试卷类型逐个更新统计信息
|
|
for (ExamCourseInfo info : examCourses) {
|
|
for (ExamCourseInfo info : examCourses) {
|
|
//Key: examId_courseId_paperType
|
|
//Key: examId_courseId_paperType
|
|
@@ -172,6 +176,15 @@ public class CourseStatisticServiceImpl implements CourseStatisticService {
|
|
this.updateTotalStudentByOrgExamCourse(info);
|
|
this.updateTotalStudentByOrgExamCourse(info);
|
|
oldCourseStatisticMaps.remove(key);
|
|
oldCourseStatisticMaps.remove(key);
|
|
} else {
|
|
} else {
|
|
|
|
+ //获取并设置课程基本信息
|
|
|
|
+ CourseInfo course = courseMaps.get(info.getCourseId());
|
|
|
|
+ if (course == null) {
|
|
|
|
+ course = statisticService.findCourseInfo(info.getOrgId(), info.getCourseId());
|
|
|
|
+ courseMaps.put(course.getId(), course);
|
|
|
|
+ }
|
|
|
|
+ info.setCourseCode(course.getCode());
|
|
|
|
+ info.setCourseName(course.getName());
|
|
|
|
+
|
|
//不存在则新增
|
|
//不存在则新增
|
|
this.addCourseStatistic(info);
|
|
this.addCourseStatistic(info);
|
|
}
|
|
}
|
|
@@ -188,8 +201,8 @@ public class CourseStatisticServiceImpl implements CourseStatisticService {
|
|
statistic.setOrgId(info.getOrgId());
|
|
statistic.setOrgId(info.getOrgId());
|
|
statistic.setExamId(info.getExamId());
|
|
statistic.setExamId(info.getExamId());
|
|
statistic.setCourseId(info.getCourseId());
|
|
statistic.setCourseId(info.getCourseId());
|
|
- statistic.setCourseCode(info.getCourseCode());//todo
|
|
|
|
- statistic.setCourseName(info.getCourseName());//todo
|
|
|
|
|
|
+ statistic.setCourseCode(info.getCourseCode());
|
|
|
|
+ statistic.setCourseName(info.getCourseName());
|
|
statistic.setPaperType(info.getPaperType());
|
|
statistic.setPaperType(info.getPaperType());
|
|
statistic.setTotalStudent(info.getTotalStudent());
|
|
statistic.setTotalStudent(info.getTotalStudent());
|
|
statistic.setPaperStatus(PaperStatus.无.getIndex());
|
|
statistic.setPaperStatus(PaperStatus.无.getIndex());
|