package nc.vo.sscivm.ivmpub;

import java.util.HashSet;
import java.util.Set;

import nc.md.model.IEnumValue;
import nc.md.model.impl.MDEnum;

/**
 * <b> 在此处简要描述此类的功能 </b>
 * <p>
 *     在此处添加此类的描述信息
 * </p>
 * 创建日期:
 * @author
 * @version NCPrj ??
 */
public class InvoiceTypeEnum extends MDEnum{
    public InvoiceTypeEnum(IEnumValue enumvalue){
        super(enumvalue);
    }
    /**
     * 增值税电子普通发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_DZPTFP= MDEnum.valueOf(InvoiceTypeEnum.class, "1");

    /**
     * 增值税电子专用发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_DZZYFP= MDEnum.valueOf(InvoiceTypeEnum.class, "2");


    /**
     * 增值税普通发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_PTFP= MDEnum.valueOf(InvoiceTypeEnum.class, "3");
    /**
     * 增值税专用发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_ZYFP= MDEnum.valueOf(InvoiceTypeEnum.class, "4");

    /**
     * 机动车统一发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_JDCTYFP= MDEnum.valueOf(InvoiceTypeEnum.class, "5");
    /**
     * 增值税电子普通发票（成品油）
     */
    public static final InvoiceTypeEnum INVOICETYPE_DZPTFP_CPY= MDEnum.valueOf(InvoiceTypeEnum.class, "8");
    /**
     * 成品油普通发票(卷式)
     */
    public static final InvoiceTypeEnum INVOICETYPE_CPYPTFP_JS= MDEnum.valueOf(InvoiceTypeEnum.class, "9");
    /**
     * 成品油普通发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_CPYPTFP= MDEnum.valueOf(InvoiceTypeEnum.class, "10");
    /**
     * 成品油专用发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_CPYZXFP= MDEnum.valueOf(InvoiceTypeEnum.class, "11");
    /**
     * 增值税普通发票(卷式)
     */
    public static final InvoiceTypeEnum INVOICETYPE_PTFP_JS= MDEnum.valueOf(InvoiceTypeEnum.class, "12");
    /**
     * 通行费增值税电子普通发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_DZPTFP_TXF= MDEnum.valueOf(InvoiceTypeEnum.class, "14");

    /**
     * 机打发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_JDFP= MDEnum.valueOf(InvoiceTypeEnum.class, "15");
    /**
     * 火车票
     */
    public static final InvoiceTypeEnum INVOICETYPE_TRAIN= MDEnum.valueOf(InvoiceTypeEnum.class, "16");
    /**
     * 航空客票
     */
    public static final InvoiceTypeEnum INVOICETYPE_AIR= MDEnum.valueOf(InvoiceTypeEnum.class, "17");
    /**
     * 客运汽车票
     */
    public static final InvoiceTypeEnum INVOICETYPE_BUS= MDEnum.valueOf(InvoiceTypeEnum.class, "18");
    /**
     * 出租车票
     */
    public static final InvoiceTypeEnum INVOICETYPE_TAXI= MDEnum.valueOf(InvoiceTypeEnum.class, "19");
    /**
     * 过路费票
     */
    public static final InvoiceTypeEnum INVOICETYPE_ROADTOLL= MDEnum.valueOf(InvoiceTypeEnum.class, "20");
    /**
     * 定额发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_TUOTA= MDEnum.valueOf(InvoiceTypeEnum.class, "21");
    /**
     * 其他发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_OTHER= MDEnum.valueOf(InvoiceTypeEnum.class, "22");
    /**
     * 数电票(增值税专用发票)
     */
    public static final InvoiceTypeEnum DZFP_ZZSZYFP= MDEnum.valueOf(InvoiceTypeEnum.class, "31");
    /**
     * 数电票(普通发票)
     */
    public static final InvoiceTypeEnum DZFP_PTFP= MDEnum.valueOf(InvoiceTypeEnum.class, "32");
    /**
     * 数电纸质发票(增值税专用发票)
     */
    public static final InvoiceTypeEnum ZZFP_ZZSZYFP= MDEnum.valueOf(InvoiceTypeEnum.class, "33");
    public static final InvoiceTypeEnum ZZFP_SDFP = (InvoiceTypeEnum)MDEnum.valueOf(InvoiceTypeEnum.class, "36");

    /**
     * 数电纸质发票(普通发票)
     */
    public static final InvoiceTypeEnum ZZFP_PTFP= MDEnum.valueOf(InvoiceTypeEnum.class, "34");
    /**
     * 增值税专用发票(机动车)
     */
    public static final InvoiceTypeEnum INVOICETYPE_ZYFP_JDC= MDEnum.valueOf(InvoiceTypeEnum.class, "99");
    /**
     * 增值税电子普通发票(矿产类)
     */
    public static final InvoiceTypeEnum INVOICETYPE_DZPTFP_KCL= MDEnum.valueOf(InvoiceTypeEnum.class, "116");
    /**
     * 增值税电子专用发票(矿产类)
     */
    public static final InvoiceTypeEnum INVOICETYPE_DZZYFP_KCL= MDEnum.valueOf(InvoiceTypeEnum.class, "216");
    /**
     * 增值税普通发票(矿产类)
     */
    public static final InvoiceTypeEnum INVOICETYPE_PTFP_KCL= MDEnum.valueOf(InvoiceTypeEnum.class, "316");
    /**
     * 增值税专用发票（矿产类)
     */
    public static final InvoiceTypeEnum INVOICETYPE_ZYFP_KCL= MDEnum.valueOf(InvoiceTypeEnum.class, "416");

    /**
     * 二手车销售统一发票
     */
    public static final InvoiceTypeEnum INVOICETYPE_ESCTYFP= MDEnum.valueOf(InvoiceTypeEnum.class, "105");

    /**
     * 财政非税票据
     */
    public static final InvoiceTypeEnum INVOICETYPE_NOTAX_CZFSPJ= MDEnum.valueOf(InvoiceTypeEnum.class, "64");
    /**
     * 医疗门诊票据
     */
    public static final InvoiceTypeEnum INVOICETYPE_NOTAX_YLMZ= MDEnum.valueOf(InvoiceTypeEnum.class, "65");
    /**
     * 医疗住院票据
     */
    public static final InvoiceTypeEnum INVOICETYPE_NOTAX_YLZY= MDEnum.valueOf(InvoiceTypeEnum.class, "66");
    /**
     * 非税收入一般缴款书
     */
    public static final InvoiceTypeEnum INVOICETYPE_NOTAX_YBJKS= MDEnum.valueOf(InvoiceTypeEnum.class, "67");
    /**
     * 增值税电子普通发票(农产品)
     */
    public static final InvoiceTypeEnum INVOICETYPE_DZPTFP_NCP= MDEnum.valueOf(InvoiceTypeEnum.class, "109");
    /**
     * 增值税普通发票(农产品)
     */
    public static final InvoiceTypeEnum INVOICETYPE_PTFP_NCP= MDEnum.valueOf(InvoiceTypeEnum.class, "309");

    /**
     * 判断是否是电子发票
     * @param value
     * @return
     */
    public static boolean isDzfp(String value){
        if (
                InvoiceTypeEnum.INVOICETYPE_DZPTFP.getEnumValue().getValue().equals(value)
                        ||InvoiceTypeEnum.INVOICETYPE_DZZYFP.getEnumValue().getValue().equals(value)
                        ||InvoiceTypeEnum.INVOICETYPE_DZPTFP_CPY.getEnumValue().getValue().equals(value)
                        ||InvoiceTypeEnum.INVOICETYPE_DZPTFP_TXF.getEnumValue().getValue().equals(value)
                        ||InvoiceTypeEnum.DZFP_ZZSZYFP.getEnumValue().getValue().equals(value)
                        ||InvoiceTypeEnum.DZFP_PTFP.getEnumValue().getValue().equals(value)
                        ||InvoiceTypeEnum.INVOICETYPE_DZPTFP_KCL.getEnumValue().getValue().equals(value)
                        ||InvoiceTypeEnum.INVOICETYPE_DZZYFP_KCL.getEnumValue().getValue().equals(value)
                        ||InvoiceTypeEnum.INVOICETYPE_DZPTFP_NCP.getEnumValue().getValue().equals(value)){
            return true;
        }
        return false;
    }

    /**
     * 获取纸质发票
     * @return 纸票集合
     */
    public static Set<Integer> getPaperInvoice(){
        Set<Integer> invoices = new HashSet<Integer>();
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_JDCTYFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ESCTYFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_CPYPTFP_JS.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_CPYPTFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_CPYZXFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_JS.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_JDFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_TRAIN.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_AIR.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_BUS.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_TAXI.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ROADTOLL.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_TUOTA.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP_JDC.toIntValue());
        invoices.add(InvoiceTypeEnum.ZZFP_ZZSZYFP.toIntValue());
        invoices.add(InvoiceTypeEnum.ZZFP_PTFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_KCL.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP_KCL.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_NCP.toIntValue());
        return invoices;
    }

    /**
     * 获取报销台账税务云发票集合
     * @return
     */
    public static Set<Integer> getBxTzInvoice(){
        Set<Integer> invoices = new HashSet<Integer>();
        invoices.add(InvoiceTypeEnum.INVOICETYPE_JDFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_TRAIN.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_AIR.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_BUS.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_TAXI.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ROADTOLL.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_TUOTA.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_OTHER.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_NOTAX_CZFSPJ.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_NOTAX_YLZY.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_NOTAX_YLMZ.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_NOTAX_YBJKS.toIntValue());
        return invoices;
    }

    /**
     * 获取普通发票
     * @return 普通发票
     */
    public static Set<Integer> getCommonInvoice(){
        Set<Integer> invoices = new HashSet<Integer>();
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_CPY.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_JS.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_CPYPTFP.toIntValue());
        invoices.add(InvoiceTypeEnum.DZFP_PTFP.toIntValue());
        invoices.add(InvoiceTypeEnum.ZZFP_PTFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_KCL.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_KCL.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_NCP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_NCP.toIntValue());
        return invoices;
    }

    /**
     * 获取专用发票
     * @return 专用发票
     */
    public static Set<Integer> getSpecialInvoice(){
        Set<Integer> invoices = new HashSet<Integer>();
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZZYFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_CPYZXFP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP_JDC.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZZYFP_KCL.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP_KCL.toIntValue());
        invoices.add(InvoiceTypeEnum.DZFP_ZZSZYFP.toIntValue());
        invoices.add(InvoiceTypeEnum.ZZFP_ZZSZYFP.toIntValue());
        return invoices;
    }

    /**
     * 获取矿产发票
     * @return
     */
    public static Set<Integer> getKCLInvoice(){
        Set<Integer> invoices = new HashSet<Integer>();
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_KCL.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZZYFP_KCL.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_KCL.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP_KCL.toIntValue());
        return invoices;
    }

    /**
     * 获取非税类发票
     * @return
     */
    public static Set<Integer> getNoTaxInvoice(){
        Set<Integer> invoices = new HashSet<Integer>();
        invoices.add(InvoiceTypeEnum.INVOICETYPE_NOTAX_CZFSPJ.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_NOTAX_YLMZ.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_NOTAX_YLZY.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_NOTAX_YBJKS.toIntValue());
        return invoices;
    }

    /**
     * 获取需要查验的发票集合
     * @return
     */
    public static Set<String> getVerifyInvoice(){
        Set<String> invoices = new HashSet<String>();
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZZYFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_JDCTYFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ESCTYFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_CPYPTFP_JS.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_CPYPTFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_CPYZXFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_JS.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_CPY.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_TXF.toStringValue());
        invoices.add(InvoiceTypeEnum.DZFP_ZZSZYFP.toStringValue());
        invoices.add(InvoiceTypeEnum.DZFP_PTFP.toStringValue());
        invoices.add(InvoiceTypeEnum.ZZFP_ZZSZYFP.toStringValue());
        invoices.add(InvoiceTypeEnum.ZZFP_PTFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP_JDC.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_KCL.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZZYFP_KCL.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_KCL.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP_KCL.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_NCP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_NCP.toStringValue());
        return invoices;
    }


    /**
     *  获取可以收票的发票集合
     * @return
     */
    public static Set<String> getRecInvoice(){
        Set<String> invoices = new HashSet<String>();
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZZYFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_CPYPTFP_JS.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_CPYPTFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_CPYZXFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_JS.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_CPY.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_TXF.toStringValue());
        invoices.add(InvoiceTypeEnum.DZFP_ZZSZYFP.toStringValue());
        invoices.add(InvoiceTypeEnum.DZFP_PTFP.toStringValue());
        invoices.add(InvoiceTypeEnum.ZZFP_ZZSZYFP.toStringValue());
        invoices.add(InvoiceTypeEnum.ZZFP_PTFP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP_JDC.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_KCL.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZZYFP_KCL.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_KCL.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_ZYFP_KCL.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_NCP.toStringValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_NCP.toStringValue());
        return invoices;
    }

    /**
     * 获取收购发票
     * @return 收购发票集合
     */
    public static Set<Integer> getSGFP(){
        Set<Integer> invoices = new HashSet<Integer>();
        invoices.add(InvoiceTypeEnum.INVOICETYPE_DZPTFP_NCP.toIntValue());
        invoices.add(InvoiceTypeEnum.INVOICETYPE_PTFP_NCP.toIntValue());
        return invoices;
    }
}
