package com.jianshui.common.enums;


/**
 * 错误码表
 */
public enum ErrorCode {


    /****************** 通用错误/系统错误 *****************/
    // 参数类型错误
    PARAM_TYPE_ERROR("000001", "参数类型错误"),
    PARAM_MISS_ERROR("000002", "必传参数缺失"),
    COMMON_ERROR("000003", "系统错误，请联系管理员"),
    DECRYPT_ERROR("000004", "平台解密失败，请检查加密内容！"),
    JNKEY_MISSING("000005", "密钥不存在，请联系管理员！"),
    EMPTY_PARAMS("000006", "报文不能为空！"),
    ERROR_PARAMS("000007", "报文格式错误！"),
    EMPTY_IDENTITY("000008", "身份认证参数为空！"),
    COMPANY_NOT_FOUND("000009", "企业信息不存在！"),
    TAXCODE_NOT_FOUNC("000010", "未传输企业税号！"),
    IDENTITY_NOT_MATCH("000011", "企业资质不匹配！"),
    IDENTITY_NOT_SET("000011", "企业未授权，请联系管理员！"),
    METHOD_NOT_EXISTS("000012", "请求接口不存在！"),


    /****************** 销项webservice错误 *****************/
    INVOICE_ERROR("100000", "销项错误"),
    INVOICE_ALREADE_SIGNED("100001", "发票已签章"),
    ERROR_INVOICELINE("100002", "发票类型错误，请检查"),
    ERROR_DATE_FORMAT("100003", "时间格式错误，请检查"),
    ERROR_TSFS("100004", "交付标志必须为1或者0"),
    ERROR_STATUS("100005","发票未交付"),
    ERROR_RETURN_CODEING("1000","交付中"),
    ERROR_RETURN_CODETUREING("2000","交付成功，等待获取送达报告"),
    ERROR_RETURN_CODEFALSE("2001","交付失败"),
    ERROR_RETURN_CODETUREFALSE("3001","交付成功，确认送达失败"),
    ERROR_BUILD_INVOICELINE("100006","电子签章接口只支持电子票"),
    ERROR_BUILD_INVOICE("100007","发票不为未签章或签章失败状态"),
    ERROR_BUILD_INVOICENUM("100008","发票不唯一"),
    BILLINFO_ERROR("100009","报文格式错误"),
    ORDER_EXPIRED("100010","订单已过期，请重新点击开票"),
    ORDER_FPQQLSH_NOT_EMPTY("100011","订单编号或发票请求流水号不能为空！"),
    EMPTY_FPQQLSH("100012","请求流水号不能为空！"),
    INVOICE_NOT_EXISTS("100013","发票不存在！"),
    EMPTY_REDINFO_NO("100014","红字信息表编号不能为空！"),
    ORDER_EXISTS("100015","发票订单已存在！"),


    /****************** 进行incoime错误 *****************/
    INCOME_ERROR("200000", "进项错误"),

    INCOME_KEY_ERROR("200001", "检查系统配置 key/app secret，请联系管理员！"),


    /****************** 支付pay错误 *****************/
    PAY_ERROR("300000", "支付错误"),

    /****************** 消息模块 *****************/
    MESSAGEDTO_DATA_ERROR("400000", "消息实体类型错误");


    private final String code;
    private final String msg;

    ErrorCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getMsg() {
        return this.msg;
    }

    public String getCode() {
        return code;
    }
}
