wangwei 6 년 전
부모
커밋
15e6d8104b

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

@@ -34,8 +34,10 @@ 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.CopyExamStudentsReq;
+import cn.com.qmth.examcloud.examwork.api.request.GetExamStudentReq;
 import cn.com.qmth.examcloud.examwork.api.request.SaveExamStudentReq;
 import cn.com.qmth.examcloud.examwork.api.response.CopyExamStudentsResp;
+import cn.com.qmth.examcloud.examwork.api.response.GetExamStudentResp;
 import cn.com.qmth.examcloud.examwork.api.response.SaveExamStudentResp;
 import io.swagger.annotations.ApiOperation;
 
@@ -217,4 +219,34 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
 		return resp;
 	}
 
+	@ApiOperation(value = "获取考生")
+	@PostMapping("getExamStudent")
+	@Override
+	public GetExamStudentResp getExamStudent(@RequestBody GetExamStudentReq req) {
+		Long examStudentId = req.getExamStudentId();
+
+		ExamStudentEntity saved = examStudentRepo.findOne(examStudentId);
+
+		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.setIdentityNumber(saved.getIdentityNumber());
+		examStudentBean.setStudentCode(saved.getStudentCode());
+		examStudentBean.setPaperType(saved.getPaperType());
+		examStudentBean.setRootOrgId(saved.getRootOrgId());
+		examStudentBean.setGrade(saved.getGrade());
+		examStudentBean.setCourseId(saved.getCourseId());
+		examStudentBean.setInfoCollector(saved.getInfoCollector());
+		examStudentBean.setExamSite(saved.getExamSite());
+		examStudentBean.setOrgId(saved.getOrgId());
+		examStudentBean.setOrgCode(saved.getOrgCode());
+
+		GetExamStudentResp resp = new GetExamStudentResp();
+		resp.setExamStudentBean(examStudentBean);
+		return resp;
+	}
+
 }

+ 28 - 11
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/entity/ExamStudentEntity.java

@@ -23,6 +23,12 @@ public class ExamStudentEntity extends JpaEntity {
 	@GeneratedValue
 	private Long id;
 
+	/**
+	 * 考试
+	 */
+	@Column(nullable = false)
+	private Long examId;
+
 	/**
 	 * 学生用户id
 	 */
@@ -30,16 +36,21 @@ public class ExamStudentEntity extends JpaEntity {
 	private Long studentId;
 
 	/**
-	 * 考生姓名
+	 * 身份证号
 	 */
 	@Column(nullable = false)
-	private String name;
+	private String identityNumber;
 
 	/**
-	 * 考试
+	 * 学号
+	 */
+	private String studentCode;
+
+	/**
+	 * 考生姓名
 	 */
 	@Column(nullable = false)
-	private Long examId;
+	private String name;
 
 	/**
 	 * 学校id
@@ -54,15 +65,10 @@ public class ExamStudentEntity extends JpaEntity {
 	private Long orgId;
 
 	/**
-	 * 学号
-	 */
-	private String studentCode;
-
-	/**
-	 * 身份证号
+	 * 学习中心编码
 	 */
 	@Column(nullable = false)
-	private String identityNumber;
+	private String orgCode;
 
 	/**
 	 * 课程ID
@@ -70,6 +76,9 @@ public class ExamStudentEntity extends JpaEntity {
 	@Column(nullable = false)
 	private Long courseId;
 
+	/**
+	 * 课程名称
+	 */
 	@Column(nullable = false)
 	private String courseName;
 
@@ -270,4 +279,12 @@ public class ExamStudentEntity extends JpaEntity {
 		this.courseName = courseName;
 	}
 
+	public String getOrgCode() {
+		return orgCode;
+	}
+
+	public void setOrgCode(String orgCode) {
+		this.orgCode = orgCode;
+	}
+
 }