|
@@ -286,17 +286,15 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
sqlBuilder.append("select min(record_data.id) id from ec_oe_exam_record_data record_data where 1 = 1 ");
|
|
|
}
|
|
|
sqlBuilder.append(buildExamRecordCommonSelectCondition(uds, query));
|
|
|
+
|
|
|
if (query.getIsWarn() != null) {
|
|
|
- //只查有异常未审核
|
|
|
- if (query.getIsWarn()) {
|
|
|
- sqlBuilder.append(" and record_data.is_warn = 1 and record_data.is_audit = 0 ");
|
|
|
- } else {
|
|
|
- sqlBuilder.append(" and record_data.is_warn = 0 ");
|
|
|
- }
|
|
|
- } else {
|
|
|
- sqlBuilder.append(" and ((record_data.is_warn = 0) OR (record_data.is_warn = 1 and record_data.is_audit = 0))");
|
|
|
+ sqlBuilder.append(" and record_data.is_warn = ").append(query.getIsWarn() ? "1" : "0");
|
|
|
}
|
|
|
+
|
|
|
+ sqlBuilder.append(" and record_data.is_audit = 0");
|
|
|
+
|
|
|
sqlBuilder.append(" and record_data.is_illegality = 0");
|
|
|
+
|
|
|
if ("1".equals(next)) {//下一条
|
|
|
sqlBuilder.append(" and record_data.id < ");
|
|
|
sqlBuilder.append(examRecordDataId);
|
|
@@ -553,7 +551,7 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
//待审核(按原先的sql,多了一个ip字段)
|
|
|
sqlBuilder.append(EXAM_RECORD_FROM_SQL);
|
|
|
sqlBuilder.append(buildExamRecordCommonSelectCondition(uds, query));
|
|
|
- if (query.getIsWarn() != null) {
|
|
|
+ /*if (query.getIsWarn() != null) {
|
|
|
//只查有异常未审核
|
|
|
if (query.getIsWarn()) {
|
|
|
sqlBuilder.append(" and record_data.is_warn = 1 and record_data.is_audit = 0 ");
|
|
@@ -562,8 +560,15 @@ public class ExamRecordServiceImpl implements ExamRecordService {
|
|
|
}
|
|
|
} else {
|
|
|
sqlBuilder.append(" and ((record_data.is_warn = 0) OR (record_data.is_warn = 1 and record_data.is_audit = 0))");
|
|
|
+ }*/
|
|
|
+ if (query.getIsWarn() != null) {
|
|
|
+ sqlBuilder.append(" and record_data.is_warn = ").append(query.getIsWarn() ? "1" : "0");
|
|
|
}
|
|
|
+
|
|
|
+ sqlBuilder.append(" and record_data.is_audit = 0");
|
|
|
+
|
|
|
sqlBuilder.append(" and record_data.is_illegality = 0");
|
|
|
+
|
|
|
//查询分页记录
|
|
|
sqlBuilder.append(" group by record_data.id ");
|
|
|
// sqlBuilder.append(" order by record_data.id desc");
|