|
@@ -130,15 +130,17 @@ public class ExamRecordWaitingAuditServiceImpl implements ExamRecordWaitingAudit
|
|
|
|
|
|
sql.append(" where rd.exam_id = ").append(query.getExamId());
|
|
|
sql.append(" and rd.exam_record_status in ('EXAM_END','EXAM_OVERDUE')");
|
|
|
- sql.append(" and rd.is_audit = 0");
|
|
|
- sql.append(" and rd.is_illegality = 0");
|
|
|
- if (query.getIsWarn() != null) {
|
|
|
- sql.append(" and rd.is_warn = ").append(query.getIsWarn() ? "1" : "0");
|
|
|
- }
|
|
|
+
|
|
|
if (query.getExamRecordId() != null) {
|
|
|
sql.append(" and rd.id = ").append(query.getExamRecordId());
|
|
|
}
|
|
|
|
|
|
+ if (query.getIsWarn() != null) {
|
|
|
+ sql.append(" and rd.is_warn = ").append(query.getIsWarn() ? "1" : "0");
|
|
|
+ }
|
|
|
+ sql.append(" and rd.is_audit = 0");
|
|
|
+ sql.append(" and rd.is_illegality = 0");
|
|
|
+
|
|
|
if (courseRule.assertNeedQueryRefIds()) {
|
|
|
// 限定课程数据权限范围
|
|
|
if (query.getCourseId() != null) {
|
|
@@ -222,15 +224,11 @@ public class ExamRecordWaitingAuditServiceImpl implements ExamRecordWaitingAudit
|
|
|
}
|
|
|
|
|
|
if (query.getHasVirtual() != null) {
|
|
|
- if (query.getHasVirtual()) {
|
|
|
- sql.append(" and exists(");
|
|
|
- sql.append(" select 1 from ec_oe_exam_capture_camera_info v where v.exam_record_data_id = rd.id and v.virtual_camera = 1");
|
|
|
- sql.append(" )");
|
|
|
- } else {
|
|
|
- sql.append(" and not exists(");
|
|
|
- sql.append(" select 1 from ec_oe_exam_capture_camera_info v where v.exam_record_data_id = rd.id and v.virtual_camera = 1");
|
|
|
- sql.append(" )");
|
|
|
- }
|
|
|
+ sql.append(" and").append(query.getHasVirtual() ? " exists" : " not exists");
|
|
|
+ sql.append(" (");
|
|
|
+ sql.append(" select 1 from ec_oe_exam_capture_camera_info v where v.exam_record_data_id = rd.id");
|
|
|
+ sql.append(" and v.virtual_camera = 1");
|
|
|
+ sql.append(" )");
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(query.getWarnType())) {
|