12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package com.github.jfcloud.gene.constants;
- import java.util.Arrays;
- import java.util.List;
- /**
- * 基因定制流程状态
- */
- public enum GeneStatusEnum {
- DRAFT("0", "待提交"),
- REJECTED("-1", "驳回"),
- GENE_EDITING("20", "基因编辑部门负责人审核"),
- PROJECT_LEADER("40", "项目负责人审核"),
- PROJECT_MANAGEMENT("60", "项目管理部审核"),
- COMPLETED("100", "已完成");
- private final String status;
- private final String description;
- GeneStatusEnum(String status, String description) {
- this.status = status;
- this.description = description;
- }
- /**
- * 提交状态
- */
- public static final List<String> SUBMIT_STATUS = Arrays.asList(DRAFT.getStatus(), REJECTED.getStatus());
- public String getStatus() {
- return status;
- }
- public String getDescription() {
- return description;
- }
- public static GeneStatusEnum getByStatus(String status) {
- for (GeneStatusEnum e : values()) {
- if (e.getStatus().equals(status)) {
- return e;
- }
- }
- return null;
- }
- }
|