//
//  PersonGatherJobNetManager.m
//  Open
//
//  Created by 看看智能 on 2018/1/6.
//  Copyright © 2018年 黄江涛 . All rights reserved.
//

#import "PersonGatherJobNetManager.h"

@implementation PersonGatherJobNetManager
+(id)getQITA:(NSInteger)idcard selfImage:(NSString*)selfImage andCollectIamge:(NSString *)collectImage
andTrainType:(NSInteger)TrainType//培训就业需求
andemployeeExtension:(NSString*)employeeExtension  //就业意向
andWorkAddress:(NSInteger)WorkAddressExtension //理想就业地
andmouthIncomeExtension:(NSInteger)mouthIncomeExtension //理想月工资
andWorlStyle:(NSInteger)workStyle//工作方式
andWorkTypeExtension:(NSString*)WorkTypeExtension//意向工种
andpeixunGrank:(NSInteger)peixunGrank//培训等级
andentrepreneurialExtension:(NSString*)entrepreneurialExtension  //创业意向
andDreamAddress:(NSString*)dreamAddress
completionHandle:(void (^)(PersonJob *, NSError *))complete
{
    NSString *idcarddddd = [[NSUserDefaults standardUserDefaults] objectForKey:@"jobPersonID"];
    if (!idcarddddd) {
        idcarddddd =[NSNull null];
    }
    NSLog(@"%@",idcarddddd);
    NSArray * arrayHJT =  [HJTsqlite selectData:2 andModel:[citySqliteModel class] andName:@"CityId"];
    if ( arrayHJT.count == 0) {
        return  nil;
    }
    citySqliteModel *mdoels  =arrayHJT[0];
    
    __block   NSString * pathNew_1 =[IPXIAODAIJOB stringByAppendingString:@"/employmentserver/kankan/insertNeEmployee"];
    NSInteger baseID = [[NSUserDefaults standardUserDefaults] integerForKey:@"jobBaseID"];
    if (baseID == 0) {
        return nil;
    }
    if (!dreamAddress || [dreamAddress isEqualToString:@"理想就业地:_____________"]) {
        dreamAddress =[NSNull null];
    }
    if (!selfImage) {
        selfImage =[NSNull null];
    }
    if (!collectImage) {
        collectImage =[NSNull null];
    }
    if (!employeeExtension) {
        employeeExtension =  [NSNull null];
    }
    if (!WorkTypeExtension) {
        WorkTypeExtension =  [NSNull null];
    }
    if (!entrepreneurialExtension) {
        entrepreneurialExtension =  [NSNull null];
    }
    if (!mdoels.StaticdownTown) {
        mdoels.StaticdownTown =  [NSNull null];
    }
    if (!mdoels.Staticarea) {
        mdoels.Staticarea =  [NSNull null];
    }
    if (!mdoels.StaticVillage) {
        mdoels.StaticVillage =  [NSNull null];
    }
    if (!TrainType) {
        TrainType =0;
    }
    if (!WorkAddressExtension) {
        WorkAddressExtension =0;
    }
    if (!mouthIncomeExtension) {
        mouthIncomeExtension =  0;
    }
    if (!workStyle) {
        workStyle =  0;
    }
    if (!peixunGrank) {
        peixunGrank = 0;
    }
    NSDictionary *dict1 = nil;
        NSLog(@"%@",idcarddddd);
    dict1 =@{
             @"flag":@2,
             @"idcard":idcarddddd,
             
             @"baseId":@(baseID),
             
             @"loginId":@([getPeopleID PeopleID]),
             
             @"neverEmployedtype":@(idcard),
             @"selfSignatureImage": selfImage,
             @"collectorImage" : collectImage,
             @"city":mdoels.StaticdownTown,
             @"county":mdoels.Staticarea,
             @"town":mdoels.StaticVillage,
             //新增
             @"eduWorkCommand":@(TrainType),
             @"workIntend":employeeExtension,
             @"dreamWorkAddress":@(WorkAddressExtension),
             @"dreamSalary":@(mouthIncomeExtension),
             @"workStyle":@(workStyle),
             @"workerType":WorkTypeExtension,
             @"eduGrade":@(peixunGrank),
             @"createCompanyIntend":entrepreneurialExtension,
            @"dreamAddress":dreamAddress
             
             
             };
    NSLog(@"%@",dict1);
    
    
    
    
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [PersonJob mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
    
    
    
    
    
}



+(id)getPANDUANBase:(NSString *)publishName  completionHandle:(void (^)(PersonJob *, NSError *))complete{
    
    NSArray * arrayHJT =  [HJTsqlite selectData:2 andModel:[citySqliteModel class] andName:@"CityId"];
    if ( arrayHJT.count == 0) {
        return  nil;
    }
    citySqliteModel *mdoels  =arrayHJT[0];
    
    __block   NSString * pathNew_1 =[IPJOB stringByAppendingString:@"/user/state"];
    NSDictionary *dict1 = nil;
    dict1 =@{
             @"terminal":@2,
             @"idcard":[EnercryTool A:publishName],
             @"city":mdoels.StaticdownTown,
             @"county":mdoels.Staticarea
   
             };
    NSLog(@"%@",dict1);
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [PersonJob mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
    
    
    
}

//个人采集第一个接口
+(id)getUserBase:(NSString *)publishName andtelphone:(NSString *)telphone  andregisterName:(NSString *)registerName andidcard:(NSString *)idcard andbirthday:(NSInteger )birthday andGender:(NSInteger)gender andnation:(NSInteger)nation andPicture:(NSString *)picture andAddress:(NSString*)adderss completionHandle:(void (^)(PersonJob *, NSError *))complete
{
   //
        NSArray * arrayHJT =  [HJTsqlite selectData:2 andModel:[citySqliteModel class] andName:@"CityId"];
        if ( arrayHJT.count == 0) {
           return  nil;
        }
                citySqliteModel *mdoels  =arrayHJT[0];

    if(!picture){
        picture = [NSNull null];
    }

    
    
    __block   NSString * pathNew_1 =[IPJOB stringByAppendingString:@"/user/base"];
    NSDictionary *dict1 = nil;

    
        dict1 =@{
                 @"terminal":@2,
                 @"telphone": [EnercryTool A:telphone],
                 @"registerName":[EnercryTool A:registerName],
                 @"idcard":[EnercryTool A:idcard],
                 @"birthday":@(birthday),
                 @"gender":@(gender),
                 @"nation":@(nation),
                 @"picture":picture,
                 @"householdRegister":adderss,
                 @"city":mdoels.StaticdownTown,
                 @"county":mdoels.Staticarea,
                 @"login":@([getPeopleID PeopleID])
                 };
    NSLog(@"%@",picture);
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [PersonJob mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
    
}


+(id)getUserAdddBaseId:(NSInteger)baseId //用户id由第一个接口上传回来的
             andIDCard:(NSString*)IDCard
   andIsSocialSecurity:(NSInteger)isSocialSecurity //是否参保
 andsocialSecurityCard:(NSString *)socialSecurityCard//社保卡
      andIscardPicPure:(NSString *)IscardPicPure//身份证照片路径
          andEducation:(NSInteger)education  //文化程度
    andgradudctionTime:(NSInteger)graduationTime //毕业时间
   andgraduationSchool:(NSString *)graduationSchool //毕业学校
              andMajor:(NSString *)major//专业
             andHoster:(NSString *)hoster//户主姓名
         andHostIdcard:(NSString*)hostIdcard//户主身份证
   andrelateHosterType:(NSInteger)relateHosterType //与户主关系
   andPoliticalOutLook:(NSInteger)politicalOutook // 1-9 种政治面貌
  andRegisterResidence:(NSInteger)registerResidence // 户口
  andhouseholdRegister:(NSString *)householdRegister //户籍地址
          andGroupType:(NSString *)groupType //群体类型
              andSkill:(NSString *)skill //职业资格
         andSkillGrade:(NSInteger)skillGrade//职业等级
         andTechnology:(NSString *)technology //专业技术职务
     andTechnongyGrade:(NSInteger)technologyGrade //职称等级
           andProvonce:(NSString *)province//省
               andCity:(NSString *)city//市
            andCountry:(NSString *)country//区,县
               andTown:(NSString *)town//乡
      anddetailAddress:(NSString *)detailAddress//村
      andNeverEmployedtype:(NSInteger)neverEmployedtype //其他
     andJobInKK:(NSInteger)JobInKK
      completionHandle:(void (^)(PersonJob *, NSError *))complete
{
    NSArray * arrayHJT =  [HJTsqlite selectData:2 andModel:[citySqliteModel class] andName:@"CityId"];
    if ( arrayHJT.count == 0) {
        return  nil;
    }
    citySqliteModel *mdoels  =arrayHJT[0];
       NSString * pathNew_1 =[IPJOB stringByAppendingString:@"/user/addinfo"];
    NSDictionary *dict1 = nil;
    if ([hoster isEqualToString:@""]  ) {
       
        hoster =[JobUtil netStrNull_2:hoster];
    }else{
        
        hoster =  [EnercryTool A:hoster];
    }
    
    
    

    
    dict1 =@{
             @"terminal":@2,
             @"baseId":@(baseId),
             @"idcard":[EnercryTool A:IDCard],
             @"isSocialSecurity": @(isSocialSecurity),
             @"socialSecurityCard":socialSecurityCard,
             @"IscardPicPure":IscardPicPure,//
             @"education":@(education),
             @"graduationTime":@(graduationTime),
             @"graduationSchool":graduationSchool,
             @"registerResidence":@(registerResidence),
             @"major":major,
             @"hoster":hoster,
             @"hostIdcard":hostIdcard,
             @"politicalOutlook":@(politicalOutook),
             @"relateHosterType":@(relateHosterType),
             @"currentAddress":householdRegister,//看看是不是不要填写
             @"grouptype":groupType,
             @"skill":skill,
             @"skillGrade":@(skillGrade),
             @"technology":technology,
             @"technologyGrade":@(technologyGrade),
             @"province":mdoels.Staticprovince,
             @"city":mdoels.StaticdownTown,
             @"county":mdoels.Staticarea,
             @"town":mdoels.StaticVillage,
             @"village":mdoels.StaticVillageCommitte,
             @"employState":@(JobInKK)
             
             };
    NSLog(@"%@",dict1);
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [PersonJob mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
}

//个人信息采集三
+(id)getUserAdddThreeeId:(NSInteger)baseId //用户id由第一个接口上传回来的
             andworkMode:(NSInteger)workMode//单位就业

          andcompanyName:(NSString*)companyName //公司名字

           andcompanyTel:(NSString *)companyTel//公司电话

   andcompanyProjectName:(NSString *)companyProjectName//公司项目名字

           andlaborCount:(NSInteger)laborCount  //劳动就业人数

      andemployeeChannel:(NSInteger)employeeChannel  //劳动就业人数

             andrgstTime:(NSString*)rgstTime //毕业时间

             andflexType:(NSInteger)flexType //灵活就业类型

         andemployeeTime:(NSString*)employeeTime//就业/创业时间

               andincome:(NSInteger)income//收入

              andisTrain:(NSInteger)isTrain//是否获得证书

             andlocation:(NSString*)location//就业创业地址

             andworkType:(NSString*)workType //从事工种

        andindustryField:(NSString*)industryField //行业领域

   andSelfSignatureImage:(NSString*)selfSignatureImage //本人签字
       andCollectorImage:(NSString*)collectorImage //采集人签字
               andASFASF:(NSInteger)ASFASF   //新增城市就业
            andTrainType:(NSInteger)TrainType//培训就业需求
    andemployeeExtension:(NSString*)employeeExtension  //就业意向
          andWorkAddress:(NSInteger)WorkAddressExtension //理想就业地
 andmouthIncomeExtension:(NSInteger)mouthIncomeExtension //理想月工资
            andWorlStyle:(NSInteger)workStyle//工作方式
    andWorkTypeExtension:(NSString*)WorkTypeExtension//意向工种
          andpeixunGrank:(NSInteger)peixunGrank//培训等级
andentrepreneurialExtension:(NSString*)entrepreneurialExtension  //创业意向
         andDreamAddress:(NSString*)dreamAddress
        completionHandle:(void (^)(PersonJob *, NSError *))complete{
    NSString * pathNew_1 =[IPXIAODAIJOB stringByAppendingString:@"/employmentserver/kankan/insertEmployee"];
    NSString * pathNew2 =  [pathNew_1 stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    NSDictionary *dict1 = nil;
  NSString *idcard =  [[NSUserDefaults standardUserDefaults] objectForKey:@"jobPersonID"];
    if (!idcard) {
        idcard =[NSNull null];
    }
    
    NSLog(@"%@",idcard);
    NSLog(@"%@",selfSignatureImage);
    NSLog(@"%@",collectorImage);
    
    NSArray * arrayHJT =  [HJTsqlite selectData:2 andModel:[citySqliteModel class] andName:@"CityId"];
    if ( arrayHJT.count == 0) {
        [SVProgressHUD dismiss];
        return  nil;
    }
    NSArray * arrayHJT_OCR =  [HJTsqlite selectData:2 andModel:[testObject class] andName:@"PicID"];
    if ( arrayHJT_OCR.count == 0) {
        [SVProgressHUD dismiss];
        return  nil;
    }
//    testObject *testObject = arrayHJT_OCR[0];
    citySqliteModel *mdoels  =arrayHJT[0];

    if ([rgstTime isEqualToString:@""]) {
        rgstTime  = [NSNull null];
    }else{
        rgstTime =[JobUtil onlyBirthDai:rgstTime];
    }
    
    if ([employeeTime isEqualToString:@""]) {
        employeeTime  = [NSNull null];
    }else{
        employeeTime =[JobUtil onlyBirthDai:employeeTime];
    }
    
    if (!dreamAddress || [dreamAddress isEqualToString:@"理想就业地:_____________"]) {
        dreamAddress =[NSNull null];
    }
    
    
    NSInteger baseID = [[NSUserDefaults standardUserDefaults] integerForKey:@"jobBaseID"];
    if (baseID == 0) {
        return nil;
    }
    
    if (!employeeExtension) {
        employeeExtension =  [NSNull null];
    }
    if (!WorkTypeExtension) {
        WorkTypeExtension =  [NSNull null];
    }
    if (!entrepreneurialExtension) {
        entrepreneurialExtension =  [NSNull null];
    }
    if (!mdoels.StaticdownTown) {
        mdoels.StaticdownTown =  [NSNull null];
    }
    if (!mdoels.Staticarea) {
        mdoels.Staticarea =  [NSNull null];
    }
    if (!mdoels.StaticVillage) {
        mdoels.StaticVillage =  [NSNull null];
    }

    if (!TrainType) {
        TrainType =0;
    }
    if (!WorkAddressExtension) {
        WorkAddressExtension =0;
    }
    if (!mouthIncomeExtension) {
        mouthIncomeExtension =  0;
    }
    if (!workStyle) {
        workStyle =  0;
    }
    if (!peixunGrank) {
        peixunGrank = 0;
    }
    
    
    
    
    dict1 =@{
                          @"flag":@2,
                          @"loginId":@([getPeopleID PeopleID]),
                          @"baseId":@(baseID),
                          @"idcard" :idcard,
                          @"city":mdoels.StaticdownTown,
                          @"county":mdoels.Staticarea,
                          @"town":mdoels.StaticVillage,
                          @"workMode":@(workMode),
                          @"companyName": companyName,
                          @"companyTel":companyTel,
                          @"laborCount":@(laborCount),
                          @"rgstTimeParam":rgstTime,
                          @"flexType":@(flexType),
                          @"employeeTimeParam":employeeTime,
                          @"employeeChannel":@(employeeChannel),
                          @"income":@(income),
                          @"isTrain":@(isTrain),
                          @"location":location,
                          @"workType":workType,
                          @"industryField":industryField,
                          @"selfSignatureImage": selfSignatureImage,
                          @"collectorImage" : collectorImage,
                          @"isNewTown":@(ASFASF),
                          //新增
                          @"eduWorkCommand":@(TrainType),
                          @"workIntend":employeeExtension,
                          @"dreamWorkAddress":@(WorkAddressExtension),
                          @"dreamSalary":@(mouthIncomeExtension),
                          @"workStyle":@(workStyle),
                          @"workerType":WorkTypeExtension,
                          @"eduGrade":@(peixunGrank),
                          @"createCompanyIntend":entrepreneurialExtension,
                          @"dreamAddress":dreamAddress
                        //要不要传周一问一下小戴
                   //       @"idcard" :testObject.picture
                          
             };
//
//
//
//    dict1 =@{
//
//             @"flag":@2,
//             @"idcard" :idcard,
//          //   @"baseId":@(baseId),
//             @"selfSignatureImage": selfSignatureImage,
//             @"collectorImage" : collectorImage,
//             @"companyTel":companyTel,
//             @"companyName": companyName,
//             @"city":@"上海市",
//             @"county":@"市辖区",//
//             @"town":@"浦东新区",
//             @"workModel":@(workMode),
//             @"laborCount":@(laborCount),
//             @"rgstTimePara":rgstTime,
//             @"flexType":@(flexType),
//             @"employeeTimePara":employeeTime,
//             @"employeeChannel":@(employeeChannel),
//             @"income":@(income),
//             @"isTrain":@(isTrain),
//             @"location":location,
//             @"workType":workType,
//             @"industryField":industryField,
//             };
    NSLog(@"%@",dict1);
    NSLog(@"%@",pathNew2);
    return [self POST:pathNew2 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [PersonJob mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];

}

//+(id)getUserAdddThreeeId:(NSInteger)baseId //用户id由第一个接口上传回来的
//     andunemployeeReason:(NSString*)unemployeeReason//失业原因
//       andunemployeeTime:(NSString*)unemployeeTime //失业时间
//       andoriginCompanyl:(NSString *)originCompany//原工作单位
//            andTrainType:(NSString*)TrainType//培训就业需求
//    andemployeeExtension:(NSString*)employeeExtension  //就业意向
//andentrepreneurialExtension:(NSString*)entrepreneurialExtension  //创业意向
// andmouthIncomeExtension:(NSInteger)mouthIncomeExtension //理想月工资
//          andWorkAddress:(NSInteger)WorkAddressExtension //理想就业地
//          andpeixunGrank:(NSInteger)peixunGrank//培训等级
//    andWorkTypeExtension:(NSString*)WorkTypeExtension//意向工种
//            andWorlStyle:(NSInteger)workStyle//工作方式
//        completionHandle:(void (^)(PersonJob *, NSError *))complete{
//
//
//    __block   NSString * pathNew_1 =[IPJOB stringByAppendingString:@"/employmentserver/user/addinfo"];
//    NSDictionary *dict1 =[NSDictionary new];
//    dict1 =@{
//             @"terminal":@2,
//             @"baseId":@(baseId),
//             @"companyTel":companyTel,
//             @"companyName": companyName,
//             @"city":baseId,
//             @"county":baseId,//
//             @"town":baseId,
//             @"workModel":workMode,
//             @"laborCount":laborCount,
//             @"rgstTime":rgstTime,
//             @"flexType":flexType,
//             @"employeeTime":employeeTime,
//             @"employeeChannel":employeeChannel,
//             @"income":income,
//             @"isTrain":@(isTrain),
//             @"location":location,
//             @"workType":@(workType),
//             @"industryField":industryField,
//             };
//    NSLog(@"%@",dict1);
//    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
//        complete( [PersonJob mj_objectWithKeyValues:responseObj],error);
//        NSLog(@"%@",responseObj);
//    }];
//
//
//
//
//
//
//
//
//
//
//}


+(id)getUserAdddFourId:(NSInteger)baseId //用户id由第一个接口上传回来的
   andunemployeeReason:(NSInteger)unemployeeReason//失业原因
     andunemployeeTime:(NSString*)unemployeeTime //失业时间
     andoriginCompanyl:(NSString *)originCompany//原工作单位
      completionHandle:(void (^)(PersonJob *, NSError *))complete{
    __block   NSString * pathNew_1 =[IPXIAODAIJOB stringByAppendingString:@"/employmentserver/kankan/insertUnEmployee"];
    NSDictionary *dict1 = nil;
    NSString *idcard ;
    
    if ([idcard isEqualToString:@""]  ) {
        
        idcard = [NSNull null];
    }else{
        idcard = [[NSUserDefaults standardUserDefaults] objectForKey:@"jobPersonID"];

    }
   
    
    
    
    
    
    
    
    
    
    NSArray * arrayHJT =  [HJTsqlite selectData:2 andModel:[citySqliteModel class] andName:@"CityId"];
    if ( arrayHJT.count == 0) {
        return  nil;
    }
    citySqliteModel *mdoels  =arrayHJT[0]; 
    //剩下的不写了
    dict1 =@{
             @"flag":@2,
             @"idcard" :idcard,
             @"city":mdoels.StaticdownTown,
             @"county":mdoels.Staticarea,
             @"town":mdoels.StaticVillage,
             @"unemployeeReason":@(unemployeeReason),
             @"unemployeeTimeParam": [JobUtil onlyBirthDai:unemployeeTime],
             @"orginalCompany":originCompany,
//             @"quitLaborReason":@1,
//             @"selfSignatureImage":@"asdfdsf",
//             @"collectorImage":@"asfdgdgs"

             //   @"baseId":@(baseId),
             };
    NSLog(@"%@",dict1);
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [PersonJob mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];

}




+(id)getUserAdddFived:(NSInteger)baseId //用户id由第一个接口上传回来的
  andunemployeeReason:(NSString*)unemployeeReason//失业原因
    andunemployeeTime:(NSString*)unemployeeTime //失业时间
    andoriginCompanyl:(NSString *)originCompany//原工作单位
         andTrainType:(NSInteger)TrainType//培训就业需求
 andemployeeExtension:(NSString*)employeeExtension  //就业意向
andentrepreneurialExtension:(NSString*)entrepreneurialExtension  //创业意向
andmouthIncomeExtension:(NSInteger)mouthIncomeExtension //理想月工资
       andWorkAddress:(NSInteger)WorkAddressExtension //理想就业地
       andpeixunGrank:(NSInteger)peixunGrank//培训等级
 andWorkTypeExtension:(NSString*)WorkTypeExtension//意向工种
         andWorlStyle:(NSInteger)workStyle//工作方式
     andselfSigniture:(NSString*)selfSigniture//本人签字
andcollectorSignature:(NSString*)collectorSignature//采集人签字
andDreamAddress:(NSString*)dreamAddress
     completionHandle:(void (^)(PersonJob *, NSError *))complete{
    NSString * pathNew_1 =[IPJOB stringByAppendingString:@"/user/demand"];
    NSDictionary *dict1 = nil;
//data
    NSArray * arrayHJT =  [HJTsqlite selectData:2 andModel:[citySqliteModel class] andName:@"CityId"];
    if ( arrayHJT.count == 0) {
        [SVProgressHUD dismiss];
        return  nil;
    }
    NSArray * arrayHJT_OCR =  [HJTsqlite selectData:2 andModel:[testObject class] andName:@"PicID"];
    if ( arrayHJT_OCR.count == 0) {
          [SVProgressHUD dismiss];
        return  nil;
    }
//    testObject *testObject = arrayHJT_OCR[0];    
    citySqliteModel *mdoels  =arrayHJT[0];
    
    //身份证
    NSString *idcarddddd = [[NSUserDefaults standardUserDefaults] objectForKey:@"jobPersonID"];
    if (!idcarddddd) {
        idcarddddd =[NSNull null];
    }
    if (!dreamAddress || [dreamAddress isEqualToString:@"理想就业地:_____________"]) {
        dreamAddress =[NSNull null];
    }
    if (!employeeExtension) {
        employeeExtension =  [NSNull null];
    }
    if (!WorkTypeExtension) {
        WorkTypeExtension =  [NSNull null];
    }
    if (!entrepreneurialExtension) {
        entrepreneurialExtension =  [NSNull null];
    }
    if (!mdoels.StaticdownTown) {
        mdoels.StaticdownTown =  [NSNull null];
    }
    if (!mdoels.Staticarea) {
        mdoels.Staticarea =  [NSNull null];
    }
    if (!mdoels.StaticVillage) {
        mdoels.StaticVillage =  [NSNull null];
    }
    if (!TrainType) {
        TrainType =0;
    }
    if (!WorkAddressExtension) {
        WorkAddressExtension =0;
    }
    if (!mouthIncomeExtension) {
        mouthIncomeExtension =  0;
    }
    if (!workStyle) {
        workStyle =  0;
    }
    if (!peixunGrank) {
        peixunGrank = 0;
    }
    dict1 =@{
             @"terminal":@2,
             @"loginId":@([getPeopleID PeopleID]),
             @"baseId":@([[NSUserDefaults standardUserDefaults] integerForKey:@"jobBaseID"]),
             @"city":mdoels.StaticdownTown,
             @"county":mdoels.Staticarea,
             @"town":mdoels.StaticVillage,
             @"eduWorkCommand":@(TrainType),
             @"workIntend":employeeExtension,
             @"dreamWorkAddress":@(WorkAddressExtension),
             @"dreamSalary":@(mouthIncomeExtension),
             @"workStyle":@(workStyle),
             @"workerType":WorkTypeExtension,
             @"eduGrade":@(peixunGrank),
             @"createCompanyIntend":entrepreneurialExtension,
             @"pictureSelfSigniture":selfSigniture,
             @"pictureCollectorSignature":collectorSignature,
             @"idcard" :idcarddddd,
             @"dreamAddress":dreamAddress
             };
    NSLog(@"%@",dict1);
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [PersonJob mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
}



+(id)getUserAdddFived:(NSInteger)baseId
     completionHandle:(void (^)(PersonJob *, NSError *))complete{
 
    __block   NSString * pathNew_1 =[IPXIAODAIJOB stringByAppendingString:@"/employmentserver/user/demand"];
    NSDictionary *dict1 = nil;
    dict1 =@{
             @"terminal":@2,
             @"baseId":@([[NSUserDefaults standardUserDefaults] integerForKey:@"jobBaseID"])
             };
    NSLog(@"%@",dict1);
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [PersonJob mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
}

//five province-acity-
+(id)getUserprovincecompletionHandle:(void (^)(CityModel *, NSError *))complete{
   __block   NSString * pathNew_1 =[IPXIAODAIJOB stringByAppendingString:@"/employmentserver/kankan/province"];

    return [self POST:pathNew_1 parameters:nil completionHandler:^(id responseObj, NSError *error) {
        complete( [CityModel mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
    
    
    
}

+(id)getUserCitytoCity:(NSString*)province_id completionHandle:(void (^)(CitytoCityModel *, NSError *))complete{
    __block   NSString * pathNew_1 =[IPXIAODAIJOB stringByAppendingString:@"/employmentserver/kankan/city"];


    NSDictionary *dict1 = nil;
    dict1 =@{
             @"provice_id":province_id,

             };
    NSLog(@"%@",dict1);
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [CitytoCityModel mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
    
}

+(id)getUserareaModel:(NSString*)city_id completionHandle:(void (^)( areaModel*, NSError *))complete{
    __block   NSString * pathNew_1 =[IPXIAODAIJOB stringByAppendingString:@"/employmentserver/kankan/county"];
    

    
    NSDictionary *dict1 = nil;
    dict1 =@{
             @"city_id":city_id,

             };
    NSLog(@"%@",dict1);
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [areaModel mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
    
}
+(id)getUsercountry:(NSString*)country_id completionHandle:(void (^)(Town *, NSError *))complete{
    __block   NSString * pathNew_1 =[IPXIAODAIJOB stringByAppendingString:@"/employmentserver/kankan/town"];
    

    NSDictionary *dict1 = nil;
    dict1 =@{
             @"county_id":country_id,
             
             };
    NSLog(@"%@",dict1);
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [Town mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
    
}

+(id)getUsertown:(NSString*)town_id completionHandle:(void (^)(VillageModel *, NSError *))complete{
    __block   NSString * pathNew_1 =[IPXIAODAIJOB stringByAppendingString:@"/employmentserver/kankan/village"];

    NSDictionary *dict1 = nil;
    dict1 =@{
             @"town_id":town_id,
             
             };
    NSLog(@"%@",dict1);
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [VillageModel mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
    
}

+(id)getBigCode:(NSString*)baseId completionHandle:(void (^)(bigcodeModel *, NSError *))complete
{

    __block   NSString * pathNew_1 =[IPXIAODAIJOB stringByAppendingString:@"/employmentserver/kankan/findNameByBigCode"];
    NSDictionary *dict1 = nil;
    dict1 =@{
             @"industryBigCode":baseId
             };
    NSLog(@"%@",dict1);
    
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [bigcodeModel mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
    
}

+(id)searchItem:(NSString*)itemTime
    andProvonce:(NSString *)province//省
        andCity:(NSString *)city//市
     andCountry:(NSString *)country//区,县
        andTown:(NSString *)town//乡
     andVillage:(NSString*)village
completionHandle:(void (^)(NewMessage *, NSError *))complete{
    

    NSString * pathNew_1 =[IPXIAODAIJOB stringByAppendingString:@"/employmentserver/kankan/selectCountbyLoginId"];

    NSDictionary *dict1 = nil;

    if (!village) {
        village =[NSNull null];
    }
    if (!country) {
        country =[NSNull null];
    }
    if (!town) {
        town =[NSNull null];
    }
    if (!city) {
           city =[NSNull null];
    }
    
    
    
    if (itemTime != 0) {
        dict1 =@{
                 @"loginId":@([getPeopleID PeopleID]),
                 @"city":city,
                 @"county":country,
                 @"town":town,
                 @"village":village,
                 @"queryDate":itemTime
                 };
    }else{
        dict1 =@{
                 @"loginId":@([getPeopleID PeopleID]),
                 @"city":city,
                 @"county":country,
                 @"town":town,
                 @"village":village
                 };
        
    }
    
    
    NSLog(@"%@",dict1);
    return [self POST:pathNew_1 parameters:dict1 completionHandler:^(id responseObj, NSError *error) {
        complete( [NewMessage mj_objectWithKeyValues:responseObj],error);
        NSLog(@"%@",responseObj);
    }];
    
    
    
    
    
}



@end
