|
@@ -678,6 +678,22 @@ public class ExamController extends ControllerSupport {
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "查询考生考试机构配置", notes = "")
|
|
|
+ @PostMapping("studentExamOrg/{examId}")
|
|
|
+ public ExamOrgEntity getStudentExamOrg(@PathVariable Long examId) {
|
|
|
+ User accessUser = getAccessUser();
|
|
|
+ ExamEntity examEntity = examRepo.findOne(examId);
|
|
|
+ if (null == examEntity) {
|
|
|
+ throw new StatusException("E-001250", "examId is wrong");
|
|
|
+ }
|
|
|
+ validateRootOrgIsolation(examEntity.getRootOrgId());
|
|
|
+
|
|
|
+ ExamOrgEntity examOrgEntity = examOrgRepo.findByExamIdAndOrgId(examId,
|
|
|
+ accessUser.getOrgId());
|
|
|
+
|
|
|
+ return examOrgEntity;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 方法注释
|
|
|
*
|
|
@@ -758,6 +774,12 @@ public class ExamController extends ControllerSupport {
|
|
|
@ApiOperation(value = "删除考试相关的学习中心设置", notes = "")
|
|
|
@DeleteMapping("examOrg/{examId}/{orgId}")
|
|
|
public void deleteExamOrg(@PathVariable Long examId, @PathVariable Long orgId) {
|
|
|
+ ExamEntity examEntity = examRepo.findOne(examId);
|
|
|
+ if (null == examEntity) {
|
|
|
+ throw new StatusException("E-001250", "examId is wrong");
|
|
|
+ }
|
|
|
+ validateRootOrgIsolation(examEntity.getRootOrgId());
|
|
|
+
|
|
|
examOrgRepo.deleteByExamIdAndOrgId(examId, orgId);
|
|
|
}
|
|
|
|