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

import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum OcrDataTypeEnum {

    //➢type 为 vat_special_invoice（增值税专用发票）、vat_electronic_invoice（增
    //值税电子普通发票）、vat_common_invoice（增值税普通发票）、
    //vat_electronic_toll_invoice（增值税电子普通发票（通行费））
    VAT_INVOICE_CORRECT_CODE("vat_invoice_correct_code","校验码"),
    VAT_INVOICE_DAIMA ("vat_invoice_daima","发票代码"),
    VAT_INVOICE_HAOMA("vat_invoice_haoma","发票号码"),
    VAT_INVOICE_HAOMA_LARGE_SIZE("vat_invoice_haoma_large_size","字体较大的发票号码"),
    VAT_INVOICE_ISSUE_DATE("vat_invoice_issue_date","开票日期"),
    VAT_INVOICE_RATE_PAYER_ID("vat_invoice_rate_payer_id","购买方纳税人识别号"),
    VAT_INVOICE_TOTAL("vat_invoice_total","合计"),
    VAT_INVOICE_TAX_RATE("vat_invoice_tax_rate","税率"),
    VAT_INVOICE_JIDA_HAOMA("vat_invoice_jida_haoma","机打号码"),
    VAT_INVOICE_SELLER_NAME("vat_invoice_seller_name","销售方名称"),
    VAT_INVOICE_SELLER_BANK_ACCOUNT("vat_invoice_seller_bank_account","销售方开户行及帐号"),
    VAT_INVOICE_SELLER_ID ("vat_invoice_seller_id","销售方纳税人识别号"),
    VAT_INVOICE_SELLER_ADDR_TELL ("vat_invoice_seller_addr_tell","销售方地址、电话"),
    VAT_INVOICE_PAYER_NAME ("vat_invoice_payer_name","购买方名称"),
    VAT_INVOICE_PAYER_BANK_ACCOUNT  ("vat_invoice_payer_bank_account","购买方开户行及帐号"),
    VAT_INVOICE_PAYER_ADDR_TELL  ("vat_invoice_payer_addr_tell","购买方地址、电话"),
    VAT_INVOICE_TOTAL_COVER_TAX ("vat_invoice_total_cover_tax","价税合计大写"),
    VAT_INVOICE_TOTAL_COVER_TAX_DIGITS ("vat_invoice_total_cover_tax_digits","价税合计小写"),
    VAT_INVOICE_HEADLINE_PAGE_NUMBER ("vat_invoice_headline_page_number","标题发票联（普票，电子发票，专票增加字段）"),
    VAT_INVOICE_TOTAL_PRINT ("vat_invoice_total_print","打印合计（普票，电子发票，专票增加字段）"),
    VAT_INVOICE_CORRENT_CODE_PRINT ("vat_invoice_corrent_code_print","打印校验码（普票，电子发票，专票增加字段）"),
    VAT_INVOICE_TAX_TOTAL("vat_invoice_tax_total","税额合计"),
    VAT_INVOICE_GOODS_LIST ("vat_invoice_goods_list","货物或服务名称"),
    VAT_INVOICE_GOODS("vat_invoice_goods","货物或服务名称"),
    VAT_INVOICE_PRICE_LIST ("vat_invoice_price_list","金额明细"),
    VAT_INVOICE_PRICE ("vat_invoice_price","合计"),
    VAT_INVOICE_TAX_RATE_LIST ("vat_invoice_tax_rate_list","税率明细"),
    VAT_INVOICE_TAX_LIST ("vat_invoice_tax_list","税额明细"),
    VAT_INVOICE_TAX ("vat_invoice_tax","税额明细"),
    VAT_INVOICE_ZHUAN_YONG_FLAG ("vat_invoice_zhuan_yong_flag","专票/普票/区块链发票"),
    VAT_INVOICE_DAI_KAI_FLAG ("vat_invoice_dai_kai_flag","代开(非代开条目为空)"),
    VAT_INVOICE_PLATE_SPECIFIC("vat_invoice_plate_specific","规格型号明细"),
    VAT_INVOICE_ELECTRANS_UNIT ("vat_invoice_electrans_unit","单位明细"),
    VAT_INVOICE_ELECTRANS_QUANTITY("vat_invoice_electrans_quantity","数量明细"),
    VAT_INVOICE_ELECTRANS_UNIT_PRICE ("vat_invoice_electrans_unit_price","单价明细"),
    VAT_INVOICE_DAIMA_RIGHT_SIDE  ("vat_invoice_daima_right_side","右侧打印发票代码"),
    VAT_INVOICE_HAOMA_RIGHT_SIDE  ("vat_invoice_haoma_right_side","右侧打印发票号码"),
    VAT_INVOICE_PAGE_NUMBER ("vat_invoice_page_number","抵扣联/发票联"),
    VAT_INVOICE_TYPE ("vat_invoice_type","发票类型"),
    VAT_INVOICE_TOTAL_NOTE ("vat_invoice_total_note","备注"),
    VAT_INVOICE_CIPHER_FIELD ("vat_invoice_cipher_field","密码区"),
    VAT_INVOICE_DRAWER ("vat_invoice_drawer","开票人"),
    VAT_INVOICE_REVIEW ("vat_invoice_review","复核人"),
    VAT_INVOICE_PAYEE ("vat_invoice_payee","收款人"),
    EXIST_STAMPLE("exist_stample","盖章存在性判断"),

    VEHICLE_INVOICE_BUYER("vehicle_invoice_buyer","购买方名称"),
    VEHICLE_INVOICE_BUYER_ID ("vehicle_invoice_buyer_id","购买方名称的身份证号码或组织机构代码"),
    VEHICLE_INVOICE_CAR_MODEL ("vehicle_invoice_car_model","厂牌型号"),
    VEHICLE_INVOICE_CAR_MADE_PLACE("vehicle_invoice_car_made_place","产地"),
    VEHICLE_INVOICE_CERT_ID ("vehicle_invoice_cert_id","合格证号"),
    VEHICLE_INVOICE_ENGINE_ID ("vehicle_invoice_engine_id","发动机号码"),
    VEHICLE_INVOICE_CAR_VIN("vehicle_invoice_car_vin","车辆识别代号/车架号"),
    VEHICLE_INVOICE_TOTAL_PRICE("vehicle_invoice_total_price","价税合计"),
    VEHICLE_INVOICE_TOTAL_PRICE_DIGITS("vehicle_invoice_total_price_digits","价税合计小写"),
    VEHICLE_INVOICE_PRICE_WITHOUT_TAX("VEHICLE_INVOICE_PRICE_WITHOUT_TAX","不含税价"),
    VEHICLE_INVOICE_TAX_RATE("vehicle_invoice_tax_rate","税率"),
    VEHICLE_INVOICE_TAX_AMOUNT ("vehicle_invoice_tax_amount","税额"),
    VEHICLE_INVOICE_TELEPHONE ("vehicle_invoice_telephone","电话"),
    VEHICLE_INVOICE_ISSUE_DATE("vehicle_invoice_issue_date","开票日期"),
    VEHICLE_INVOICE_DAIMA("vehicle_invoice_daima","发票代码"),
    VEHICLE_INVOICE_HAOMA("vehicle_invoice_haoma","发票号码"),
    VEHICLE_INVOICE_DEALER("vehicle_invoice_dealer","销货单位"),
    VEHICLE_INVOICE_JIDA_DAIMA ("vehicle_invoice_jida_daima","机打代码"),
    VEHICLE_INVOICE_JIDA_HAOMA ("vehicle_invoice_jida_haoma","机打号码"),
    VEHICLE_INVOICE_MACHINE_ID ("vehicle_invoice_machine_id","机器编码"),
    VEHICLE_INVOICE_TAX_AUTHORITH_ID("vehicle_invoice_tax_authorith_id","主管税务代码"),
    VEHICLE_INVOICE_TAX_AUTHORITH ("vehicle_invoice_tax_authorith","主管税务机关"),
    VEHICLE_INVOICE_SELLER_BANK_NAME ("vehicle_invoice_seller_bank_name","开户银行"),
    VEHICLE_INVOICE_SELLER_BANK_ACCOUNT("vehicle_invoice_seller_bank_account","账号"),
    VEHICLE_INVOICE_SELLER_TAX_ID ("vehicle_invoice_seller_tax_id","纳税人识别号"),
    VEHICLE_INVOICE_COMMODITY_INSPECTION_ID ("vehicle_invoice_commodity_inspection_id","商检单号"),
    VEHICLE_INVOICE_IMPORT_CERTIFICATE_ID ("vehicle_invoice_import_certificate_id","进口证明书号"),
    VEHICLE_INVOICE_SELLER_ADDRESS ("vehicle_invoice_seller_address","地址"),

//    vehicle_invoice_daima("vehicle_invoice_daima","购车发票代码"),
//    vehicle_invoice_haoma ("vehicle_invoice_haoma","购车发票号码"),
//    vehicle_invoice_buyer ("vehicle_invoice_buyer","购货单位(人)"),
//    vehicle_invoice_buyer_id ("vehicle_invoice_buyer_id","购买身份证号码/组织机构代码"),
    VEHICLE_INVOICE_BUYER_ADDR("vehicle_invoice_buyer_addr","购买方地址"),
    VEHICLE_INVOICE_BUYER_PHONE ("vehicle_invoice_buyer_phone","购买方电话号码"),
    VEHICLE_INVOICE_SELLER ("vehicle_invoice_seller","卖方单位(人)"),
    VEHICLE_INVOICE_SELLER_ID   ("vehicle_invoice_seller_id","买方身份证号码/组织机构代码"),
    VEHICLE_INVOICE_SELLER_ADDR   ("vehicle_invoice_seller_addr","卖方地址"),
    VEHICLE_INVOICE_SELLER_PHONE  ("vehicle_invoice_seller_phone","卖方电话号码"),
    VEHICLE_INVOICE_PLATE_NUM ("vehicle_invoice_plate_num","车牌照号"),
    VEHICLE_INVOICE_REGISTER_NUM("vehicle_invoice_register_num","登记证号"),
    VEHICLE_INVOICE_VEHICLE_TYPE ("vehicle_invoice_vehicle_type","车辆类型"),
    VEHICLE_INVOICE_VIN   ("vehicle_invoice_vin","车架号/车辆识别代码"),
//    vehicle_invoice_car_model("vehicle_invoice_car_model","厂牌型号"),
    VEHICLE_INVOICE_DMV("vehicle_invoice_dmv","转入地车辆管理所名称"),
    VEHICLE_INVOICE_PRICE_TOTAL_PRICE ("vehicle_invoice_price_total_price","价税合计"),
//    vehicle_invoice_total_price_digits ("vehicle_invoice_total_price_digits","价税合计小写"),
    VEHICLE_INVOICE_AUCTION_HOUSE ("vehicle_invoice_auction_house","经营、拍卖单位"),
    VEHICLE_INVOICE_AUCTION_HOUSE_ADDR("vehicle_invoice_auction_house_addr","经营、拍卖单位地址"),
    VEHICLE_INVOICE_AUCTION_HOUSE_TAX_ID ("vehicle_invoice_auction_house_tax_id","经营、拍卖单位纳税人识别号"),
    VEHICLE_INVOICE_AUCTION_HOUSE_BANK_ACCOUNT  ("vehicle_invoice_auction_house_bank_account","经营、拍卖单位开户银行、账号"),
    VEHICLE_INVOICE_AUCTION_HOUSE_PHONE ("vehicle_invoice_auction_house_phone","经营、拍卖单位电话"),
    VEHICLE_INVOICE_MARKET ("vehicle_invoice_market","二手车市场"),
    VEHICLE_INVOICE_MARKET_ADDR  ("vehicle_invoice_market_addr","二手车市场地址"),
    VEHICLE_INVOICE_MARKET_TAX_ID ("vehicle_invoice_market_tax_id","二手车市场纳税人识别号"),
    VEHICLE_INVOICE_MARKET_BANK_ACOUNT ("vehicle_invoice_market_bank_acount","二手车市场开户银行、账号"),
    VEHICLE_INVOICE_MARKET_PHONE ("vehicle_invoice_market_phone","二手车市场电话"),
    VEHICLE_INVOICE_NOTE  ("vehicle_invoice_note","备注"),
//    vehicle_invoice_issue_date ("vehicle_invoice_issue_date","购车发票开票日期"),

    INVOICE_HEAD("invoice_head","发票票头"),
    INVOICE_NUMBER("invoice_number","发票号码"),
    INVOICE_CODE("invoice_code","发票代码"),
    MACHINE_NUMBER ("machine_number","机器号码"),
    MACHINE_CODE ("machine_code","机器编码"),
    TOTAL_MONEY("total_money","合计金额(小写)"),
    TOTAL_MONEY_BIG ("total_money_big","合计金额(大写)"),
    DATE_OF_INVOICE ("date_of_invoice","开票日期"),
    CHECK_NUMBER ("check_number","校验码"),
    BUY_NAME("buy_name","购方名称"),
    BUY_TAX_NUMBER("buy_tax_number","购方纳税人识别号"),
    SOLD_NAME ("sold_name","销方名称"),
    SOLD_TAX_NUMBER ("sold_tax_number","销方纳税人识别号"),
    CASHIER_NAME ("cashier_name","收款员"),

    QUOTA_INVOICE_CODE("quota_invoice_code","发票代码"),
    QUOTA_INVOICE_NUMBER ("quota_invoice_number","发票号码"),
    MONEY_SMALL ("money_small","金额(小写)"),
    MONEY_BIG ("money_big","金额(大写)"),
    LOCATION ("location","发票所在地"),

//    invoice_code ("invoice_code","发票代码"),
    INVOICE_NO ("invoice_no","发票号码"),
    DATE ("date","日期"),
    TAXI_NO ("taxi_no","车号"),
    BOARDING_TIME("boarding_time","上车时间"),
    LANDING_TIME ("landing_time","下车时间"),
    MILEAGE ("mileage","里程"),
    SUM  ("sum","金额"),
//    location  ("location","发票所在地"),

    PASSENGER_NAME ("passenger_name","旅客姓名"),
    ID_NO ("id_no","身份证件号码"),
    SERIAL_NUMBER ("serial_number","印刷序号"),
    TOTAL("total","合计金额"),
    FARE ("fare","票价"),
    CIVIL_AVIATION_FUND ("civil_aviation_fund","民航发展基金"),
    FUEL_SURCHARGE ("fuel_surcharge","燃油附加费"),
    OTHER_TAXES("other_taxes","其他税费"),
    ISSUED_DATE ("issued_date","填开日期"),
    ISSUED_BY ("issued_by","填开单位"),
    E_TICKET_NO  ("e_ticket_no","电子客票号码"),
    INSURANCE ("insurance","保险费"),

//    passenger_name("passenger_name","乘客名称"),
    PASSENGER_ID("passenger_id","乘客身份证"),
    TRAIN_NUMBER ("train_number","车次号"),
    DEPARTURE_STATION ("departure_station","出发地"),
    DEPARTURE_DATE ("departure_date","乘车时间"),
    //TODO
    CLASS ("class","座位类别"),
    TICKET_NUMBER ("ticket_number","火车票红色编码"),
    ARRIVAL_STATION ("arrival_station","目的地"),
    SEAT_NUMBER ("seat_number","座位号"),
    PRICE ("price","价格"),
    CHECK ("check","检票口"),
    TICKET_ID ("ticket_id","火车票ID"),



//    invoice_code ("invoice_code","发票代码"),
//    invoice_number ("invoice_number","发票号码"),
    MONEY ("money","金额"),
//     date ("date","日期"),
    TIME ("time","时间"),
    TOLL_CODE  ("toll_code","车辆通行费代码"),
    TOLL_NUMBER  ("toll_number","车辆通行费号码"),

    //增值税专用发票
    VAT_SPECIAL_INVOICE("vat_special_invoice","01"),
    //机动车销售统一发票
    MOTOR_VEHICLE_SALE_INVOICE("motor_vehicle_sale_invoice","03"),
//    vat_transport_invoice("vat_transport_invoice","货物运输业增值税专用发票"),
    //增值税普通发票
    VAT_TRANSPORT_INVOICE("vat_transport_invoice","04"),
    //增值税电子普通发票
    VAT_ELECTRONIC_INVOICE("vat_electronic_invoice","10"),
//    vat_electronic_invoice("vat_electronic_invoice	区块链发票（需要结合 vat_invoice_zhuan_yong_flag字段综合判断"),
    //增值税普通发票（卷票）
    VAT_ROLL_INVOICE("vat_roll_invoice","11"),
    //增值税电子普通发票（通行费）
    VAT_ELECTRONIC_TOLL_INVOICE("vat_electronic_toll_invoice","14"),
    //二手车销售统一发票
    USED_CAR_PURCHASE_INVOICE("used_car_purchase_invoice","15"),
    //通用机打发票
    GENERAL_MACHINE_INVOICE("general_machine_invoice","97"),
    //通用定额发票
    QUOTA_INVOICE("quota_invoice","95"),
    PASSENGER_TRANSPORT_INVOICE("PASSENGER_TRANSPORT_INVOICE","旅客运输普票"),
    //公路客运发票
    HIGHWAY_PASSENGER_INVOICE("highway_passenger_invoice","94"),
    //船运客票
    SHIPPING_INVOICE("shipping_invoice","88"),
    //出租车发票
    TAXI_TICKET("taxi_ticket","91"),

    PARKING_INVOICE("highway_passenger_invoice","停车费发票"),
    //过路过桥费发票、汽车通行费
    VEHICLE_TOLL("vehicle_toll","98"),

//    MEDICAL_RECEIPT("highway_passenger_invoice","医疗费收据"),
//
//    EDUCATION_RECEIPT("highway_passenger_invoice","教育费收据"),
    //行程单
    AIR_TRANSPORT("air_transport","93"),
    //火车票
    TRAIN_TICKET("train_ticket","94"),
    //其它类型
    OTHER("other","00"),



//    invoice_number ("invoice_number","发票号码"),
//    money ("money","金额"),

    ;
    private String key;

    private String value;

    public String getValue() {
        return value;
    }

    public String getKey() {
        return key;
    }


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