|
@@ -236,8 +236,16 @@ public class CoursePaperServiceImpl implements CoursePaperService {
|
|
|
Check.isNull(orgId, "学校ID不能为空!");
|
|
|
Check.isNull(examId, "考试ID不能为空!");
|
|
|
|
|
|
- //todo
|
|
|
- return new CoursePaperTotalInfo();
|
|
|
+ //试卷总数 = 试卷数据中"课程代码 + 试卷类型"的数量
|
|
|
+ int allNum = courseStatisticRepository.countByOrgIdAndExamId(orgId, examId);
|
|
|
+
|
|
|
+ //已有试卷数 = 已分配待指定试卷的数量
|
|
|
+ int existNum = courseStatisticRepository.countByOrgIdAndExamIdAndPaperStatus(orgId, examId, PaperStatus.已有.getIndex());
|
|
|
+
|
|
|
+ //缺少试卷数 = 试卷总数 - 已有试卷数
|
|
|
+ int missNum = allNum - existNum;
|
|
|
+
|
|
|
+ return new CoursePaperTotalInfo(allNum, existNum, missNum);
|
|
|
}
|
|
|
|
|
|
@Override
|