123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- package com.fjhx.sale.enums;
- import org.apache.commons.collections4.MapUtils;
- import java.util.LinkedHashMap;
- import java.util.Map;
- /**
- * 流程审批状态枚举
- */
- public enum FlowStatusEnum {
- DRAFT(0, "草稿"),
- UNDER_REVIEW(10, "审批中"),
- REJECT(20, "驳回"),
- PASS(30,"通过"),
- ;
- private int key;
- private String value;
- private static Map<Integer, String> map = new LinkedHashMap<>();
- FlowStatusEnum(int key, String value) {
- this.key = key;
- this.value = value;
- }
- /**
- * 获取枚举map
- *
- * @return
- */
- public static Map<Integer, String> getMap() {
- if (MapUtils.isNotEmpty(map)) {
- return map;
- }
- for (FlowStatusEnum ms : values()) {
- map.put(ms.key, ms.value);
- }
- return map;
- }
- public int getKey() {
- return key;
- }
- public String getValue() {
- return value;
- }
- }
|