package org.springblade.modules.app.constant;

import com.wn.common.exception.LocalError;

public enum ErrorCode implements LocalError {
    /**
     * 错误码类型
     */
    SAVE_DATA_INTO_DB_ERROR(10001, "保存数据异常"),
    DELETE_BATCH_DATA_INTO_DB_ERROR(11001, "批量删除数据异常"),
    DELETE_DATA_INTO_DB_ERROR(11002, "批量删除数据异常"),
    DELETE_DATA_ERROR(11003, "删除数据异常"),
    UPDATE_DATA_ERROR(11004, "修改数据异常"),
    INPUT_PARAMETERS_NULL(10002, "传入的参数为空"),
    INPUT_PARAMETERS_INVALID(10003, "传入的参数非法"),
    IP_WHITES_NULL(10004, "ip白名单为空"),
    ILLEGAL_REQUEST(10005, "请求非法"),
    EMAIL_SEND_EXP(10006, "发送邮件失败"),
    SYS_EXP(10007, "系统异常"),
    UPDATE_DATA_EXP(10008, "更新数据异常"),
    DELETE_DATA_EXP(10009, "删除数据异常"),


    CHANNEL_CODE_NULL(11000, "渠道账号为空"),
    SIGN_NULL(11001, "签名为空"),


    NO_POWER_GET(12001, "非关联数据，无权限进行此操作"),
    NO_EQUALS_PHONE(12002, "请输入新的手机号"),
    AUTH_PHONE_REG_UNMATCH(12003, "请输入正确的手机号码"),
    AUTH_PASSWORD_REG_UNMATCH(12003, "请输入正确的密码"),
    SMS_COUNT_LIMIT_OVER(12004, "您今日获取验证码超过上限，请明日再试。"),
    LOGIN_PHONE_NULL(12005, "登录手机号码为空"),
    USER_SMS_CODE_NULL(12006, "短信验证码为空"),
    USER_SMS_CODE_ERROR(12007, "短信验证码已失效"),
    USER_IS_NOT_REGISTERED(12008, "用户未注册"),
    USER_IS_REGISTERED(12009, "用户已注册"),
    USER_IS_REGISTERED_IN_ZMT(12009, "用户未在浙牧通注册"),
    USER_IS_DISABLE(12009, "用户已禁用"),
    USER_IS_APPLY(12009, "用户审批中"),
    USER_IS_PASS(12009, "用户已注册成功"),
    USER_PHONE_NULL(12010, "手机号码为空"),
    USER_CREDIT_CODE_NULL(12011, "社会统一信用证代码为空"),
    USER_ID_CODE_NULL(12012, "身份证号码为空"),
    USER_COMPANY_NAME_NULL(12013, "企业名称为空"),
    USER_NAME_NULL(12014, "姓名为空"),
    SUBMIT_LOCATION_EXP(12014, "定位信息异常"),
    USER_LINK_NAME_NULL(12015, "联系人名称为空"),
    USER_BUSINESS_URL_NULL(12016, "营业执照为空"),
    USER_BUSINESS_CATEGORY_NULL(12017, "行业类别为空"),
    USER_PASSWORD_NULL(12018, "用户密码为空"),
    USER_CONFIRM_PASSWORD_NULL(12018, "用户确认密码为空"),
    USER_CONFIRM_PASSWORD_ERROR(12018, "用户密码不一致"),
    USER_PROV_NULL(12018, "用户省份信息为空"),
    USER_CITY_NULL(12019, "用户市区信息为空"),
    USER_AREA_NULL(12020, "用户地区信息为空"),
    USER_ADDRESS_NULL(12021, "用户地址信息为空"),
    USER_BUSINESS_ADDRESS_NULL(12022, "经营场所为空"),
    USER_BUSINESS_LEGAL_NULL(12023, "法定代表人为空"),
    USER_BUSINESS_TERM_NULL(12024, "营业期限为空"),
    USER_BUSINESS_SCOPE_NULL(12025, "经营范围为空"),
    USER_LIVESTOCK_PREVENTION_PASS_CODE_NULL(12026, "动物防疫条件合格证编码为空"),
    USER_LIVESTOCK_PREVENTION_PASS_URL_NULL(12027, "动物防疫条件合格证图片为空"),
    USER_ID_CARD_FRONT_URL_NULL(12028, "身份证正面图片为空"),
    USER_ID_CARD_BEHIND_URL_NULL(12029, "身份证反面图片为空"),
    USER_LIVESTOCK_SLAUGHTER_PERMIT_URL_NULL(12030, "生猪定点屠宰许可证图片为空"),
    USER_LIVESTOCK_SLAUGHTER_PERMIT_CODE_NULL(12031, "生猪定点屠宰许可证编码为空"),
    USER_POLLUTANT_DISCHARGE_PERMIT_CODE_NULL(12032, "排污许可证编码为空"),
    USER_POLLUTANT_DISCHARGE_PERMIT_INDUSTRY_NULL(12033, "排污许可证行业类别为空"),
    NO_EPIDEMICPROOF_PASS_NULL(12033, "三年无疫情证明为空"),
    NO_BREED_CODE_PASS_NULL(12033, "畜禽养殖代码"),
    USER_POLLUTANT_DISCHARGE_PERMIT_DATE_NULL(12034, "排污许可证有效期为空"),
    USER_POLLUTANT_DISCHARGE_PERMIT_LICENSE_URL_NULL(12035, "排污许可证图片为空"),
    USER_DRIVER_LICENSE_URL_NULL(12036, "驾驶证图片为空"),
    USER_DRIVER_LICENSE_CODE_NULL(12037, "驾驶证编码为空"),
    USER_DRIVER_LICENSE_CAR_TYPE_NULL(12038, "驾驶证准驾车型为空"),
    USER_DRIVER_LICENSE_EXPIRY_DATE_NULL(12039, "驾驶证有效期为空"),
    USER_VEHICLE_LICENSE_URL_NULL(12040, "行驶证图片为空"),
    USER_VEHICLE_LICENSE_CODE_NULL(12041, "行驶证编码为空"),
    USER_TRANSPORT_PERMIT_URL_NULL(12042, "道路运输许可证图片为空"),
    USER_TRANSPORT_PERMIT_CODE_NULL(12043, "道路运输许可证编码为空"),
    USER_SLAUGHTER_HOUSE_TYPE_NULL(12044, "注册用户类型为空"),
    USER_SLAUGHTER_HOUSE_PARENT_NULL(12045, "挂靠的屠宰户为空"),
    SLAUGHTER_IS_NULL(12046, "屠宰场信息无法查到，请重新填写"),
    AGENT_IS_NULL(12047, "经纪人信息无法查到，请重新填写"),
    DRIVER_IS_NULL(12048, "司机信息无法查到，请重新填写"),
    SLAUGHTER_HOUSE_IS_NULL(12049, "代宰户信息无法查到，请重新填写"),
    NO_CONTRACT_FARM(12050, "不存在已签约的养殖场"),
    FARM_NOT_CONTRACT(12051, "养殖场未签约"),
    PLAN_NUM_EMPTY(12052, "计划数量为空"),
    PLAN_TIME_EMPTY(12053, "计划调入时间为空"),
    FARM_INFO_EMPTY(12054, "养殖场信息为空"),
    FARM_IS_EMPTY(12054, "养殖场不存在"),
    FARM_IS_EXP(12054, "养殖场信息异常"),
    SLAUGHTER_HOUSE_IS_EMPTY(12055, "屠宰户信息为空"),
    SLAUGHTER_IS_EXP(12055, "屠宰场信息异常"),
    USER_IS_NOT_PASS(12056, "用户未通过审核"),
    VERIFY_INFO_IS_EMPTY(12057, "检验站信息为空"),
    VERIFY_INFO_NOT_EXIT(12058, "检验站不存在"),
    APPLY_TYPE_ERROR(12059, "审批类型异常"),
    WAYBILL_INFO_EMPTY(12060, "调运单不存在"),
    ORDER_INFO_STATE_ERROR(12061, "调运单状态异常"),
    APPLY_STATE_ERROR(12062, "审批状态异常"),
    ORDER_INFO_NOT_ENOUGH(12063, "调运单信息不全"),
    TRANSPORT_INFO_NULL(12064, "运输单不存在"),
    APPLY_NULL(12065, "审批信息异常"),
    MEMBER_NOT_EXIST(12066, "账号不存在"),
    LOGIN_OUT_FAIL(12067, "退出登录失败，请重试"),
    USER_IS_EXP(12068, "用户非法"),
    TRANSPORT_IS_EXP(12069, "运输单信息异常"),
    DRIVER_STATE_EXP(12070, "司机信息异常"),
    TRANSPORT_WAYBILL_INFO_EMPTY(12071, "运输单关联调运单不存在"),
    TRANSPORT_USER_IS_EXP(12072, "调运单用户信息异常"),
    WAYBILL_INFO_EXP(12073, "调运单信息异常"),
    WAYBILL_HAVING_TRANSPORT(12074, "调运单已创建运输单"),
    PICTURE_TYPE_ERROR(12075, "附件信息类型异常"),
    APPLY_MESSAGE_NULL(12076, "驳回原因为空"),
    TRANSPORT_INFO_EXP(12077, "运输单状态异常"),
    USER_STATE_EXP(12077, "用户状态异常"),
    NEW_USER_PASSWORD(12078, "请输入新的用户密码"),
    ACCOUNT_NOT_FOUND_EXP(12079, "用户名或密码不正确"),
    PASSWORD_NULL(12080, "密码为空"),
    LOGIN_PAUSE_COUNT_LIMIT_OVER(12081, "错误次数达到上限"),
    SIGN_CHECK_EXP(12082, "签名校验异常"),
    ZMT_RECORD_ERROR(12083, "浙牧通备案异常"),
    //此信息，标识养殖场未在我方进行注册，输出对应信息，不能做一般异常进行使用
    FARM_IS_NOT_REGISTERED(12099, "养殖场未注册"),
    ORDER_INFO_STATE_NOT_FINISH(12100, "调运单状态必须是已完成之前"),
    ORDER_INFO_MAST_CREATOR(12101, "必须是创建用户才可以操作"),
    ORDER_INFO_UPDATE_FAIL(12102, "调运单更新失败"),
    APPLY_DELETE_FAIL(12103, "审批信息删除失败"),
    ORDER_INFO_DELETE_STATE_ERROR(12104, "调运单只有撤销状态可以删除"),
    ORDER_INFO_DELETE_FAIL(12105, "调运单删除失败"),
    TRANSPORT_STATE_NOT_UNCHECK(12106, "运输单必须是待确认状态"),
    TRANSPORT_UPDATE_FAIL(12107, "运输单更新失败"),

    SIGN_ACCOUNT_FAIL(12507, "签约失败"),
    USER_PERMISSION(12508, "不允许操作"),
    ACCOUNT_EXISTS(12509, "账号已存在"),
    CANCEL_ACCOUNT_FAIL(12510, "解约失败"),
    ORDER_FAIL(12511, "订单生成失败"),
    ACCOUNT_NOT_EXISTS(12512, "账户不存在"),
    ACCOUNT_NOT_PERMIT(12513, "账户无权限"),

    TIMESTAMP_EXPIRED(13001, "时间戳过期"),
    VERIFY_SIGN_ERROR(13002, "校验签名错误"),
    DATA_DECODE_ERROR(13003, "数据3des解密异常"),


    STAT_STATR_END_ISNULL(14001, "有效期开始和结束时间必须都填写"),

    RELATION_ISNULL(15001, "代、屠绑定关系不存在"),
    RELATION_DELETE_FAIL(15002, "代、屠绑定关系删除失败"),
    RELATION_LOG_INSERT_FAIL(15003, "代、屠绑定关系记录插入失败"),
    RELATION_UPDATE_FAIL(15004, "代、屠绑定关系更新失败"),
    RELATION_INSERT_FAIL(15005, "代、屠绑定关系保存失败"),
    RELATION_IS_EXISTED(15006, "代、屠绑定关已存在"),
    RELATION_STATE_IS_ERROR(15007, "代、屠绑定关系状态不对，不能操作"),

    PROBLEM_BACK_CONTENT_TOOLONG(16001, "意见反馈内容不能超过500"),
    PROBLEM_BACK_INSERT_FAIL(16002, "意见反馈保存失败"),
    PROBLEM_BACK_ISNULL(16003, "意见反馈信息不存在"),

    PARAM_DATA_NULL(10001, "请求数据为空"),
    FILE_UPLOAD_FAIL(10011, "图片上传失败"),
    FILE_READ_FAIL(20001, "没有读取到文件"),
    RULE_READ_FAIL(20002, "读取匹配规则失败"),
    RULE_READ_NOT_EXIST(20003, "设置的匹配字段在文件中不存在"),

    CAPTCHA_TYPE_NULL(11101, "验证码类型为空"),
    CAPTCHA_POINT_JSON_NULL(11102, "加密坐标信息为空"),
    CAPTCHA_TOKEN_NULL(11103, "token为空"),
    PARSE_FILE_ERROR(11104, "解析文件异常"),
    CAPTCHA_VERIFICATION_NULL(11105, "二次验证加密数据为空"),
    ;


    private int code;

    private String message;

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

    @Override
    public String getCode() {
        return code + "";
    }

    @Override
    public String getMessage() {
        return message;
    }

}
