package com.fjhx.account.entity.account.enums;

import org.apache.commons.collections4.MapUtils;

import java.util.LinkedHashMap;
import java.util.Map;

//请款审批状态
public enum AccountRunningWaterEnum {
    ACCOUNT_PAYMENT("10", "打款"),
    RECEIVED_PAYMENT("20", "到款登记"),
    CLAIM("30", "到账认领"),
    TAX_REFUND("40", "退税"),
    INTERNAL_TRANSFER("50", "内部转账"),
    EXCHANGE_SETTLEMENT("60", "结汇"),
    LOAN("70", "借款"),
    REPAYMENT("80", "还款"),
    ;
    private static Map<String, String> map = new LinkedHashMap<>();
    private String key;
    private String value;

    AccountRunningWaterEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    /**
     * 获取枚举map
     *
     * @return
     */
    public static Map<String, String> getMap() {
        if (MapUtils.isNotEmpty(map)) {
            return map;
        }
        for (AccountRunningWaterEnum ms : values()) {
            map.put(ms.key, ms.value);
        }
        return map;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
