|
@@ -19,6 +19,7 @@ import cn.com.qmth.examcloud.core.print.service.CommonService;
|
|
|
import cn.com.qmth.examcloud.core.print.service.CourseStatisticService;
|
|
|
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.coursestatistic.CourseRefreshForm;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.coursestatistic.CourseStatisticConvert;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.coursestatistic.CourseStatisticInfo;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.coursestatistic.CourseStatisticQuery;
|
|
@@ -75,10 +76,22 @@ public class CourseStatisticServiceImpl implements CourseStatisticService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void initCourseStatistic(Long orgId, Long examId, Long[] courseIds) {
|
|
|
- List<ExamCourseInfo> examCourses = commonService.getExamCourseList(orgId, examId);
|
|
|
- //courseIds paperType todo
|
|
|
- this.syncCourseStatisticList(examCourses);
|
|
|
+ public void initCourseStatistic(CourseRefreshForm form) {
|
|
|
+ Check.isNull(form, "请求参数不能为空!");
|
|
|
+ Check.isNull(form.getOrgId(), "学校ID不能为空!");
|
|
|
+ Check.isNull(form.getExamId(), "考试ID不能为空!");
|
|
|
+ List<CourseRefreshForm.Course> courses = form.getCourses();
|
|
|
+ if (courses == null || courses.size() == 0) {
|
|
|
+ //课程ID和试卷类型未指定时,则不统计
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (CourseRefreshForm.Course course : courses) {
|
|
|
+ if (course.getCourseId() == null || StringUtils.isBlank(course.getPaperType())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ List<ExamCourseInfo> examCourses = commonService.getExamCourseList(form.getOrgId(), form.getExamId(), course.getCourseId(), course.getPaperType());
|
|
|
+ this.syncCourseStatisticList(examCourses);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|