Quellcode durchsuchen

SYSTEM DisciplineType

deason vor 3 Jahren
Ursprung
Commit
b4a8268ffe

+ 94 - 89
examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/enums/DisciplineType.java

@@ -3,97 +3,102 @@ package cn.com.qmth.examcloud.core.oe.admin.dao.enums;
 import org.apache.commons.lang3.StringUtils;
 
 /**
- * @author  	chenken
- * @date    	2018年4月16日 下午5:58:39
- * @company 	QMTH
+ * @author chenken
+ * @date 2018年4月16日 下午5:58:39
+ * @company QMTH
  * @description 重考或违纪原因
  */
 public enum DisciplineType {
-	/**
-	 * 断电
-	 */
-	POWER_FAILURE(1L,"断电"),
-	/**
-	 * 机器故障
-	 */
-	MACHINE_STOPPAGE(2L,"机器故障"),
-	/**
-	 * 其他
-	 */
-	OTHER(3L,"其他"),
-	/**
-	 * 作弊
-	 */
-	CHEAT(4L,"作弊"),
-	/**
-	 * 替考
-	 */
-	NOT_ONESELF(5L,"他人替考"),
-	/**
-	 * 指定动作失败
-	 */
-	ACTION_FAILURE(6L,"指定动作失败"),
-	/**
-	 * 未进行人脸指定动作检测
-	 */
-	WITHOUT_ACTION(7L,"未进行人脸指定动作检测"),
-	
-	BATCH_PASS(8L,"批量审核通过"),
-	
-	BATCH_NOTPASS(9L,"批量审核不通过"),
-	
-	NOT_ONESELF_OF_PHOTO(10L,"相片替考");
-	
-	public static DisciplineType tramsformById(Long id){
-		if(id==null){
-			return null;
-		}
-		for(DisciplineType type:DisciplineType.values()){
-			if(type.getId() == id){
-				return type;
-			}
-		}
-		return null;
-	}
-	
-	public static DisciplineType tramsformByType(String type){
-		if(StringUtils.isBlank(type)){
-			return null;
-		}
-		for(DisciplineType disciplineType:DisciplineType.values()){
-			if(type.equals(disciplineType.name())){
-				return disciplineType;
-			}
-		}
-		return null;
-	}
-	
-	private Long id;
-	
-	private String name;
-	
-	private DisciplineType(){}
-	
-	private DisciplineType(Long id,String name){
-		this.id = id;
-		this.name = name;
-	}
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-	
+    /**
+     * 断电
+     */
+    POWER_FAILURE(1L, "断电"),
+    /**
+     * 机器故障
+     */
+    MACHINE_STOPPAGE(2L, "机器故障"),
+    /**
+     * 其他
+     */
+    OTHER(3L, "其他"),
+    /**
+     * 作弊
+     */
+    CHEAT(4L, "作弊"),
+    /**
+     * 替考
+     */
+    NOT_ONESELF(5L, "他人替考"),
+    /**
+     * 指定动作失败
+     */
+    ACTION_FAILURE(6L, "指定动作失败"),
+    /**
+     * 未进行人脸指定动作检测
+     */
+    WITHOUT_ACTION(7L, "未进行人脸指定动作检测"),
+
+    BATCH_PASS(8L, "批量审核通过"),
+
+    BATCH_NOTPASS(9L, "批量审核不通过"),
+
+    NOT_ONESELF_OF_PHOTO(10L, "相片替考"),
+
+    ILLEGAL_DATA(11L, "非法数据"),
+
+    ILLEGAL_CLIENT(12L, "非法考生端应用");
+
+    public static DisciplineType tramsformById(Long id) {
+        if (id == null) {
+            return null;
+        }
+        for (DisciplineType type : DisciplineType.values()) {
+            if (type.getId() == id) {
+                return type;
+            }
+        }
+        return null;
+    }
+
+    public static DisciplineType tramsformByType(String type) {
+        if (StringUtils.isBlank(type)) {
+            return null;
+        }
+        for (DisciplineType disciplineType : DisciplineType.values()) {
+            if (type.equals(disciplineType.name())) {
+                return disciplineType;
+            }
+        }
+        return null;
+    }
+
+    private Long id;
+
+    private String name;
+
+    private DisciplineType() {
+    }
+
+    private DisciplineType(Long id, String name) {
+        this.id = id;
+        this.name = name;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
 }