|
@@ -162,7 +162,46 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
Check.isNull(query, "查询参数不能为空!");
|
|
|
//查询条件
|
|
|
StringBuilder sqlBuilder = new StringBuilder();
|
|
|
- sqlBuilder.append(EXAM_RECORD_SQL);
|
|
|
+ sqlBuilder.append("select record_data.id," +
|
|
|
+ "record_data.exam_record_status," +
|
|
|
+ "record_data.start_time," +
|
|
|
+ "record_data.end_time," +
|
|
|
+ "record_data.clean_time," +
|
|
|
+ "record_data.used_exam_time," +
|
|
|
+ "record_data.exam_order," +
|
|
|
+ "record_data.is_warn," +
|
|
|
+ "record_data.is_audit," +
|
|
|
+ "record_data.is_illegality," +
|
|
|
+ "record_data.is_reexamine," +
|
|
|
+ "record_data.is_continued," +
|
|
|
+ "record_data.is_all_objective_paper," +
|
|
|
+ "record_data.continued_count," +
|
|
|
+ "record_data.face_success_count," +
|
|
|
+ "record_data.face_failed_count," +
|
|
|
+ "record_data.face_stranger_count," +
|
|
|
+ "record_data.face_total_count," +
|
|
|
+ "record_data.face_success_percent," +
|
|
|
+ "record_data.face_verify_result," +
|
|
|
+ "record_data.baidu_face_liveness_success_percent," +
|
|
|
+ "record_data.creation_time," +
|
|
|
+ "record_data.update_time," +
|
|
|
+ "record_data.exam_id exam_id," +
|
|
|
+ "record_data.exam_type exam_type," +
|
|
|
+ "record_data.exam_student_id exam_student_id," +
|
|
|
+ "record_data.student_id student_id," +
|
|
|
+ "record_data.student_code student_code," +
|
|
|
+ "record_data.student_name student_name," +
|
|
|
+ "record_data.identity_number identity_number," +
|
|
|
+ "record_data.course_id course_id," +
|
|
|
+ "record_data.course_level course_level," +
|
|
|
+ "record_data.root_org_id root_org_id," +
|
|
|
+ "record_data.org_id org_id," +
|
|
|
+ "record_data.base_paper_id base_paper_id," +
|
|
|
+ "record_data.paper_type paper_type," +
|
|
|
+ "record_data.paper_struct_id paper_struct_id," +
|
|
|
+ "record_data.info_collector info_collector" +
|
|
|
+ " from ec_oe_exam_record_data record_data " +
|
|
|
+ " where 1=1");
|
|
|
sqlBuilder.append(buildExamRecordCommonSelectCondition(query));
|
|
|
sqlBuilder.append(" and ((record_data.is_warn = 0) OR (record_data.is_warn = 1 and record_data.is_audit = 1))");
|
|
|
sqlBuilder.append(" order by record_data.id desc");
|
|
@@ -286,6 +325,15 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
sql.append(" and record_data.baidu_face_liveness_success_percent >=" + query.getLivenessSuccessPercentLower());
|
|
|
sql.append(" and record_data.baidu_face_liveness_success_percent <=" + query.getLivenessSuccessPercentUpper());
|
|
|
}
|
|
|
+
|
|
|
+ //是否有虚拟设备
|
|
|
+ if (query.getHasVirtual() != null) {
|
|
|
+ if (query.getHasVirtual()) {
|
|
|
+ sql.append(" and record_data.id in (select t1.id from ec_oe_exam_record_data t1 left join ec_oe_exam_capture t2 on t1.id=t2.exam_record_data_id where t1.exam_id = " + query.getExamId()+" and t2.has_virtual_camera=1 ");
|
|
|
+ } else {
|
|
|
+ sql.append(" and record_data.id in (select t1.id from ec_oe_exam_record_data t1 left join ec_oe_exam_capture t2 on t1.id=t2.exam_record_data_id where t1.exam_id = " + query.getExamId()+" and (t2.has_virtual_camera=0 oe t2.has_virtual_camera is null) ");
|
|
|
+ }
|
|
|
+ }
|
|
|
return sql;
|
|
|
}
|
|
|
|