|
@@ -17,6 +17,7 @@ import cn.com.qmth.examcloud.core.print.common.utils.DateUtils;
|
|
import cn.com.qmth.examcloud.core.print.entity.CourseStatistic;
|
|
import cn.com.qmth.examcloud.core.print.entity.CourseStatistic;
|
|
import cn.com.qmth.examcloud.core.print.enums.PaperStatus;
|
|
import cn.com.qmth.examcloud.core.print.enums.PaperStatus;
|
|
import cn.com.qmth.examcloud.core.print.repository.CourseStatisticRepository;
|
|
import cn.com.qmth.examcloud.core.print.repository.CourseStatisticRepository;
|
|
|
|
+import cn.com.qmth.examcloud.core.print.service.CoursePaperService;
|
|
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;
|
|
@@ -52,6 +53,8 @@ public class CourseStatisticServiceImpl implements CourseStatisticService {
|
|
@Autowired
|
|
@Autowired
|
|
private PrintingProjectService printingProjectService;
|
|
private PrintingProjectService printingProjectService;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private CoursePaperService coursePaperService;
|
|
|
|
+ @Autowired
|
|
private StatisticService statisticService;
|
|
private StatisticService statisticService;
|
|
@Autowired
|
|
@Autowired
|
|
private JdbcTemplate jdbcTemplate;
|
|
private JdbcTemplate jdbcTemplate;
|
|
@@ -229,7 +232,14 @@ public class CourseStatisticServiceImpl implements CourseStatisticService {
|
|
statistic.setCourseName(info.getCourseName());
|
|
statistic.setCourseName(info.getCourseName());
|
|
statistic.setPaperType(info.getPaperType());
|
|
statistic.setPaperType(info.getPaperType());
|
|
statistic.setTotalStudent(info.getTotalStudent());
|
|
statistic.setTotalStudent(info.getTotalStudent());
|
|
- statistic.setPaperStatus(PaperStatus.无.getIndex());
|
|
|
|
|
|
+
|
|
|
|
+ long total = coursePaperService.countCoursePaper(info.getOrgId(), info.getExamId(), info.getCourseId());
|
|
|
|
+ if (total > 0) {
|
|
|
|
+ statistic.setPaperStatus(PaperStatus.未指定.getIndex());
|
|
|
|
+ } else {
|
|
|
|
+ statistic.setPaperStatus(PaperStatus.无.getIndex());
|
|
|
|
+ }
|
|
|
|
+
|
|
courseStatisticRepository.save(statistic);
|
|
courseStatisticRepository.save(statistic);
|
|
}
|
|
}
|
|
|
|
|