|
@@ -1,104 +1,57 @@
|
|
|
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
|
|
|
- * @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, "相片替考"),
|
|
|
-
|
|
|
- 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;
|
|
|
- }
|
|
|
+ CHEAT(1, "作弊"),
|
|
|
|
|
|
- private Long id;
|
|
|
+ NOT_ONESELF(2, "他人替考"),
|
|
|
|
|
|
- private String name;
|
|
|
+ NOT_ONESELF_OF_PHOTO(3, "相片替考"),
|
|
|
|
|
|
- private DisciplineType() {
|
|
|
- }
|
|
|
+ ACTION_FAILURE(4, "指定动作失败"),
|
|
|
+
|
|
|
+ BATCH_NOTPASS(5, "批量审核不通过"),
|
|
|
+
|
|
|
+ BATCH_PASS(6, "批量审核通过"),
|
|
|
+
|
|
|
+ POWER_FAILURE(7, "断电"),
|
|
|
+
|
|
|
+ WITHOUT_ACTION(8, "未进行人脸指定动作检测"),
|
|
|
|
|
|
- private DisciplineType(Long id, String name) {
|
|
|
- this.id = id;
|
|
|
- this.name = name;
|
|
|
+ MACHINE_STOPPAGE(9, "机器故障"),
|
|
|
+
|
|
|
+ OTHER(10, "其他"),
|
|
|
+
|
|
|
+ ILLEGAL_DATA(11, "非法数据"),
|
|
|
+
|
|
|
+ ILLEGAL_CLIENT(12, "非法考生端应用");
|
|
|
+
|
|
|
+ private Integer sortNo;
|
|
|
+
|
|
|
+ private String description;
|
|
|
+
|
|
|
+ DisciplineType(Integer sortNo, String description) {
|
|
|
+ this.sortNo = sortNo;
|
|
|
+ this.description = description;
|
|
|
}
|
|
|
|
|
|
- public Long getId() {
|
|
|
- return id;
|
|
|
+ public Integer getSortNo() {
|
|
|
+ return sortNo;
|
|
|
}
|
|
|
|
|
|
- public void setId(Long id) {
|
|
|
- this.id = id;
|
|
|
+ public void setSortNo(Integer sortNo) {
|
|
|
+ this.sortNo = sortNo;
|
|
|
}
|
|
|
|
|
|
- public String getName() {
|
|
|
- return name;
|
|
|
+ public String getDescription() {
|
|
|
+ return description;
|
|
|
}
|
|
|
|
|
|
- public void setName(String name) {
|
|
|
- this.name = name;
|
|
|
+ public void setDescription(String description) {
|
|
|
+ this.description = description;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|