|
@@ -32,10 +32,10 @@ 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.SaveExamStudentResp;
|
|
|
import cn.com.qmth.examcloud.exchange.base.enums.CourseLevel;
|
|
|
-import cn.com.qmth.examcloud.exchange.outer.api.controller.sydx.bean.ExamStudentImportRequest;
|
|
|
-import cn.com.qmth.examcloud.exchange.outer.api.controller.sydx.bean.FailureRecordDomain;
|
|
|
-import cn.com.qmth.examcloud.exchange.outer.api.controller.sydx.bean.OutletExam;
|
|
|
-import cn.com.qmth.examcloud.exchange.outer.api.controller.sydx.bean.OutletExamStudent;
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.controller.sydx.bean.SydxImportDomain;
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.controller.sydx.bean.SydxFailureRecordDomain;
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.controller.sydx.bean.SydxExam;
|
|
|
+import cn.com.qmth.examcloud.exchange.outer.api.controller.sydx.bean.SydxExamStudent;
|
|
|
import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
|
|
|
|
/**
|
|
@@ -48,7 +48,7 @@ import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/api/ecs_outlet/sydx/import_exam_student_info")
|
|
|
-public class StudentExamInfoController extends ControllerSupport {
|
|
|
+public class SydxStudentExamInfoController extends ControllerSupport {
|
|
|
|
|
|
@Autowired
|
|
|
StudentCloudService studentCloudService;
|
|
@@ -67,11 +67,11 @@ public class StudentExamInfoController extends ControllerSupport {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping
|
|
|
- public ResponseEntity<?> post(@RequestBody ExamStudentImportRequest outerReq) {
|
|
|
+ public ResponseEntity<?> post(@RequestBody SydxImportDomain outerReq) {
|
|
|
|
|
|
tranTimes(outerReq);
|
|
|
|
|
|
- OutletExam exam = outerReq.getExam();
|
|
|
+ SydxExam exam = outerReq.getExam();
|
|
|
|
|
|
User accessUser = getAccessUser();
|
|
|
Long rootOrgId = accessUser.getRootOrgId();
|
|
@@ -104,12 +104,12 @@ public class StudentExamInfoController extends ControllerSupport {
|
|
|
Long examId = resp.getId();
|
|
|
ExamBean examBean = resp.getExamBean();
|
|
|
String examName = examBean.getName();
|
|
|
- List<OutletExamStudent> examStudentList = outerReq.getExamStudentList();
|
|
|
+ List<SydxExamStudent> examStudentList = outerReq.getExamStudentList();
|
|
|
|
|
|
List<Long> examStudentIdList = Lists.newArrayList();
|
|
|
- List<FailureRecordDomain> failureRecordList = Lists.newArrayList();
|
|
|
+ List<SydxFailureRecordDomain> failureRecordList = Lists.newArrayList();
|
|
|
|
|
|
- for (OutletExamStudent cur : examStudentList) {
|
|
|
+ for (SydxExamStudent cur : examStudentList) {
|
|
|
|
|
|
SaveStudentReq saveStudentReq = new SaveStudentReq();
|
|
|
saveStudentReq.setIdentityNumber(cur.getIdentityNumber());
|
|
@@ -168,7 +168,7 @@ public class StudentExamInfoController extends ControllerSupport {
|
|
|
ExamStudentBean examStudentBean = savedExamStudent.getExamStudentBean();
|
|
|
examStudentIdList.add(examStudentBean.getId());
|
|
|
} catch (StatusException e) {
|
|
|
- FailureRecordDomain fr = new FailureRecordDomain();
|
|
|
+ SydxFailureRecordDomain fr = new SydxFailureRecordDomain();
|
|
|
fr.setCode(e.getCode());
|
|
|
fr.setDesc(e.getDesc());
|
|
|
fr.setCourseCode(cur.getCourseCode());
|
|
@@ -178,7 +178,7 @@ public class StudentExamInfoController extends ControllerSupport {
|
|
|
fr.setStudentCode(cur.getStudentCode());
|
|
|
failureRecordList.add(fr);
|
|
|
} catch (Exception e) {
|
|
|
- FailureRecordDomain fr = new FailureRecordDomain();
|
|
|
+ SydxFailureRecordDomain fr = new SydxFailureRecordDomain();
|
|
|
fr.setCode("EX-210001");
|
|
|
fr.setDesc(e.getMessage());
|
|
|
fr.setCourseCode(cur.getCourseCode());
|
|
@@ -203,8 +203,8 @@ public class StudentExamInfoController extends ControllerSupport {
|
|
|
* @author WANGWEI
|
|
|
* @param examStudentImportDTO
|
|
|
*/
|
|
|
- private void tranTimes(ExamStudentImportRequest examStudentImportDTO) {
|
|
|
- OutletExam exam = examStudentImportDTO.getExam();
|
|
|
+ private void tranTimes(SydxImportDomain examStudentImportDTO) {
|
|
|
+ SydxExam exam = examStudentImportDTO.getExam();
|
|
|
|
|
|
String beginTime = exam.getBeginTime();
|
|
|
if (StringUtils.isNotBlank(beginTime)) {
|
|
@@ -220,11 +220,11 @@ public class StudentExamInfoController extends ControllerSupport {
|
|
|
exam.setEndTime(endTime);
|
|
|
}
|
|
|
|
|
|
- List<OutletExamStudent> examStudentList = examStudentImportDTO.getExamStudentList();
|
|
|
+ List<SydxExamStudent> examStudentList = examStudentImportDTO.getExamStudentList();
|
|
|
if (CollectionUtils.isNotEmpty(examStudentList)) {
|
|
|
|
|
|
- for (OutletExamStudent cur : examStudentList) {
|
|
|
- OutletExam curExam = cur.getExam();
|
|
|
+ for (SydxExamStudent cur : examStudentList) {
|
|
|
+ SydxExam curExam = cur.getExam();
|
|
|
if (null == curExam) {
|
|
|
continue;
|
|
|
}
|