|
@@ -82,6 +82,16 @@ public class CoursePaperServiceImpl implements CoursePaperService {
|
|
|
return CoursePaperConvert.ofList(list);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public long countCoursePaper(Long orgId, Long examId, Long courseId) {
|
|
|
+ SearchBuilder searches = new SearchBuilder();
|
|
|
+ searches.eq("orgId", orgId);
|
|
|
+ searches.eq("examId", examId);
|
|
|
+ searches.eq("courseId", courseId);
|
|
|
+ Specification<CoursePaper> spec = SpecUtils.buildSearchers(CoursePaper.class, searches.build());
|
|
|
+ return coursePaperRepository.count(spec);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void syncCourseNameByCourseId(Long courseId, String courseName) {
|
|
|
if (courseId == null || StringUtils.isBlank(courseName)) {
|
|
@@ -397,11 +407,13 @@ public class CoursePaperServiceImpl implements CoursePaperService {
|
|
|
|
|
|
if (needStruct) {
|
|
|
//客观题结构
|
|
|
- List<ObjectiveQuestionStructure> objectives = examQuestionStructureService.getObjectiveQuestionStructureList(statistic.getOrgId(), statistic.getExamId(), paper.getPaperId(), statistic.getPaperType());
|
|
|
+ List<ObjectiveQuestionStructure> objectives = examQuestionStructureService.getObjectiveQuestionStructureList(
|
|
|
+ statistic.getOrgId(), statistic.getExamId(), paper.getPaperId(), statistic.getPaperType());
|
|
|
allObjectives.addAll(objectives);
|
|
|
|
|
|
//主观题结构
|
|
|
- List<SubjectiveQuestionStructure> subjectives = examQuestionStructureService.getSubjectiveQuestionStructureList(statistic.getOrgId(), statistic.getExamId(), paper.getPaperId(), statistic.getPaperType());
|
|
|
+ List<SubjectiveQuestionStructure> subjectives = examQuestionStructureService.getSubjectiveQuestionStructureList(
|
|
|
+ statistic.getOrgId(), statistic.getExamId(), paper.getPaperId(), statistic.getPaperType());
|
|
|
allSubjectives.addAll(subjectives);
|
|
|
}
|
|
|
|