|
@@ -65,8 +65,10 @@ public class InspectedServiceImpl extends BaseQueryService<ExamStudent> implemen
|
|
|
sql.append(" s.subject_level subjectLevel,s.subject_category subjectCategory,s.college,s.class_name className,s.teacher,");
|
|
|
sql.append(" s.card_number cardNumber,s.inspect_count inspectCount,s.score_verify_user scoreVerifyUser,");
|
|
|
sql.append(" s.score_verify_time scoreVerifyTime,s.score_verify_flagged scoreVerifyFlagged,s.inspect_time inspectTime,");
|
|
|
- sql.append(" s.inspector_id inspectorId,s.inspected ");
|
|
|
+ sql.append(" s.inspector_id inspectorId,s.inspected, ");
|
|
|
+ sql.append(" (case when ss.not_selective=1 or ss.less_selective=1 then '是' else '否' end) selectiveErr ");
|
|
|
sql.append(" from eb_exam_student s left join eb_exam_subject es on s.exam_id=es.exam_id and s.subject_code=es.code ");
|
|
|
+ sql.append(" left join eb_selective_student ss on ss.student_id = s.id ");
|
|
|
String whereSql = getWhereSql(query, status, mainNumber, mainStartScore, mainEndScore, selectiveStatus);
|
|
|
sql.append(whereSql).append(" order by s.inspect_time desc,s.id asc");
|
|
|
if (!query.isExport()) {
|
|
@@ -184,7 +186,7 @@ public class InspectedServiceImpl extends BaseQueryService<ExamStudent> implemen
|
|
|
// + " on e.exam_id=mg.exam_id and e.subject_code=mg.subject_code and e.group_number=mg.number"
|
|
|
// + " where e.student_id = s.id and e.group_score != -1 and mg.is_selective=1)"
|
|
|
// + " and es.selective=1");
|
|
|
- whereSql.append(" and exists (select ss.student_id from eb_selective_student ss where ss.student_id = s.id and ss.not_selective=1)");
|
|
|
+ whereSql.append(" and ss.not_selective=1 ");
|
|
|
}
|
|
|
// 选做题多选做
|
|
|
// if (selectiveStatus != null &&
|
|
@@ -192,7 +194,7 @@ public class InspectedServiceImpl extends BaseQueryService<ExamStudent> implemen
|
|
|
// !groups.isEmpty()
|
|
|
// && !selectiveGroups.isEmpty()) {
|
|
|
if (SelectiveStatus.MUTI_SELECTIVE.equals(selectiveStatus)) {
|
|
|
- whereSql.append(" and exists (select ss.student_id from eb_selective_student ss where ss.student_id = s.id and ss.muti_selective=1)");
|
|
|
+ whereSql.append(" and ss.muti_selective=1 ");
|
|
|
}
|
|
|
// 选做题少选做
|
|
|
// if (selectiveStatus != null &&
|
|
@@ -200,7 +202,7 @@ public class InspectedServiceImpl extends BaseQueryService<ExamStudent> implemen
|
|
|
// !groups.isEmpty()
|
|
|
// && !selectiveGroups.isEmpty()) {
|
|
|
if (SelectiveStatus.LESS_SELECTIVE.equals(selectiveStatus)) {
|
|
|
- whereSql.append(" and exists (select ss.student_id from eb_selective_student ss where ss.student_id = s.id and ss.less_selective=1) ");
|
|
|
+ whereSql.append(" and ss.less_selective=1 ");
|
|
|
}
|
|
|
return whereSql.toString();
|
|
|
}
|
|
@@ -210,6 +212,7 @@ public class InspectedServiceImpl extends BaseQueryService<ExamStudent> implemen
|
|
|
Double mainEndScore, SelectiveStatus selectiveStatus) {
|
|
|
StringBuilder countSql = new StringBuilder("select count(s.id) from eb_exam_student s "
|
|
|
+ " left join eb_exam_subject es on s.exam_id=es.exam_id and s.subject_code=es.code ");
|
|
|
+ countSql.append(" left join eb_selective_student ss on ss.student_id = s.id ");
|
|
|
String whereSql = getWhereSql(query, status, mainNumber, mainStartScore, mainEndScore, selectiveStatus);
|
|
|
countSql.append(whereSql);
|
|
|
Query countQuery = entityManager.createNativeQuery(countSql.toString());
|
|
@@ -225,6 +228,7 @@ public class InspectedServiceImpl extends BaseQueryService<ExamStudent> implemen
|
|
|
query.setInspected(false);
|
|
|
StringBuilder countSql = new StringBuilder("select count(s.id) from eb_exam_student s "
|
|
|
+ " left join eb_exam_subject es on s.exam_id=es.exam_id and s.subject_code=es.code ");
|
|
|
+ countSql.append(" left join eb_selective_student ss on ss.student_id = s.id ");
|
|
|
String whereSql = getWhereSql(query, SubjectiveStatus.MARKED, mainNumber, mainStartScore, mainEndScore,
|
|
|
selectiveStatus);
|
|
|
countSql.append(whereSql);
|