wangwei 7 năm trước cách đây
mục cha
commit
641bba098e

+ 103 - 101
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/provider/ExamStudentCloudServiceProvider.java

@@ -1,101 +1,103 @@
-package cn.com.qmth.examcloud.core.examwork.api.provider;
-
-import javax.transaction.Transactional;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
-import cn.com.qmth.examcloud.core.basic.api.CourseCloudService;
-import cn.com.qmth.examcloud.core.basic.api.OrgCloudService;
-import cn.com.qmth.examcloud.core.basic.api.StudentCloudService;
-import cn.com.qmth.examcloud.core.examwork.dao.ExamRepo;
-import cn.com.qmth.examcloud.core.examwork.dao.ExamStudentRepo;
-import cn.com.qmth.examcloud.core.examwork.service.bean.ExamStudentInfo;
-import cn.com.qmth.examcloud.core.examwork.service.impl.ExamStudentServiceImpl;
-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.response.SaveExamStudentResp;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * 类注释
- *
- * @author WANGWEI
- * @date 2018年7月18日
- * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
- */
-@Transactional
-@RestController
-@RequestMapping("${$rmp.cloud.examwork}" + "examStudent")
-public class ExamStudentCloudServiceProvider extends ControllerSupport
-		implements
-			ExamStudentCloudService {
-
-	@Autowired
-	ExamRepo examRepo;
-
-	@Autowired
-	OrgCloudService orgCloudService;
-
-	@Autowired
-	ExamStudentServiceImpl examStudentService;
-
-	@Autowired
-	StudentCloudService studentCloudService;
-
-	@Autowired
-	ExamStudentRepo examStudentRepo;
-
-	@Autowired
-	CourseCloudService courseCloudService;
-
-	@ApiOperation(value = "保存考生")
-	@PostMapping("saveExamStudent")
-	@Override
-	public SaveExamStudentResp saveExamStudent(@RequestBody SaveExamStudentReq req) {
-		trim(req);
-		ExamStudentInfo info = new ExamStudentInfo();
-		info.setCourseCode(req.getCourseCode());
-		info.setCourseName(req.getCourseName());
-		info.setCourseId(req.getCourseId());
-		info.setRootOrgId(req.getRootOrgId());
-		info.setExamId(req.getExamId());
-		info.setIdentityNumber(req.getIdentityNumber());
-		info.setPaperType(req.getPaperType());
-		info.setRootOrgId(req.getRootOrgId());
-		info.setStudentCode(req.getStudentCode());
-		info.setStudentName(req.getStudentName());
-		info.setInfoCollector(req.getInfoCollector());
-		info.setGrade(req.getGrade());
-		info.setExamSite(req.getExamSite());
-		info.setSpecialtyName(req.getSpecialtyName());
-		info.setRemark(req.getRemark());
-
-		ExamStudentInfo saved = examStudentService.saveExamStudent(info);
-
-		SaveExamStudentResp resp = new SaveExamStudentResp();
-
-		ExamStudentBean examStudentBean = new ExamStudentBean();
-		examStudentBean.setId(saved.getId());
-		examStudentBean.setCourseCode(saved.getCourseCode());
-		examStudentBean.setCourseLevel(saved.getCourseLevel());
-		examStudentBean.setCourseName(saved.getCourseName());
-		examStudentBean.setExamId(saved.getExamId());
-		examStudentBean.setExamName(saved.getExamName());
-		examStudentBean.setIdentityNumber(saved.getIdentityNumber());
-		examStudentBean.setStudentCode(saved.getStudentCode());
-		examStudentBean.setPaperType(saved.getPaperType());
-		examStudentBean.setRootOrgId(saved.getRootOrgId());
-		examStudentBean.setStudentName(saved.getStudentName());
-
-		resp.setExamStudentBean(examStudentBean);
-
-		return resp;
-	}
-
-}
+package cn.com.qmth.examcloud.core.examwork.api.provider;
+
+import javax.transaction.Transactional;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
+import cn.com.qmth.examcloud.core.basic.api.CourseCloudService;
+import cn.com.qmth.examcloud.core.basic.api.OrgCloudService;
+import cn.com.qmth.examcloud.core.basic.api.StudentCloudService;
+import cn.com.qmth.examcloud.core.examwork.dao.ExamRepo;
+import cn.com.qmth.examcloud.core.examwork.dao.ExamStudentRepo;
+import cn.com.qmth.examcloud.core.examwork.service.bean.ExamStudentInfo;
+import cn.com.qmth.examcloud.core.examwork.service.impl.ExamStudentServiceImpl;
+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.response.SaveExamStudentResp;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 类注释
+ *
+ * @author WANGWEI
+ * @date 2018年7月18日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+@Transactional
+@RestController
+@RequestMapping("${$rmp.cloud.examwork}" + "examStudent")
+public class ExamStudentCloudServiceProvider extends ControllerSupport
+		implements
+			ExamStudentCloudService {
+
+	private static final long serialVersionUID = -89062090947597841L;
+
+	@Autowired
+	ExamRepo examRepo;
+
+	@Autowired
+	OrgCloudService orgCloudService;
+
+	@Autowired
+	ExamStudentServiceImpl examStudentService;
+
+	@Autowired
+	StudentCloudService studentCloudService;
+
+	@Autowired
+	ExamStudentRepo examStudentRepo;
+
+	@Autowired
+	CourseCloudService courseCloudService;
+
+	@ApiOperation(value = "保存考生")
+	@PostMapping("saveExamStudent")
+	@Override
+	public SaveExamStudentResp saveExamStudent(@RequestBody SaveExamStudentReq req) {
+		trim(req);
+		ExamStudentInfo info = new ExamStudentInfo();
+		info.setCourseCode(req.getCourseCode());
+		info.setCourseName(req.getCourseName());
+		info.setCourseId(req.getCourseId());
+		info.setRootOrgId(req.getRootOrgId());
+		info.setExamId(req.getExamId());
+		info.setIdentityNumber(req.getIdentityNumber());
+		info.setPaperType(req.getPaperType());
+		info.setRootOrgId(req.getRootOrgId());
+		info.setStudentCode(req.getStudentCode());
+		info.setStudentName(req.getStudentName());
+		info.setInfoCollector(req.getInfoCollector());
+		info.setGrade(req.getGrade());
+		info.setExamSite(req.getExamSite());
+		info.setSpecialtyName(req.getSpecialtyName());
+		info.setRemark(req.getRemark());
+
+		ExamStudentInfo saved = examStudentService.saveExamStudent(info);
+
+		SaveExamStudentResp resp = new SaveExamStudentResp();
+
+		ExamStudentBean examStudentBean = new ExamStudentBean();
+		examStudentBean.setId(saved.getId());
+		examStudentBean.setCourseCode(saved.getCourseCode());
+		examStudentBean.setCourseLevel(saved.getCourseLevel());
+		examStudentBean.setCourseName(saved.getCourseName());
+		examStudentBean.setExamId(saved.getExamId());
+		examStudentBean.setExamName(saved.getExamName());
+		examStudentBean.setIdentityNumber(saved.getIdentityNumber());
+		examStudentBean.setStudentCode(saved.getStudentCode());
+		examStudentBean.setPaperType(saved.getPaperType());
+		examStudentBean.setRootOrgId(saved.getRootOrgId());
+		examStudentBean.setStudentName(saved.getStudentName());
+
+		resp.setExamStudentBean(examStudentBean);
+
+		return resp;
+	}
+
+}