//
//  codeSelected.m
//  Open
//
//  Created by gao on 2016/12/12.
//  Copyright © 2016年 黄江涛 . All rights reserved.
//

#import "codeSelected.h"
#import "MBProgressHUD+NJ.h"

@implementation codeSelected

-(instancetype)initMustTakeReturn:(NSInteger)returnCode
{
    self = [super init];
    if (self) {
        self.code =returnCode;
      
    }
    return self;

}
-(void)returnCodeMethod
{
    int codes= (int)self.code;
    switch (codes) {
            
        case 1:
           
            [SVProgressHUD showErrorWithStatus:@"社保信息照片验证已过期"];
            return;
        case 2:
            [SVProgressHUD showErrorWithStatus:@"查无信息"];
            return;
        case 3:
            [SVProgressHUD showErrorWithStatus:@"社保信息未验证"];
            return;
        case 4:
            [SVProgressHUD showErrorWithStatus:@"人脸不匹配"];
            return;
        case 5:
            [SVProgressHUD showErrorWithStatus:@"手机号码不正确"];
            return;
        case 7:
            [SVProgressHUD showErrorWithStatus:@"验证码错误"];
            return;
        case 11:
            [SVProgressHUD showErrorWithStatus:@"验证码错误"];
            return;
        case 12:
            [SVProgressHUD showErrorWithStatus:@"账号无效"];
            return;
        case 13:
            [SVProgressHUD showErrorWithStatus:@"账号密码错误"];
            return;
        case 18:
            [SVProgressHUD showErrorWithStatus:@"身份证照片在服务端保存失败"];
            return;
        case 21:
            [SVProgressHUD showErrorWithStatus:@"验证码失效"];
            return;
        case 22:
            [SVProgressHUD showErrorWithStatus:@"该区域不支持使用"];
            return;
        case 23:
            [SVProgressHUD showErrorWithStatus:@"不在认证期"];
            return;
        case 24:
            [SVProgressHUD showErrorWithStatus:@"姓名和身份证号不匹配"];
            return;
        case 25:
            [SVProgressHUD showErrorWithStatus:@"上次录制信息中的省份和本次录制中的不一样"];
            return;
        case 26:
            [SVProgressHUD showErrorWithStatus:@"当前时间段内认证的成功次数不够"];
            return;
        case 27:
            [SVProgressHUD showErrorWithStatus:@"个人的采集次数已达到上线"];
            return;
        case 28:
            [SVProgressHUD showErrorWithStatus:@"采集的信息审核中.."];
            return;
        case 29:
            [SVProgressHUD showErrorWithStatus:@"采集信息审核失败"];
            return;
        case 30:
            [SVProgressHUD showErrorWithStatus:@"此身份证已停止发放社保金"];
            return;
        case 31:
            [SVProgressHUD showErrorWithStatus:@"服务端不返回照片"];
            return;
        case 32:
            [SVProgressHUD showErrorWithStatus:@"采集成功但未认证"];
            return;
        case 33:
            [SVProgressHUD showErrorWithStatus:@"采集成功并且认证成功"];
            return;
        case 34:
            [SVProgressHUD showErrorWithStatus:@"采集成功并且在人工审核中"];
            return;
        case 35:
            [SVProgressHUD showErrorWithStatus:@"采集成功但认证失败了"];
            return;
        case 36:
            [SVProgressHUD showErrorWithStatus:@"该身份证号码已绑定了"];
            return;
        case 37:
            [SVProgressHUD showErrorWithStatus:@"该用户绑定的身份证号码数目已达上限"];
            return;
        case 38:

            [SVProgressHUD showErrorWithStatus:@"姓名身份证和公安部信息不匹配"];
            break;
        case 39:
            
            [SVProgressHUD showErrorWithStatus:@"姓名身份证和公安部信息匹配失败"];
            break;
        case 40:
            [SVProgressHUD showErrorWithStatus:@"身份证照和公安部照不匹配"];
            break;
        case 41:
            [SVProgressHUD showErrorWithStatus:@"照片不合格请重新拍摄"];
            break;
        case 42:
            [SVProgressHUD showErrorWithStatus:@"照片没有特征值，只能绿色通道认证"];
            break;

        case 1000:
            [SVProgressHUD showErrorWithStatus:@"网络繁忙请稍后使用"];
            return;
        case 1001:
            [SVProgressHUD showErrorWithStatus:@"姓名为空"];
            return;
        case 1002:
            [SVProgressHUD showErrorWithStatus:@"身份证号码为空"];
            return;
        case 1003:
            [SVProgressHUD showErrorWithStatus:@"签名为空"];
            return;
        case 1004:
            [SVProgressHUD showErrorWithStatus:@"签名信息不匹配"];
            return;
        case 1005:
            [SVProgressHUD showErrorWithStatus:@"地址找不到"];
            return;
        case 1006:
            [SVProgressHUD showErrorWithStatus:@"未知标识"];
            return;
        case 1007:
            [SVProgressHUD showErrorWithStatus:@"请返回拍身份证"];
            return;
        case 1008:
            [SVProgressHUD showErrorWithStatus:@"地址不匹配"];
            return;
        case 1009:
            [SVProgressHUD showErrorWithStatus:@"手机号码不匹配"];
            return;
        case 1010:
            [SVProgressHUD showErrorWithStatus:@"企业不匹配"];
            return;
        case 1011:
            [SVProgressHUD showErrorWithStatus:@"未知社保类型"];
            return;
        case 1012:
             SVProgressHUD.minimumDismissTimeInterval=2.0;
            [SVProgressHUD showErrorWithStatus:@"未找到人脸"];
            return;
            
        case 1013:
            [SVProgressHUD showErrorWithStatus:@"参保信息不匹配"];
            return;
        case 1015:
            [SVProgressHUD showErrorWithStatus:@"您人脸数据未采集,请联系所在地社保部门"];
            return;
        case 1016:
            [SVProgressHUD showErrorWithStatus:@"后台数据库保存失败"];
            return;
        case 1029:
              [SVProgressHUD showErrorWithStatus:@"已采集过,不能重复采集"];
            break;
        case 1030:
            [SVProgressHUD showErrorWithStatus:@"授权账号不存在"];
            break;

        case 1031:
            [SVProgressHUD showErrorWithStatus:@"首次使用填写手机号"];
            break;
        case 1032:
            [SVProgressHUD showErrorWithStatus:@"id与uid不匹配"];
            break;
        case 2001:
            [SVProgressHUD showErrorWithStatus:@"操作失败"];
            break;
        case 2002:
            [SVProgressHUD showErrorWithStatus:@"网络繁忙请稍后使用"];
            break;
        case 2003:
            [SVProgressHUD showErrorWithStatus:@"该公司不存在"];
            break;
        case 2004:
            [SVProgressHUD showErrorWithStatus:@"该公司已录入"];
            break;
        case 2005:
            [SVProgressHUD showErrorWithStatus:@"没有找到地址"];
            break;

        case 2006:
            [SVProgressHUD showErrorWithStatus:@"请返回拍身份证"];
            break;
        case 2007:
            [SVProgressHUD showErrorWithStatus:@"数据库创建表失败"];
            break;
        case 2010:
            [SVProgressHUD showErrorWithStatus:@"用户已采集完毕"];
            break;
        case 3000:
            break;
        case 9003:
            [SVProgressHUD showErrorWithStatus:@"密码错误次数已达上限制，请24小时后再试"];
            break;
        case 9004:
            [SVProgressHUD showErrorWithStatus:@"验证码错误次数过多,请30分钟后再试!"];
            break;
        case 9998:
            [SVProgressHUD showErrorWithStatus:@"服务器繁忙"];
            break;
            
            
        case 9999:
            [SVProgressHUD showErrorWithStatus:@"服务器异常,错误码:9999"];
            break;
    
        default:
            [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"服务器异常,错误码:%d",codes]];
            break;
    }

}
-(void)returnCodeMethod2
{
    int codes= (int)self.code;
    switch (codes) {
            
        case 1:
            
            [MBProgressHUD showError:@"社保信息照片验证已过期"];
            return;
        case 2:
            [MBProgressHUD showError:@"查无信息"];
            return;
        case 3:
            [MBProgressHUD showError:@"社保信息未验证"];
            return;
        case 4:
            [MBProgressHUD showError:@"人脸不匹配"];
            return;
        case 5:
            [MBProgressHUD showError:@"手机号码不正确"];
            return;
        case 7:
            [MBProgressHUD showError:@"验证码为空"];
            return;
        case 8:
            [MBProgressHUD showError:@"密码为空"];
            return;
        case 10:
            [MBProgressHUD showError:@"该手机号已经注册了"];
            return;
        case 11:
            [MBProgressHUD showError:@"验证码错误"];
            return;
        case 12:
            [MBProgressHUD showError:@"账号无效请注册"];
            return;
        case 13:
            [MBProgressHUD showError:@"账号密码错误"];
            return;
        case 18:
            [MBProgressHUD showError:@"身份证照片在服务端保存失败"];
            return;
        case 21:
            [MBProgressHUD showError:@"验证码失效"];
            return;
        case 22:
            [MBProgressHUD showError:@"该区域不支持使用"];
            return;
        case 23:
            [MBProgressHUD showError:@"不在认证期"];
            return;
        case 24:
            [MBProgressHUD showError:@"姓名和身份证号不匹配"];
            return;
        case 25:
            [MBProgressHUD showError:@"上次录制信息中的省份和本次录制中的不一样"];
            return;
        case 26:
            [MBProgressHUD showError:@"当前时间段内认证的成功次数不够"];
            return;
        case 27:
            [MBProgressHUD showError:@"个人的采集次数已达到上线"];
            return;
        case 28:
            [MBProgressHUD showError:@"采集的信息审核中.."];
            return;
        case 29:
            [MBProgressHUD showError:@"采集信息审核失败"];
            return;
        case 30:
            [MBProgressHUD showError:@"此身份证已停止发放社保金"];
            return;
        case 31:
            [MBProgressHUD showError:@"服务端不返回照片"];
            return;
        case 32:
            [MBProgressHUD showError:@"采集成功但未认证"];
            return;
        case 33:
            [MBProgressHUD showError:@"采集成功并且认证成功"];
            return;
        case 34:
            [MBProgressHUD showError:@"采集成功并且在人工审核中"];
            return;
        case 35:
            [MBProgressHUD showError:@"采集成功但认证失败了"];
            return;
        case 36:
            [MBProgressHUD showError:@"该身份证号码已绑定了"];
            return;
        case 37:
            [MBProgressHUD showError:@"该用户绑定的身份证号码数目已达上限"];
            return;
        case 38:
            
            [MBProgressHUD showError:@"姓名身份证和公安部信息不匹配"];
            break;
        case 39:
            
            [MBProgressHUD showError:@"姓名身份证和公安部信息匹配失败"];
            break;
        case 40:
            [MBProgressHUD showError:@"身份证照和公安部照不匹配"];
            break;
        case 41:
            [MBProgressHUD showError:@"照片不合格请重新拍摄"];
            break;
        case 42:
            [MBProgressHUD showError:@"照片没有特征值，只能绿色通道认证"];
            break;
            
        case 1000:
            [MBProgressHUD showError:@"网络繁忙请稍后使用"];
            return;
        case 1001:
            [MBProgressHUD showError:@"姓名为空"];
            return;
        case 1002:
            [MBProgressHUD showError:@"身份证号码为空"];
            return;
        case 1003:
            [MBProgressHUD showError:@"签名为空"];
            return;
        case 1004:
            [MBProgressHUD showError:@"签名信息不匹配"];
            return;
        case 1005:
            [MBProgressHUD showError:@"地址找不到"];
            return;
        case 1006:
            [MBProgressHUD showError:@"未知标识"];
            return;
        case 1007:
            [MBProgressHUD showError:@"请返回拍身份证"];
            return;
        case 1008:
            [MBProgressHUD showError:@"地址不匹配"];
            return;
        case 1009:
            [MBProgressHUD showError:@"手机号码不匹配"];
            return;
        case 1010:
            [MBProgressHUD showError:@"企业不匹配"];
            return;
        case 1011:
            [MBProgressHUD showError:@"未知社保类型"];
            return;
        case 1012:
            [MBProgressHUD showError:@"未找到人脸"];
            return;
            
        case 1013:
            [MBProgressHUD showError:@"参保信息不匹配"];
            return;
        case 1015:
            [MBProgressHUD showError:@"您人脸数据未采集,请联系所在地社保部门"];
            return;
        case 1016:
            [MBProgressHUD showError:@"后台数据库保存失败"];
            return;
        case 1029:
            [MBProgressHUD showError:@"已采集过,不能重复采集"];
            break;
        case 1030:
            [MBProgressHUD showError:@"授权账号不存在"];
            break;
            
        case 1031:
            [MBProgressHUD showError:@"首次使用填写手机号"];
            break;
        case 1032:
            [MBProgressHUD showError:@"id与uid不匹配"];
            break;
        case 2001:
            [MBProgressHUD showError:@"操作失败"];
            break;
        case 2002:
            [MBProgressHUD showError:@"网络繁忙请稍后使用"];
            break;
        case 2003:
            [MBProgressHUD showError:@"该公司不存在"];
            break;
        case 2004:
            [MBProgressHUD showError:@"该公司已录入"];
            break;
        case 2005:
            [MBProgressHUD showError:@"没有找到地址"];
            break;
            
        case 2006:
            [MBProgressHUD showError:@"请返回拍身份证"];
            break;
        case 2007:
            [MBProgressHUD showError:@"数据库创建表失败"];
            break;
        case 2010:
            [MBProgressHUD showError:@"用户已采集完毕"];
            break;
        case 3000:
            
            break;
        case 9003:
            [SVProgressHUD showErrorWithStatus:@"密码错误次数已达上限制，请24小时后再试"];
            break;
        case 9004:
            [SVProgressHUD showErrorWithStatus:@"验证码错误次数过多,请30分钟后再试!"];
            break;
        case 9998:
            [MBProgressHUD showError:@"服务器繁忙"];
            break;
            
            
        case 9999:
            [SVProgressHUD showErrorWithStatus:@"服务器异常,错误码:9999"];
            break;
        
    
        default:
            [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"服务器异常,错误码:%d",codes]];
            break;
    }
    
}

-(void)returnCodeMethod3:(NSString *)message
{
    int codes= (int)self.code;
    switch (codes) {
            
        case 1:
            
            [MBProgressHUD showError:@"社保信息照片验证已过期"];
            return;
        case 2:
            [MBProgressHUD showError:@"查无信息"];
            return;
        case 3:
            [MBProgressHUD showError:@"社保信息未验证"];
            return;
        case 4:
            [MBProgressHUD showError:@"人脸不匹配"];
            return;
        case 5:
            [MBProgressHUD showError:@"手机号码不正确"];
            return;
        case 7:
            [MBProgressHUD showError:@"验证码为空"];
            return;
        case 8:
            [MBProgressHUD showError:@"密码为空"];
            return;
        case 10:
            [MBProgressHUD showError:@"该手机号已经注册了"];
            return;
        case 11:
            [MBProgressHUD showError:@"验证码错误"];
            return;
        case 12:
            [MBProgressHUD showError:@"账号无效请注册"];
            return;
        case 13:
            [MBProgressHUD showError:@"密码错误"];
            return;
        case 18:
            [MBProgressHUD showError:@"身份证照片在服务端保存失败"];
            return;
        case 21:
            [MBProgressHUD showError:@"验证码失效"];
            return;
        case 22:
            [MBProgressHUD showError:@"该区域不支持使用"];
            return;
        case 23:
            [MBProgressHUD showError:@"不在认证期"];
            return;
        case 24:
            [MBProgressHUD showError:@"姓名和身份证号不匹配"];
            return;
        case 25:
            [MBProgressHUD showError:@"上次录制信息中的省份和本次录制中的不一样"];
            return;
        case 26:
            [MBProgressHUD showError:@"当前时间段内认证的成功次数不够"];
            return;
        case 27:
            [MBProgressHUD showError:@"个人的采集次数已达到上线"];
            return;
        case 28:
            [MBProgressHUD showError:@"采集的信息审核中.."];
            return;
        case 29:
            [MBProgressHUD showError:@"采集信息审核失败"];
            return;
        case 30:
            [MBProgressHUD showError:@"此身份证已停止发放社保金"];
            return;
        case 31:
            [MBProgressHUD showError:@"服务端不返回照片"];
            return;
        case 32:
            [MBProgressHUD showError:@"采集成功但未认证"];
            return;
        case 33:
            [MBProgressHUD showError:@"采集成功并且认证成功"];
            return;
        case 34:
            [MBProgressHUD showError:@"采集成功并且在人工审核中"];
            return;
        case 35:
            [MBProgressHUD showError:@"采集成功但认证失败了"];
            return;
        case 36:
            [MBProgressHUD showError:@"该身份证号码已绑定了"];
            return;
        case 37:
            [MBProgressHUD showError:@"该用户绑定的身份证号码数目已达上限"];
            return;
        case 38:
            
            [MBProgressHUD showError:@"姓名身份证和公安部信息不匹配"];
            break;
        case 39:
            
            [MBProgressHUD showError:@"姓名身份证和公安部信息匹配失败"];
            break;
        case 40:
            [MBProgressHUD showError:@"身份证照和公安部照不匹配"];
            break;
        case 41:
            [MBProgressHUD showError:@"照片不合格请重新拍摄"];
            break;
        case 42:
            [MBProgressHUD showError:@"照片没有特征值，只能绿色通道认证"];
            break;
            
        case 1000:
            [MBProgressHUD showError:@"网络繁忙请稍后使用"];
            return;
        case 1001:
            [MBProgressHUD showError:@"姓名为空"];
            return;
        case 1002:
            [MBProgressHUD showError:@"身份证号码为空"];
            return;
        case 1003:
            [MBProgressHUD showError:@"签名为空"];
            return;
        case 1004:
            [MBProgressHUD showError:@"签名信息不匹配"];
            return;
        case 1005:
            [MBProgressHUD showError:@"地址找不到"];
            return;
        case 1006:
            [MBProgressHUD showError:@"未知标识"];
            return;
        case 1007:
            [MBProgressHUD showError:@"请返回拍身份证"];
            return;
        case 1008:
            [MBProgressHUD showError:@"地址不匹配"];
            return;
        case 1009:
            [MBProgressHUD showError:@"手机号码不匹配"];
            return;
        case 1010:
            [MBProgressHUD showError:@"企业不匹配"];
            return;
        case 1011:
            [MBProgressHUD showError:@"未知社保类型"];
            return;
        case 1012:
            [MBProgressHUD showError:@"未找到人脸"];
            return;
            
        case 1013:
            [MBProgressHUD showError:@"参保信息不匹配"];
            return;
        case 1015:
            [MBProgressHUD showError:@"您人脸数据未采集,请联系所在地社保部门"];
            return;
        case 1016:
            [MBProgressHUD showError:@"后台数据库保存失败"];
            return;
        case 1029:
            [MBProgressHUD showError:@"已采集过,不能重复采集"];
            break;
        case 1030:
            [MBProgressHUD showError:@"授权账号不存在"];
            break;
            
        case 1031:
            [MBProgressHUD showError:@"首次使用填写手机号"];
            break;
        case 1032:
            [MBProgressHUD showError:@"id与uid不匹配"];
            break;
        case 2001:
            [MBProgressHUD showError:@"操作失败"];
            break;
        case 2002:
            [MBProgressHUD showError:@"网络繁忙请稍后使用"];
            break;
        case 2003:
            [MBProgressHUD showError:@"该公司不存在"];
            break;
        case 2004:
            [MBProgressHUD showError:@"该公司已录入"];
            break;
        case 2005:
            [MBProgressHUD showError:@"没有找到地址"];
            break;
            
        case 2006:
            [MBProgressHUD showError:@"请返回拍身份证"];
            break;
        case 2007:
            [MBProgressHUD showError:@"数据库创建表失败"];
            break;
        case 2010:
            [MBProgressHUD showError:@"用户已采集完毕"];
            break;
        case 3000:
            
            break;
        case 9003:
            [SVProgressHUD showErrorWithStatus:@"密码错误次数已达上限制，请24小时后再试"];
            break;
        case 9004:
            [SVProgressHUD showErrorWithStatus:@"验证码错误次数过多,请30分钟后再试!"];
            break;
        case 9998:
            [MBProgressHUD showError:@"服务器繁忙"];
            break;
        
            
        
        default:{
            if ([Tools isBlankString:message]) {
                [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"服务器异常,错误码:%d",codes]];
                break;
            }else{
                [SVProgressHUD showErrorWithStatus:message];
                break;
            }
        }
            
    }
    
}




+(instancetype)MustTakeReturn:(NSInteger)returnCode
{
return [[codeSelected alloc]initMustTakeReturn:returnCode];
}
@end
