|
@@ -15,6 +15,9 @@ import com.google.common.collect.Maps;
|
|
|
|
|
|
import cn.com.qmth.examcloud.commons.web.security.bean.User;
|
|
import cn.com.qmth.examcloud.commons.web.security.bean.User;
|
|
import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
|
|
import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
|
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.StudentCloudService;
|
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.request.InsertOrUpdateStudentReq;
|
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.response.InsertOrUpdateStudentResp;
|
|
import cn.com.qmth.examcloud.examwork.api.ExamCloudService;
|
|
import cn.com.qmth.examcloud.examwork.api.ExamCloudService;
|
|
import cn.com.qmth.examcloud.examwork.api.ExamStudentCloudService;
|
|
import cn.com.qmth.examcloud.examwork.api.ExamStudentCloudService;
|
|
import cn.com.qmth.examcloud.examwork.api.request.GetExamReq;
|
|
import cn.com.qmth.examcloud.examwork.api.request.GetExamReq;
|
|
@@ -37,6 +40,9 @@ import io.swagger.annotations.ApiOperation;
|
|
@RequestMapping("${$rmp.cloud.exchange.outer}/sydx/import_exam_student_info")
|
|
@RequestMapping("${$rmp.cloud.exchange.outer}/sydx/import_exam_student_info")
|
|
public class StudentExamInfoController extends ControllerSupport {
|
|
public class StudentExamInfoController extends ControllerSupport {
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ StudentCloudService studentCloudService;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
ExamCloudService examCloudService;
|
|
ExamCloudService examCloudService;
|
|
|
|
|
|
@@ -62,11 +68,28 @@ public class StudentExamInfoController extends ControllerSupport {
|
|
String examName = resp.getName();
|
|
String examName = resp.getName();
|
|
List<OutletExamStudent> examStudentList = examStudentImportDTO.getExamStudentList();
|
|
List<OutletExamStudent> examStudentList = examStudentImportDTO.getExamStudentList();
|
|
for (OutletExamStudent cur : examStudentList) {
|
|
for (OutletExamStudent cur : examStudentList) {
|
|
|
|
+
|
|
|
|
+ InsertOrUpdateStudentReq saveStudentReq = new InsertOrUpdateStudentReq();
|
|
|
|
+ saveStudentReq.setIdentityNumber(cur.getIdentityNumber());
|
|
|
|
+ saveStudentReq.setName(cur.getName());
|
|
|
|
+ saveStudentReq.setPhoneNumber(cur.getPhone());
|
|
|
|
+ saveStudentReq.setOrgCode(cur.getOrgCode());
|
|
|
|
+ saveStudentReq.setOrgId(cur.getOrgId());
|
|
|
|
+ saveStudentReq.setOrgName(cur.getOrgName());
|
|
|
|
+ saveStudentReq.setRootOrgId(rootOrgId);
|
|
|
|
+ saveStudentReq.setStudentCode(cur.getStudentCode());
|
|
|
|
+
|
|
|
|
+ InsertOrUpdateStudentResp insertOrUpdateStudentResp = studentCloudService
|
|
|
|
+ .insertOrUpdateStudent(saveStudentReq);
|
|
|
|
+
|
|
|
|
+ Long studentId = insertOrUpdateStudentResp.getStudentId();
|
|
|
|
+
|
|
SaveExamStudentReq sReq = new SaveExamStudentReq();
|
|
SaveExamStudentReq sReq = new SaveExamStudentReq();
|
|
sReq.setCourseCode(cur.getCourseCode());
|
|
sReq.setCourseCode(cur.getCourseCode());
|
|
sReq.setCourseLevel(cur.getCourseLevel());
|
|
sReq.setCourseLevel(cur.getCourseLevel());
|
|
sReq.setCourseName(cur.getCourseName());
|
|
sReq.setCourseName(cur.getCourseName());
|
|
sReq.setExamId(examId);
|
|
sReq.setExamId(examId);
|
|
|
|
+ sReq.setStudentId(studentId);
|
|
sReq.setExamName(examName);
|
|
sReq.setExamName(examName);
|
|
sReq.setIdentityNumber(cur.getIdentityNumber());
|
|
sReq.setIdentityNumber(cur.getIdentityNumber());
|
|
sReq.setPaperType(cur.getPaperType());
|
|
sReq.setPaperType(cur.getPaperType());
|