|
@@ -190,6 +190,8 @@ public class ExamStudentServiceImpl implements ExamStudentService {
|
|
|
@Override
|
|
|
public ExamStudentInfo saveExamStudent(ExamStudentInfo examStudentInfo) {
|
|
|
String paperType = examStudentInfo.getPaperType();
|
|
|
+ String studentCode = examStudentInfo.getStudentCode();
|
|
|
+
|
|
|
if (StringUtils.isBlank(paperType)) {
|
|
|
paperType = "X";
|
|
|
} else if (!paperType.matches("[A-Z]")) {
|
|
@@ -235,6 +237,15 @@ public class ExamStudentServiceImpl implements ExamStudentService {
|
|
|
|
|
|
StudentBean studentInfo = getStudentResp.getStudentInfo();
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(studentCode)) {
|
|
|
+ List<String> studentCodeList = studentInfo.getStudentCodeList();
|
|
|
+ if (!studentCodeList.contains(studentCode)) {
|
|
|
+ throw new StatusException("100063", "学号未绑定到身份证");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ studentCode = null;
|
|
|
+ }
|
|
|
+
|
|
|
String courseCode = examStudentInfo.getCourseCode();
|
|
|
String courseName = examStudentInfo.getCourseName();
|
|
|
String courseLevel = examStudentInfo.getCourseLevel();
|
|
@@ -279,7 +290,7 @@ public class ExamStudentServiceImpl implements ExamStudentService {
|
|
|
|
|
|
examStudent.setExamId(exam.getId());
|
|
|
examStudent.setIdentityNumber(studentInfo.getIdentityNumber());
|
|
|
- examStudent.setStudentCode(studentInfo.getStudentCode());
|
|
|
+ examStudent.setStudentCode(studentCode);
|
|
|
examStudent.setPaperType(paperType);
|
|
|
examStudent.setStudentId(studentInfo.getId());
|
|
|
examStudent.setOrgId(studentInfo.getOrgId());
|