|
@@ -363,7 +363,8 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
|
|
|
private long countExamRecordDetailListForPage(ExamRecordQuery query) {
|
|
|
StringBuilder sqlBuilder = new StringBuilder();
|
|
|
- sqlBuilder.append("select count(record_data.id) from ec_oe_exam_record_data record_data where 1=1");
|
|
|
+ sqlBuilder.append("select count(record_data.id) from ec_oe_exam_record_data record_data " +
|
|
|
+ "LEFT JOIN ec_oe_exam_audit AS audit ON record_data.id = audit.exam_record_data_id 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))");
|
|
|
return jdbcTemplate.queryForObject(sqlBuilder.toString(), Long.class);
|