|
@@ -51,7 +51,7 @@ import cn.com.qmth.examcloud.core.examwork.api.controller.bean.ExamStudentDomain
|
|
|
import cn.com.qmth.examcloud.core.examwork.dao.ExamRepo;
|
|
|
import cn.com.qmth.examcloud.core.examwork.dao.ExamStudentRepo;
|
|
|
import cn.com.qmth.examcloud.core.examwork.dao.entity.Exam;
|
|
|
-import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamStudent;
|
|
|
+import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamStudentEntity;
|
|
|
import cn.com.qmth.examcloud.core.examwork.service.ExamStudentService;
|
|
|
import cn.com.qmth.examcloud.core.examwork.service.bean.ExamStudentInfo;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -91,7 +91,7 @@ public class ExamStudentController extends ControllerSupport {
|
|
|
*/
|
|
|
@ApiOperation(value = "查询学生的所有考试")
|
|
|
@GetMapping("/byStudentId/{studentId}")
|
|
|
- public List<ExamStudent> getExamStudentListByStudentId(@PathVariable Long studentId) {
|
|
|
+ public List<ExamStudentEntity> getExamStudentListByStudentId(@PathVariable Long studentId) {
|
|
|
|
|
|
return examStudentRepo.findByStudentId(studentId);
|
|
|
}
|
|
@@ -110,7 +110,7 @@ public class ExamStudentController extends ControllerSupport {
|
|
|
public PageInfo<ExamStudentDomain> getExamStudentList(
|
|
|
@ModelAttribute ExamStudentDomain examCriteria, @PathVariable Integer curPage,
|
|
|
@PathVariable Integer pageSize) {
|
|
|
- Specification<ExamStudent> specification = (root, query, cb) -> {
|
|
|
+ Specification<ExamStudentEntity> specification = (root, query, cb) -> {
|
|
|
List<Predicate> predicates = new ArrayList<>();
|
|
|
predicates.add(cb.equal(root.get("rootOrgId"), getRootOrgId()));
|
|
|
|
|
@@ -162,11 +162,11 @@ public class ExamStudentController extends ControllerSupport {
|
|
|
PageRequest pageRequest = new PageRequest(curPage, pageSize,
|
|
|
new Sort(Direction.DESC, "updateTime"));
|
|
|
|
|
|
- Page<ExamStudent> examStudents = examStudentRepo.findAll(specification, pageRequest);
|
|
|
+ Page<ExamStudentEntity> examStudents = examStudentRepo.findAll(specification, pageRequest);
|
|
|
|
|
|
List<ExamStudentDomain> ret = Lists.newArrayList();
|
|
|
|
|
|
- for (ExamStudent cur : examStudents) {
|
|
|
+ for (ExamStudentEntity cur : examStudents) {
|
|
|
Exam exam = examRepo.findOne(cur.getExamId());
|
|
|
GetCourseReq req = new GetCourseReq();
|
|
|
req.setId(cur.getCourseId());
|
|
@@ -216,8 +216,8 @@ public class ExamStudentController extends ControllerSupport {
|
|
|
*/
|
|
|
@ApiOperation(value = "按ID查询考试学生", notes = "ID查询")
|
|
|
@GetMapping("{id}")
|
|
|
- public ExamStudent getExamStudentById(@PathVariable Long id) {
|
|
|
- ExamStudent es = examStudentRepo.findOne(id);
|
|
|
+ public ExamStudentEntity getExamStudentById(@PathVariable Long id) {
|
|
|
+ ExamStudentEntity es = examStudentRepo.findOne(id);
|
|
|
if (null == es) {
|
|
|
throw new StatusException("E-520001", "考生不存在");
|
|
|
}
|