wangwei 5 gadi atpakaļ
vecāks
revīzija
b243486bf0

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

@@ -1468,7 +1468,7 @@ public class ExamController extends ControllerSupport {
 			bean.setUpdateTime(next.getUpdateTime());
 			bean.setExamLimit(next.getExamLimit());
 			bean.setStudentId(next.getStudentId());
-			bean.setIdentityNumber(next.getIdentityNumber());
+			bean.setIdentityNumber(next.getExt1());
 		}
 
 		PageInfo<StudentSpecialSettingsDomain> ret = new PageInfo<StudentSpecialSettingsDomain>();

+ 87 - 36
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/entity/ExamSpecialSettingsEntity.java

@@ -43,6 +43,12 @@ public class ExamSpecialSettingsEntity extends JpaEntity {
 	@GeneratedValue(strategy = GenerationType.IDENTITY)
 	private Long id;
 
+	/**
+	 * 顶级机构ID
+	 */
+	@Column(nullable = false)
+	private Long rootOrgId;
+
 	/**
 	 * 考试ID
 	 */
@@ -67,18 +73,6 @@ public class ExamSpecialSettingsEntity extends JpaEntity {
 	@Column(nullable = true)
 	private Long studentId;
 
-	/**
-	 * 学生学号
-	 */
-	@Column(nullable = true)
-	private String identityNumber;
-
-	/**
-	 * 顶级机构ID
-	 */
-	@Column(nullable = false)
-	private Long rootOrgId;
-
 	/**
 	 * 考试类型
 	 */
@@ -110,6 +104,31 @@ public class ExamSpecialSettingsEntity extends JpaEntity {
 	@Column(nullable = false)
 	private Boolean examLimit;
 
+	/**
+	 * 扩展属性1
+	 */
+	private String ext1;
+
+	/**
+	 * 扩展属性2
+	 */
+	private String ext2;
+
+	/**
+	 * 扩展属性3
+	 */
+	private String ext3;
+
+	/**
+	 * 扩展属性4
+	 */
+	private String ext4;
+
+	/**
+	 * 扩展属性5
+	 */
+	private String ext5;
+
 	public Long getId() {
 		return id;
 	}
@@ -118,6 +137,14 @@ public class ExamSpecialSettingsEntity extends JpaEntity {
 		this.id = id;
 	}
 
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
 	public Long getExamId() {
 		return examId;
 	}
@@ -126,12 +153,12 @@ public class ExamSpecialSettingsEntity extends JpaEntity {
 		this.examId = examId;
 	}
 
-	public Long getRootOrgId() {
-		return rootOrgId;
+	public Long getCourseId() {
+		return courseId;
 	}
 
-	public void setRootOrgId(Long rootOrgId) {
-		this.rootOrgId = rootOrgId;
+	public void setCourseId(Long courseId) {
+		this.courseId = courseId;
 	}
 
 	public Long getOrgId() {
@@ -142,6 +169,30 @@ public class ExamSpecialSettingsEntity extends JpaEntity {
 		this.orgId = orgId;
 	}
 
+	public Long getStudentId() {
+		return studentId;
+	}
+
+	public void setStudentId(Long studentId) {
+		this.studentId = studentId;
+	}
+
+	public ExamType getExamType() {
+		return examType;
+	}
+
+	public void setExamType(ExamType examType) {
+		this.examType = examType;
+	}
+
+	public Boolean getExamEnable() {
+		return examEnable;
+	}
+
+	public void setExamEnable(Boolean examEnable) {
+		this.examEnable = examEnable;
+	}
+
 	public Date getBeginTime() {
 		return beginTime;
 	}
@@ -166,44 +217,44 @@ public class ExamSpecialSettingsEntity extends JpaEntity {
 		this.examLimit = examLimit;
 	}
 
-	public Long getCourseId() {
-		return courseId;
+	public String getExt1() {
+		return ext1;
 	}
 
-	public void setCourseId(Long courseId) {
-		this.courseId = courseId;
+	public void setExt1(String ext1) {
+		this.ext1 = ext1;
 	}
 
-	public ExamType getExamType() {
-		return examType;
+	public String getExt2() {
+		return ext2;
 	}
 
-	public void setExamType(ExamType examType) {
-		this.examType = examType;
+	public void setExt2(String ext2) {
+		this.ext2 = ext2;
 	}
 
-	public Boolean getExamEnable() {
-		return examEnable;
+	public String getExt3() {
+		return ext3;
 	}
 
-	public void setExamEnable(Boolean examEnable) {
-		this.examEnable = examEnable;
+	public void setExt3(String ext3) {
+		this.ext3 = ext3;
 	}
 
-	public Long getStudentId() {
-		return studentId;
+	public String getExt4() {
+		return ext4;
 	}
 
-	public void setStudentId(Long studentId) {
-		this.studentId = studentId;
+	public void setExt4(String ext4) {
+		this.ext4 = ext4;
 	}
 
-	public String getIdentityNumber() {
-		return identityNumber;
+	public String getExt5() {
+		return ext5;
 	}
 
-	public void setIdentityNumber(String identityNumber) {
-		this.identityNumber = identityNumber;
+	public void setExt5(String ext5) {
+		this.ext5 = ext5;
 	}
 
 }

+ 15 - 2
examcloud-core-examwork-service/src/main/java/cn/com/qmth/examcloud/core/examwork/service/impl/ExamServiceImpl.java

@@ -502,8 +502,21 @@ public class ExamServiceImpl implements ExamService {
 			examSpecialSettingsEntity.setOrgId(orgId);
 			examSpecialSettingsEntity.setCourseId(courseId);
 			examSpecialSettingsEntity.setStudentId(studentId);
-			if (null != studentId) {
-				examSpecialSettingsEntity.setIdentityNumber(student.getIdentityNumber());
+
+			// 机构特殊设置
+			if (null != orgId && null == courseId && null == studentId) {
+			}
+			// 学生特殊设置
+			else if (null == orgId && null == courseId && null != studentId) {
+				if (null != studentId) {
+					examSpecialSettingsEntity.setExt1(student.getIdentityNumber());
+				}
+			}
+			// 课程特殊设置
+			else if (null == orgId && null != courseId && null == studentId) {
+			}
+			// 考试设置
+			else if (null == orgId && null == courseId && null == studentId) {
 			}
 
 		} else {