wangwei 7 jaren geleden
bovenliggende
commit
0dd17a6896

+ 1 - 0
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/controller/ExamStudentController.java

@@ -203,6 +203,7 @@ public class ExamStudentController extends ControllerSupport {
 			bean.setExamSite(cur.getExamSite());
 			bean.setFinished(cur.getFinished());
 			bean.setExamType(cur.getExam().getExamType().name());
+			bean.setUpdateTime(cur.getUpdateTime());
 			ret.add(bean);
 		}
 		return new PageInfo<ExamStudentDomain>(examStudents, ret);

+ 12 - 0
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/controller/bean/ExamStudentDomain.java

@@ -1,5 +1,7 @@
 package cn.com.qmth.examcloud.core.examwork.api.controller.bean;
 
+import java.util.Date;
+
 import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
 
 /**
@@ -75,6 +77,8 @@ public class ExamStudentDomain implements JsonSerializable {
 
 	private String examType;
 
+	private Date updateTime;
+
 	public Long getId() {
 		return id;
 	}
@@ -275,4 +279,12 @@ public class ExamStudentDomain implements JsonSerializable {
 		this.examType = examType;
 	}
 
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
 }

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

@@ -38,11 +38,11 @@ import cn.com.qmth.examcloud.examwork.api.response.SaveExamStudentResp;
 import io.swagger.annotations.ApiOperation;
 
 /**
- * 
- * @author chenken
- * @date 2018年5月4日 下午2:06:14
- * @company QMTH
- * @description ExamStudentProvider.java
+ * 类注释
+ *
+ * @author WANGWEI
+ * @date 2018年7月18日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
  */
 @Transactional
 @RestController
@@ -141,7 +141,7 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
 				.findByExamAndStudentIdAndCourseCodeOrderByUpdateTimeDesc(exam, studentInfo.getId(),
 						courseBean.getCode());
 
-		ExamStudent examStudent = new ExamStudent();
+		ExamStudent examStudent = null;
 
 		if (1 < examStudentList.size()) {
 			// 数据需要修正
@@ -158,10 +158,12 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
 		examStudent.setInfoCollector(req.getInfoCollector());
 		examStudent.setName(studentInfo.getName());
 		examStudent.setRootOrgId(rootOrgId);
+
 		examStudent.setCourseId(courseBean.getId());
 		examStudent.setCourseCode(courseBean.getCode());
 		examStudent.setCourseName(courseBean.getName());
 		examStudent.setCourseLevel(courseBean.getLevel());
+
 		examStudent.setExam(exam);
 		examStudent.setIdentityNumber(studentInfo.getIdentityNumber());
 		examStudent.setStudentCode(studentInfo.getStudentCode());
@@ -174,6 +176,8 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
 		examStudent.setGrade(req.getGrade());
 		examStudent.setSpecialtyName(req.getSpecialtyName());
 		examStudent.setExamSite(req.getExamSite());
+
+		System.out.println(examStudent.getCourseLevel());
 		ExamStudent saved = examStudentRepo.save(examStudent);
 
 		SaveExamStudentResp resp = new SaveExamStudentResp();