12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package com.fjhx.enums;
- import lombok.Getter;
- import java.util.HashMap;
- @Getter
- public enum ApplyPurchaseStatusEnum {
- WAIT_START(1), // 待发起
- IN_APPROVAL(2), // 审批中
- NOT_PASS(3), // 未通过
- PASS(4), // 已通过/待采购
- PURCHASE_FLOW(5), // 采购审批中
- PURCHASED(6), // 已采购
- PART_ARRIVAL(7), // 部分到货
- ARRIVAL(8), // 全部到货
- DISCARD(9), // 作废
- ;
- ApplyPurchaseStatusEnum(Integer value) {
- this.value = value;
- }
- private final Integer value;
- private static final HashMap<Integer, ApplyPurchaseStatusEnum> map = new HashMap<>();
- static {
- for (ApplyPurchaseStatusEnum value : ApplyPurchaseStatusEnum.values()) {
- map.put(value.getValue(), value);
- }
- }
- /**
- * 根据value值获取枚举
- */
- public static ApplyPurchaseStatusEnum get(Integer value) {
- return map.get(value);
- }
- }
|