|
@@ -32,6 +32,7 @@ import com.google.common.collect.Lists;
|
|
|
import cn.com.qmth.examcloud.commons.base.exception.StatusException;
|
|
|
import cn.com.qmth.examcloud.commons.base.util.PathUtil;
|
|
|
import cn.com.qmth.examcloud.commons.web.helpers.page.PageInfo;
|
|
|
+import cn.com.qmth.examcloud.commons.web.security.bean.User;
|
|
|
import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.CourseCloudService;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.OrgCloudService;
|
|
@@ -110,9 +111,10 @@ public class ExamStudentController extends ControllerSupport {
|
|
|
public PageInfo<ExamStudentDomain> getExamStudentList(
|
|
|
@ModelAttribute ExamStudentDomain examCriteria, @PathVariable Integer curPage,
|
|
|
@PathVariable Integer pageSize) {
|
|
|
+ User accessUser = getAccessUser();
|
|
|
Specification<ExamStudentEntity> specification = (root, query, cb) -> {
|
|
|
List<Predicate> predicates = new ArrayList<>();
|
|
|
- predicates.add(cb.equal(root.get("rootOrgId"), getRootOrgId()));
|
|
|
+ predicates.add(cb.equal(root.get("rootOrgId"), accessUser.getRootOrgId()));
|
|
|
|
|
|
if (null != examCriteria.getOrgId()) {
|
|
|
predicates.add(cb.equal(root.get("orgId"), examCriteria.getOrgId()));
|
|
@@ -170,6 +172,7 @@ public class ExamStudentController extends ControllerSupport {
|
|
|
ExamEntity exam = examRepo.findOne(cur.getExamId());
|
|
|
GetCourseReq req = new GetCourseReq();
|
|
|
req.setId(cur.getCourseId());
|
|
|
+ req.setRootOrgId(accessUser.getRootOrgId());
|
|
|
GetCourseResp getCourseResp = courseCloudService.getCourse(req);
|
|
|
CourseBean courseBean = getCourseResp.getCourseBean();
|
|
|
GetOrgReq getOrgReq = new GetOrgReq();
|
|
@@ -178,6 +181,8 @@ public class ExamStudentController extends ControllerSupport {
|
|
|
OrgBean org = getOrgResp.getOrg();
|
|
|
|
|
|
GetStudentReq getStudentReq = new GetStudentReq();
|
|
|
+ getStudentReq.setRootOrgId(accessUser.getRootOrgId());
|
|
|
+ getStudentReq.setIdentityNumber(cur.getIdentityNumber());
|
|
|
GetStudentResp getStudentResp = studentCloudService.getStudent(getStudentReq);
|
|
|
StudentBean studentBean = getStudentResp.getStudentInfo();
|
|
|
|