wangwei 6 жил өмнө
parent
commit
06bfa89f4a

+ 4 - 0
examcloud-core-examwork-base/src/main/java/cn/com/qmth/examcloud/core/examwork/base/enums/ExamProperty.java

@@ -12,6 +12,10 @@ import java.util.Map;
  */
 public enum ExamProperty {
 
+	/**
+	 * 是否允许上传附件(离线考试)
+	 */
+	CAN_UPLOAD_ATTACHMENT(31L, "是否允许上传附件(离线考试)"),
 	/**
 	 * 是否显示客观题成绩
 	 */

+ 18 - 0
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/ExamOrgPropertyRepo.java

@@ -0,0 +1,18 @@
+package cn.com.qmth.examcloud.core.examwork.dao;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.repository.query.QueryByExampleExecutor;
+
+import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamOrgPropertyEntity;
+import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamPropertyEntity;
+
+public interface ExamOrgPropertyRepo
+		extends
+			JpaRepository<ExamOrgPropertyEntity, Long>,
+			QueryByExampleExecutor<ExamOrgPropertyEntity>,
+			JpaSpecificationExecutor<ExamOrgPropertyEntity> {
+
+	ExamPropertyEntity findByexamIdAndOrgIdAndKeyId(Long examId, Long orgId, Long keyId);
+
+}

+ 0 - 13
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/entity/ExamOrgEntity.java

@@ -57,11 +57,6 @@ public class ExamOrgEntity extends JpaEntity {
 	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	private Date endTime;
 
-	/**
-	 * 是否允许上传附件(离线考试)
-	 */
-	private Boolean canUploadAttachment;
-
 	public Long getId() {
 		return id;
 	}
@@ -110,12 +105,4 @@ public class ExamOrgEntity extends JpaEntity {
 		this.endTime = endTime;
 	}
 
-	public Boolean getCanUploadAttachment() {
-		return canUploadAttachment;
-	}
-
-	public void setCanUploadAttachment(Boolean canUploadAttachment) {
-		this.canUploadAttachment = canUploadAttachment;
-	}
-
 }

+ 79 - 0
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/entity/ExamOrgPropertyEntity.java

@@ -0,0 +1,79 @@
+package cn.com.qmth.examcloud.core.examwork.dao.entity;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Index;
+import javax.persistence.Lob;
+import javax.persistence.Table;
+
+import cn.com.qmth.examcloud.commons.web.jpa.JpaEntity;
+
+/**
+ * 机构属性配置
+ *
+ * @author WANGWEI
+ * @date 2018年8月6日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+@Entity
+@Table(name = "EC_E_EXAM_ORG_PROP", indexes = {
+		@Index(name = "IDX_E_E_ORG_PROP_001001", columnList = "examId,orgId,keyId", unique = true)})
+public class ExamOrgPropertyEntity extends JpaEntity {
+
+	private static final long serialVersionUID = 4009839764353162256L;
+
+	@Id
+	@GeneratedValue
+	private Long id;
+
+	private Long examId;
+
+	private Long orgId;
+
+	private Long keyId;
+
+	@Lob
+	private String value;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getExamId() {
+		return examId;
+	}
+
+	public void setExamId(Long examId) {
+		this.examId = examId;
+	}
+
+	public Long getOrgId() {
+		return orgId;
+	}
+
+	public void setOrgId(Long orgId) {
+		this.orgId = orgId;
+	}
+
+	public Long getKeyId() {
+		return keyId;
+	}
+
+	public void setKeyId(Long keyId) {
+		this.keyId = keyId;
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+}