|
@@ -422,6 +422,7 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
|
|
|
Long rootOrgId = req.getRootOrgId();
|
|
|
Long examId = req.getExamId();
|
|
|
String examCode = req.getExamCode();
|
|
|
+ String examName = req.getExamName();
|
|
|
Long studentId = req.getStudentId();
|
|
|
String identityNumber = req.getIdentityNumber();
|
|
|
Long courseId = req.getCourseId();
|
|
@@ -441,6 +442,11 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
|
|
|
if (null == examEntity) {
|
|
|
throw new StatusException("088002", "exam is not present");
|
|
|
}
|
|
|
+ } else if (StringUtils.isNotBlank(examName)) {
|
|
|
+ examEntity = examRepo.findByNameAndRootOrgId(examName, rootOrgId);
|
|
|
+ if (null == examEntity) {
|
|
|
+ throw new StatusException("088003", "exam is not present");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (null == courseId && StringUtils.isBlank(courseCode)) {
|
|
@@ -461,8 +467,8 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
|
|
|
GetStudentResp gsResp = studentCloudService.getStudent(gsReq);
|
|
|
StudentBean studentBean = gsResp.getStudentInfo();
|
|
|
|
|
|
- ExamStudentEntity es = examStudentRepo.findByExamIdAndStudentIdAndCourseId(examId,
|
|
|
- studentBean.getId(), courseBean.getId());
|
|
|
+ ExamStudentEntity es = examStudentRepo.findByExamIdAndStudentIdAndCourseId(
|
|
|
+ examEntity.getId(), studentBean.getId(), courseBean.getId());
|
|
|
|
|
|
es.setEnable(enable);
|
|
|
|