package com.bonus.canteen.core.supply.purchase.constants;

import com.google.common.collect.Lists;

import java.util.List;

public enum DrpInquiryStatusEnum {
   NO_COMMIT(1, "待提交"),
   ALREADY_QUOTE(2, "已决标"),
   DOING_QUOTE(3, "未决标"),
   LOSE_THE_BID(5, "已取消");

   private final Integer key;
   private final String value;

   private DrpInquiryStatusEnum(Integer key, String value) {
      this.key = key;
      this.value = value;
   }

   public static Integer getKey(String value) {
      DrpInquiryStatusEnum[] enums = values();
      DrpInquiryStatusEnum[] var2 = enums;
      int var3 = enums.length;

      for(int var4 = 0; var4 < var3; ++var4) {
         DrpInquiryStatusEnum temp = var2[var4];
         if (temp.value().equals(value)) {
            return temp.key();
         }
      }

      return null;
   }

   public static String getValue(Integer key) {
      DrpInquiryStatusEnum[] enums = values();
      DrpInquiryStatusEnum[] var2 = enums;
      int var3 = enums.length;

      for(int var4 = 0; var4 < var3; ++var4) {
         DrpInquiryStatusEnum temp = var2[var4];
         if (temp.key().equals(key)) {
            return temp.value();
         }
      }

      return null;
   }

   public Integer key() {
      return this.key;
   }

   public String value() {
      return this.value;
   }

   public static List<Integer> listNotCommitStatus() {
      return Lists.newArrayList(new Integer[]{NO_COMMIT.key, LOSE_THE_BID.key});
   }

}
