|
@@ -31,7 +31,9 @@ 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.ExamStudent;
|
|
import cn.com.qmth.examcloud.core.examwork.service.impl.ExamStudentService;
|
|
import cn.com.qmth.examcloud.core.examwork.service.impl.ExamStudentService;
|
|
import cn.com.qmth.examcloud.examwork.api.ExamStudentCloudService;
|
|
import cn.com.qmth.examcloud.examwork.api.ExamStudentCloudService;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.bean.ExamStudentBean;
|
|
import cn.com.qmth.examcloud.examwork.api.request.SaveExamStudentReq;
|
|
import cn.com.qmth.examcloud.examwork.api.request.SaveExamStudentReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.SaveExamStudentResp;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -69,7 +71,7 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
|
|
@ApiOperation(value = "保存考生")
|
|
@ApiOperation(value = "保存考生")
|
|
@PostMapping("saveExamStudent")
|
|
@PostMapping("saveExamStudent")
|
|
@Override
|
|
@Override
|
|
- public void saveExamStudent(SaveExamStudentReq req) {
|
|
|
|
|
|
+ public SaveExamStudentResp saveExamStudent(SaveExamStudentReq req) {
|
|
|
|
|
|
Long rootOrgId = req.getRootOrgId();
|
|
Long rootOrgId = req.getRootOrgId();
|
|
GetOrgReq getOrgReq = new GetOrgReq();
|
|
GetOrgReq getOrgReq = new GetOrgReq();
|
|
@@ -144,10 +146,28 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
|
|
examStudent.setCourseName(courseName);
|
|
examStudent.setCourseName(courseName);
|
|
examStudent.setCourseLevel(courseBean.getLevel());
|
|
examStudent.setCourseLevel(courseBean.getLevel());
|
|
examStudent.setExam(exam);
|
|
examStudent.setExam(exam);
|
|
|
|
+ examStudent.setIdentityNumber(studentInfo.getIdentityNumber());
|
|
|
|
+ examStudent.setStudentCode(studentInfo.getStudentCode());
|
|
examStudent.setPaperType(req.getPaperType());
|
|
examStudent.setPaperType(req.getPaperType());
|
|
|
|
+ ExamStudent saved = examStudentRepo.save(examStudent);
|
|
|
|
|
|
- examStudentRepo.save(examStudent);
|
|
|
|
|
|
+ SaveExamStudentResp resp = new SaveExamStudentResp();
|
|
|
|
|
|
|
|
+ ExamStudentBean examStudentBean = new ExamStudentBean();
|
|
|
|
+ examStudentBean.setCourseCode(saved.getCourseCode());
|
|
|
|
+ examStudentBean.setCourseLevel(saved.getCourseLevel());
|
|
|
|
+ examStudentBean.setCourseName(saved.getCourseName());
|
|
|
|
+ examStudentBean.setExamId(saved.getExam().getId());
|
|
|
|
+ examStudentBean.setExamName(saved.getExam().getName());
|
|
|
|
+ examStudentBean.setIdentityNumber(saved.getIdentityNumber());
|
|
|
|
+ examStudentBean.setStudentCode(saved.getStudentCode());
|
|
|
|
+ examStudentBean.setPaperType(saved.getPaperType());
|
|
|
|
+ examStudentBean.setRootOrgId(saved.getRootOrgId());
|
|
|
|
+ examStudentBean.setStudentName(studentInfo.getName());
|
|
|
|
+
|
|
|
|
+ resp.setExamStudentBean(examStudentBean);
|
|
|
|
+
|
|
|
|
+ return resp;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|