|
@@ -259,11 +259,7 @@ public class ExamStudentServiceImpl extends BaseQueryService<ExamStudent> implem
|
|
|
|
|
|
public ExamStudentSearchQuery findByQuery(final ExamStudentSearchQuery query) {
|
|
|
checkQuery(query);
|
|
|
- if (query.getSort() == null) {
|
|
|
- query.orderById();
|
|
|
- } else {
|
|
|
- query.setSort(query.getSort().and(new Sort("id")));
|
|
|
- }
|
|
|
+ query.addSort("id", Direction.ASC);
|
|
|
if (query.getSheetCount() != null) {
|
|
|
query.setSheetCount(query.getSheetCount() * 2);
|
|
|
}
|
|
@@ -289,7 +285,7 @@ public class ExamStudentServiceImpl extends BaseQueryService<ExamStudent> implem
|
|
|
ExamStudentSearchQuery query = new ExamStudentSearchQuery();
|
|
|
query.setPageNumber(pageNumber);
|
|
|
query.setPageSize(pageSize);
|
|
|
- query.setSort(new Sort(Direction.ASC, "id"));
|
|
|
+ query.addSort("id", Direction.ASC);
|
|
|
return studentDao.findByExamId(examId, query);
|
|
|
}
|
|
|
|
|
@@ -298,7 +294,7 @@ public class ExamStudentServiceImpl extends BaseQueryService<ExamStudent> implem
|
|
|
ExamStudentSearchQuery query = new ExamStudentSearchQuery();
|
|
|
query.setPageNumber(pageNumber);
|
|
|
query.setPageSize(pageSize);
|
|
|
- query.setSort(new Sort(Direction.ASC, "id"));
|
|
|
+ query.addSort("id", Direction.ASC);
|
|
|
return studentDao.findByExamIdAndSubjectCode(examId, subjectCode, query);
|
|
|
}
|
|
|
|
|
@@ -308,7 +304,7 @@ public class ExamStudentServiceImpl extends BaseQueryService<ExamStudent> implem
|
|
|
ExamStudentSearchQuery query = new ExamStudentSearchQuery();
|
|
|
query.setPageNumber(pageNumber);
|
|
|
query.setPageSize(pageSize);
|
|
|
- query.setSort(new Sort(Direction.ASC, "id"));
|
|
|
+ query.addSort("id", Direction.ASC);
|
|
|
return studentDao.findByExamIdAndUploadAndAbsent(examId, upload, absent, query);
|
|
|
}
|
|
|
|
|
@@ -317,7 +313,7 @@ public class ExamStudentServiceImpl extends BaseQueryService<ExamStudent> implem
|
|
|
ExamStudentSearchQuery query = new ExamStudentSearchQuery();
|
|
|
query.setPageNumber(pageNumber);
|
|
|
query.setPageSize(pageSize);
|
|
|
- query.setSort(new Sort(Direction.ASC, "id"));
|
|
|
+ query.addSort("id", Direction.ASC);
|
|
|
return studentDao.findByExamIdAndCampusName(examId, campusName, query);
|
|
|
}
|
|
|
|
|
@@ -790,7 +786,7 @@ public class ExamStudentServiceImpl extends BaseQueryService<ExamStudent> implem
|
|
|
ExamStudentSearchQuery query = new ExamStudentSearchQuery();
|
|
|
query.setPageNumber(1);
|
|
|
query.setPageSize(count);
|
|
|
- query.setSort(new Sort(Direction.ASC, "id"));
|
|
|
+ query.addSort("id", Direction.ASC);
|
|
|
return studentDao.findUnLibraryStudent(examId, subjectCode, groupNumber, query);
|
|
|
}
|
|
|
|
|
@@ -1193,7 +1189,7 @@ public class ExamStudentServiceImpl extends BaseQueryService<ExamStudent> implem
|
|
|
query.addStatus(SubjectiveStatus.UNMARK);
|
|
|
query.setPageNumber(1);
|
|
|
query.setPageSize(200);
|
|
|
- query.setSort(new Sort(Direction.ASC, "uploadTime", "id"));
|
|
|
+ query.setSort(new Sort(Direction.ASC, "uploadTime"));
|
|
|
List<ExamStudent> list = findByQuery(query).getResult();
|
|
|
if (list.isEmpty()) {
|
|
|
return null;
|