|
@@ -10,16 +10,17 @@ import java.util.List;
|
|
|
import javax.persistence.criteria.Predicate;
|
|
|
|
|
|
import cn.com.qmth.examcloud.common.util.BeanCopierUtil;
|
|
|
-
|
|
|
import cn.com.qmth.examcloud.common.util.DateFormat;
|
|
|
import cn.com.qmth.examcloud.service.examwork.dao.ExamOrgTimeRepo;
|
|
|
import cn.com.qmth.examcloud.service.examwork.entity.ExamOrgTime;
|
|
|
import cn.com.qmth.examcloud.service.examwork.enums.ExamType;
|
|
|
+
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.PageImpl;
|
|
|
+import org.springframework.data.domain.PageRequest;
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.data.domain.Sort;
|
|
|
import org.springframework.data.domain.Sort.Direction;
|
|
@@ -27,6 +28,7 @@ import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.jdbc.core.RowMapper;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.MultiValueMap;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
@@ -794,4 +796,18 @@ public class ExamStudentService {
|
|
|
examStudentRepo.save(examStudent);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 按照数量限制查询考生
|
|
|
+ * @param examId 考试ID
|
|
|
+ * @param startLimit 数量开始限制
|
|
|
+ * @param endLimit 数量结束限制
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public List<ExamStudent> getExamStudentByLimit(Long examId, Integer startLimit,Integer endLimit) {
|
|
|
+ if(examId==null||startLimit==null||endLimit==null||startLimit>endLimit){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return examStudentRepo.findByLimit(examId, startLimit-1,(endLimit-startLimit+1));
|
|
|
+ }
|
|
|
}
|