|
@@ -35,6 +35,7 @@ public class CommonService {
|
|
|
* (正式场景数据极少,一次获取全部)
|
|
|
*/
|
|
|
public List<ExamInfo> getExamList(String examType) {
|
|
|
+ //todo 暂时直接查库,待“考务”接口提供后改为通过接口获取数据
|
|
|
SqlWrapper sql = new SqlWrapper()
|
|
|
.select("em.id examId,em.name examName,em.root_org_id orgId,org.name orgName").from("ec_e_exam em")
|
|
|
.innerJoin("ec_b_org org").on("org.id", "em.root_org_id");
|
|
@@ -42,7 +43,6 @@ public class CommonService {
|
|
|
sql.where().eq("em.exam_type", examType);
|
|
|
}
|
|
|
sql.orderBy("em.id", false);
|
|
|
- //log.debug(sql.build());
|
|
|
return jdbcTemplate.query(sql.build(), new BeanPropertyRowMapper(ExamInfo.class));
|
|
|
}
|
|
|
|
|
@@ -51,9 +51,10 @@ public class CommonService {
|
|
|
* 含试卷类型、考生数量
|
|
|
*/
|
|
|
public List<ExamCourseInfo> getExamCourseList(Long orgId, Long examId, Long courseId, String paperType) {
|
|
|
+ //todo 暂时直接查库,待“考务”接口提供后改为通过接口获取数据
|
|
|
SqlWrapper sql = new SqlWrapper()
|
|
|
.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") // ec_e_exam_student
|
|
|
.where()
|
|
|
.eq("root_org_id", orgId)
|
|
|
.and().eq("exam_id", examId);
|
|
@@ -67,6 +68,10 @@ public class CommonService {
|
|
|
return jdbcTemplate.query(sql.build(), new BeanPropertyRowMapper(ExamCourseInfo.class));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取考试所有的开考课程列表
|
|
|
+ * 含试卷类型、考生数量
|
|
|
+ */
|
|
|
public List<ExamCourseInfo> getExamCourseList(Long orgId, Long examId) {
|
|
|
return this.getExamCourseList(orgId, examId, null, null);
|
|
|
}
|