|
@@ -50,16 +50,25 @@ public class CommonService {
|
|
* 获取考试所有的开考课程列表
|
|
* 获取考试所有的开考课程列表
|
|
* 含试卷类型、考生数量
|
|
* 含试卷类型、考生数量
|
|
*/
|
|
*/
|
|
- public List<ExamCourseInfo> getExamCourseList(Long orgId, Long examId) {
|
|
|
|
|
|
+ public List<ExamCourseInfo> getExamCourseList(Long orgId, Long examId, Long courseId, String paperType) {
|
|
SqlWrapper sql = new SqlWrapper()
|
|
SqlWrapper sql = new SqlWrapper()
|
|
.select("root_org_id orgId,exam_id,course_id,course_code,course_name,paper_type,count(course_code) totalStudent")
|
|
.select("root_org_id orgId,exam_id,course_id,course_code,course_name,paper_type,count(course_code) totalStudent")
|
|
.from("ecs_exam_student")//todo ec_e_exam_student
|
|
.from("ecs_exam_student")//todo ec_e_exam_student
|
|
.where()
|
|
.where()
|
|
.eq("root_org_id", orgId)
|
|
.eq("root_org_id", orgId)
|
|
- .and().eq("exam_id", examId)
|
|
|
|
- .groupBy("course_id,paper_type");
|
|
|
|
- //log.debug(sql.build());
|
|
|
|
|
|
+ .and().eq("exam_id", examId);
|
|
|
|
+ if (courseId != null) {
|
|
|
|
+ sql.and().eq("course_id", courseId);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotBlank(paperType)) {
|
|
|
|
+ sql.and().eq("paper_type", paperType);
|
|
|
|
+ }
|
|
|
|
+ sql.groupBy("course_id,paper_type");
|
|
return jdbcTemplate.query(sql.build(), new BeanPropertyRowMapper(ExamCourseInfo.class));
|
|
return jdbcTemplate.query(sql.build(), new BeanPropertyRowMapper(ExamCourseInfo.class));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public List<ExamCourseInfo> getExamCourseList(Long orgId, Long examId) {
|
|
|
|
+ return this.getExamCourseList(orgId, examId, null, null);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|