ApplyPurchaseStatusEnum.java 943 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package com.fjhx.enums;
  2. import lombok.Getter;
  3. import java.util.HashMap;
  4. @Getter
  5. public enum ApplyPurchaseStatusEnum {
  6. WAIT_START(1), // 待发起
  7. IN_APPROVAL(2), // 审批中
  8. NOT_PASS(3), // 未通过
  9. PASS(4), // 已通过/待采购
  10. PURCHASE_FLOW(5), // 采购审批中
  11. PURCHASED(6), // 已采购
  12. PART_ARRIVAL(7), // 部分到货
  13. ARRIVAL(8), // 全部到货
  14. DISCARD(9), // 作废
  15. ;
  16. ApplyPurchaseStatusEnum(Integer value) {
  17. this.value = value;
  18. }
  19. private final Integer value;
  20. private static final HashMap<Integer, ApplyPurchaseStatusEnum> map = new HashMap<>();
  21. static {
  22. for (ApplyPurchaseStatusEnum value : ApplyPurchaseStatusEnum.values()) {
  23. map.put(value.getValue(), value);
  24. }
  25. }
  26. /**
  27. * 根据value值获取枚举
  28. */
  29. public static ApplyPurchaseStatusEnum get(Integer value) {
  30. return map.get(value);
  31. }
  32. }