|
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
+import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
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;
|
|
@@ -20,9 +21,11 @@ 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.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.bean.ExamStudentBean;
|
|
import cn.com.qmth.examcloud.examwork.api.request.GetExamReq;
|
|
import cn.com.qmth.examcloud.examwork.api.request.GetExamReq;
|
|
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.GetExamResp;
|
|
import cn.com.qmth.examcloud.examwork.api.response.GetExamResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.SaveExamStudentResp;
|
|
import cn.com.qmth.examcloud.exchange.dao.bean.ExamStudentImportDTO;
|
|
import cn.com.qmth.examcloud.exchange.dao.bean.ExamStudentImportDTO;
|
|
import cn.com.qmth.examcloud.exchange.dao.bean.OutletExam;
|
|
import cn.com.qmth.examcloud.exchange.dao.bean.OutletExam;
|
|
import cn.com.qmth.examcloud.exchange.dao.bean.OutletExamStudent;
|
|
import cn.com.qmth.examcloud.exchange.dao.bean.OutletExamStudent;
|
|
@@ -67,6 +70,8 @@ public class StudentExamInfoController extends ControllerSupport {
|
|
Long examId = resp.getId();
|
|
Long examId = resp.getId();
|
|
String examName = resp.getName();
|
|
String examName = resp.getName();
|
|
List<OutletExamStudent> examStudentList = examStudentImportDTO.getExamStudentList();
|
|
List<OutletExamStudent> examStudentList = examStudentImportDTO.getExamStudentList();
|
|
|
|
+
|
|
|
|
+ List<Long> examStudentIdList = Lists.newArrayList();
|
|
for (OutletExamStudent cur : examStudentList) {
|
|
for (OutletExamStudent cur : examStudentList) {
|
|
|
|
|
|
InsertOrUpdateStudentReq saveStudentReq = new InsertOrUpdateStudentReq();
|
|
InsertOrUpdateStudentReq saveStudentReq = new InsertOrUpdateStudentReq();
|
|
@@ -96,13 +101,15 @@ public class StudentExamInfoController extends ControllerSupport {
|
|
sReq.setRootOrgId(rootOrgId);
|
|
sReq.setRootOrgId(rootOrgId);
|
|
sReq.setStudentCode(cur.getStudentCode());
|
|
sReq.setStudentCode(cur.getStudentCode());
|
|
sReq.setStudentName(cur.getName());
|
|
sReq.setStudentName(cur.getName());
|
|
- examStudentCloudService.saveExamStudent(sReq);
|
|
|
|
-
|
|
|
|
|
|
+ SaveExamStudentResp savedExamStudent = examStudentCloudService.saveExamStudent(sReq);
|
|
|
|
+ ExamStudentBean examStudentBean = savedExamStudent.getExamStudentBean();
|
|
|
|
+ examStudentIdList.add(examStudentBean.getId());
|
|
}
|
|
}
|
|
|
|
|
|
Map<String, Object> map = Maps.newHashMap();
|
|
Map<String, Object> map = Maps.newHashMap();
|
|
map.put("success", true);
|
|
map.put("success", true);
|
|
- return null;
|
|
|
|
|
|
+ map.put("examStudentIdList", examStudentIdList);
|
|
|
|
+ return map;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|