package com.dxhy.core.service.openservice.model.ocr;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum SnpjInvoiceTypeEnum {

    TAX_SPECIAL_INVOICE("01","100", "增值税专用发票"),
    TAX_INVOICE("04","101", "增值税普通发票" ),
    ELECTRONIC_INVOICE("10","102","增值税电子普通发票"),
    ROLL_TICKET("11","103","增值税普通发票(卷票)"),
    MOTOR_VEHICLE_SALE("15","104","机动车销售统一发票"),
    USED_CAR_SALES("15","105","二手车销售统一发票"),
    QUOTA_INVOICE("95","106","定额发票"),
    AIRCRAFT_INVOICE("97","107","机打发票"),
    TAXI_TICKETS("91","108","出租车发票"),
    RAILWAY_TICKET("92","109","火车票"),
    PASSENGER_TICKET("94","110","客运汽车票"),
    FLIGHT_ITINERARY("93","111","航空运输电子客票行程单"),
    STEAMER_TICKET("00","112","船票"),
    TOLL_ROADS("98","113","过路费"),
    RECEIPT("96","115","小票"),
    DIDI_ITINERARY("86","116","滴滴出行行程单"),
    DUTY_PAID_PROOF("87","117","完税证明"),
    ELECTRONIC_INVOICE_ITINERARY("14","118","增值税电子普通发票(通行费)"),
//    ELECTRONIC_INVOICE_QUKUAILIAN("119","区块链发票", ""),
//    PLACE_AIRCRAFT_INVOICE("120","浙江通用机打发票", ""),
    ELECTRONIC_OFD_INVOICE("04","121","增值税电子专用发票"),
    ELECTRONIC_TAX_SPECIAL_INVOICE("31","130","电子发票(增值税专用发票)"),
    ELECTRONIC_TAX_INVOICE("32","131","电子发票(普通发票)"),
//    FINAL_STATEMENT("200","结算单", ""),
//    RECEIPT_OF_RECEIPT("201","验收单", ""),
    IMAGE_OTHERS("00","444","其他");

    private String key;

    private String value;

    private String msg;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static String getVal(String key) {
        for (SnpjInvoiceTypeEnum typeEnum : SnpjInvoiceTypeEnum.values()) {
            if (typeEnum.key.equals(key)) {
                return typeEnum.getValue();
            }
        }
        return null;
    }

    public static void main(String[] args) {
        String val = getVal("00");
        System.out.println(val);
    }
}
