def IUMSCUTS0010(self): """IUMSCUTS0010 绑卡签约信息登记""" seqno = generate_random_str(17) calseqno = "LN" + generate_random_num(12) custna = get_name() random_sex = random.randint(1, 2) certno = IdNumber.generate_id(random_sex) cardno = get_card_id() tel = get_tel() header = { "api_id": "IUMSCUTS0010", "country": "cn", "calseqno": seqno, "dapplication": "81001", "service": "IUMSCUTS0010", "callseqno": calseqno, "dgroup": "onl01", "dversion": "1.0", "busiseqno": calseqno, "Content-Type": "application/json" } data = { "input": { "custna": custna, "certtp": "101", "certno": certno, "channalId": "JDJR", "out_user_id": "", "cardNo": cardno, "cardBin": "621661", "cardType": "0", "bankNo": "01040000", "bankName": "中国银行", "registe_type": "1", "bankProvince": "天津", "bankCity": "天津市", "mobileNo": tel, "bindCardId": calseqno, }, "comm_req": { "xcopfg": "0", "inpucd": "985", "counts": "0", "busisq": calseqno, "corpno": "985", "xdcnfg": "1", "tranus": "9852001", "servtp": "TE", "servno": "004", "pageno": "1", "pgsize": "10", "tranbr": "985000", "channel_id": "JDJR" } } return Requester(headers=header, json=data)
def creditApply_encrvption(self): '''授信申请接口加密''' applyno = generate_random_num(17) custName = get_name() mobileNo = get_tel() custNo = "test" + generate_random_num(11) openId = generate_random_str(10) random_sex = random.randint(0, 1) applyTime = get_time() idNo = IdNumber.generate_id(random_sex) # idNo = "130132198602163926oo" data = { "bizContent": { "applyNo": applyno, "idNo": idNo, "mobileNo": mobileNo, "custNo": custNo, "openId": openId, "occupation": "其他", "nation": "汉", "residentAddr": "", "ipAddr": "", "gpsAddr": "234,232", "trustId": "000000000", "workCity": "", "certValidDate": "20100801-20300801", "addr": "中国台湾台北市", "applyTime": applyTime, "channelCode": "MUCF", "address": "OCR", "workAddr": "上海市", "suggestLimit": "49999", "custName": custName, "extendInfo": "{\"cardLmtNear6mUsed\":\"0\",\"card24mHstrOvdMax\":\"000000000000000000000000\",\"class5StateGuaLoan\":\"否\",\"cardOvdAmtTot\":\"0\",\"loanOvdAmtTot\":\"0\",\"loan24mHstrOvdCnt\":\"000000000000000000000000\",\"loanQueryOrgCnt1m\":\"0\",\"selfQueryCnt1m\":\"0\",\"badDebtRecords\":\"否\",\"loanBalance\":\"0\",\"loanAbnormalCnt\":\"0\",\"houseFundBase\":\"5\",\"ovdMonthMax\":\"0\",\"houseLoanPrcp\":\"0\",\"reportCreateTime\":\"0\",\"cardLmtUsed\":\"\",\"cardAbnormalCnt\":\"0\",\"loanOrgCnt\":\"0\",\"cardTotLmt\":\"0\",\"cardUsingHstrAvg\":\"0\",\"card24mHstrOvdCnt\":\"000000000000000000000000\",\"cardQueryOrgCnt1m\":\"0\",\"loan24mHstrOvdMax\":\"000000000000000000000000\",\"monthIncome\":\"10000\",\"loanPayAmt1m\":\"0\"}", "workCompany": "", "residentCity": "", "bioCompareRs": "true", "merchantNo": "000000000" }, "appId": "merchCreditApply", "channelCode": "MUCF", "encoding": "UTF-8", "encryptKey": "cAzHFcdZaSbNaV57dCCr4n+Y+4rh0K3AZdcFwP/0GUukI3ZjpG3XqZgANWe9j8QRd4nXeVPnS2W2Vh7hb3ykTa6jeSTKRJYhe8ZWWrSwJqYriTSleoUwRBNBLoR9XI5a22PsjrTJBa6AKtaBmo4kS9NXEe3j13ka5SOg7zeeVSU=", "encryptType": "AES", "flowNo": "000006", "merchantId": "000000", "reqDateTime": "2020-10-15 01:35:22", "reqServiceId": "merchCreditApply", "sign": "JMvAl1F472juRss0SBm5Md7mA4VsKt4ZGLtLPqnli07ERfl91GUyOtB2/p9OouuyBdD0fvHlPbTU3Et+lCnYgHdMOV0bhIRQFLpCA4lExjmfDQWuu0HSMBN+kiUoemHJBDVFJ8RAODIFeDRxSQGCjMwZTJrZKwez+XnIXvhIHcI=", "subMerchantId": "000000" } return Requester(json=data)
def PATSJBSS1001(self): '''授信申请''' seqno = generate_random_str(17) calseqno = "LN" + generate_random_num(12) name = get_name() mobile = get_tel() applyNo = generate_random_num(18) +"A" creditNo = applyNo random_sex = random.randint(1, 2) applyTime = get_time() idnumber = IdNumber.generate_id(random_sex) header = { "api_id":"PATSJBSS1001", "country":"cn", "calseqno":seqno, "dapplication":"81001", "service":"PATSJBSS1001", "callseqno":calseqno, "dgroup":"onl01", "dversion":"1.0", "busiseqno":calseqno, "Content-Type":"application/json" } data = { "input":{ "applyNo":applyNo, "creditNo":creditNo, "productCode":"JB", "bizMode":"PLATFORM_1", "bizType":"ADMIT_APPLY", "source":"USER", "creditFlag":"N", "repayMode":"1", "pricingRating":"7", "consumingScore":"100.0", "name":name, "mobileNo":mobile, "certType":"01", "certNo":idnumber, "certValidEndDate":"长期", "cardNo":"6225880118085993", "applyExpiredDate":"2020-12-31", "addr":{ "prov": "浙江省", "city": "杭州市", "area": "⻄湖区", "address": "5a2m6Zmi6LevMTI45Y+3LUEx5bqnMTLivKnpgq7lsYA=" }, "riskInfo":{ "joinRisk":1, "riskRating":"A", "solvencyRatings":"B", "apolloInfo":{"have_car_prob_grade":"02","have_fang_prob_grade":"01","xfdc_index":"07","mobile_fixed_grade":"08", "adr_stability_grade":"09","occupation":"军人","tot_pay_amt_6m_grade":"08","last_6m_avg_asset_total_grade":"06", "ovd_order_cnt_6m_grade": "01","ovd_order_amt_6m_grade": "01","positive_biz_cnt_1y_grade": "10","risk_score": "980", "cust_seg":"A","dev_stability_grade":"A","ovd_order_days_6m_grade":"01","first_loan_length_grade":"05","repay_amt_6m_grade":"07" }, }, "extInfo":{ "securityId": "cadfasdf-fasdfasdf-fapsdfiprteuensd-34" }, }, "comm_req":{ "trantm":"844568", "initiator_system":"301", "app_version":"1.0", "trxn_branch":"06924", "call_seq":seqno, "trxn_teller":"07988122", "sponsor_system":"810", "auth_user_id":"153148", "servtp":"TE", "sys_version":"1.0", "inpudt":"20200604", "servno":"004", "busi_seq":seqno, "page_start":"1", "trxn_seq":seqno, "tranbr":"985000", "trandt":"20200604", "longitude":"31.2579921", "page_size":"10", "orderSeq":seqno, "phone_type":"0", "initiator_date":"20200711", "inpucd":"985", "busisq":calseqno, "rsa_key":"77777777777777", "inpusq":seqno, "corpno":"985", "ip_address":"127.0.0.1", "busi_org_id":"025", "busiseqno":seqno, "terminal_os_type":"0", "tranus":"xadmin", "initiator_seq":seqno, "pageIndex":"1", "pageno":"1", "pgsize":"1", "callseqno":seqno, "channel_id":"JIEB" }, } return Requester(headers=header, json=data)
def PATSJDSS1001(self, ): '''授信申请''' seqno = generate_random_str(17) calseqno = "LN" + generate_random_num(12) name = get_name() mobile = get_tel() userid = "user" + generate_random_num(9) applyNo = "J" + generate_random_num(10) random_sex = random.randint(1, 2) idnumber = IdNumber.generate_id(random_sex) """影像件上传""" cmd_mk = "mkdir " + userid cmd_cp = "cp -r " + userid + " /upload/crpl_zhongyin/20200917/ocr" cmd_rm = "rm -rf " + userid exec_commands(cmd_mk) exec_commands(cmd_cp) exec_commands(cmd_rm) upload("D:\\Python_work\\walnuts_api\\api_test\\img\\1.txt", "/upload/crpl_zhongyin/20200917/ocr/" + userid + "/1.txt") upload("D:\\Python_work\\walnuts_api\\api_test\\img\\2.txt", "/upload/crpl_zhongyin/20200917/ocr/" + userid + "/2.txt") upload("D:\\Python_work\\walnuts_api\\api_test\\img\\3.txt", "/upload/crpl_zhongyin/20200917/ocr/" + userid + "/3.txt") """报文头信息""" header = { "api_id": "PATSJDSS1001", "country": "cn", "calseqno": seqno, "dapplication": "81001", "service": "PATSJDSS1001", "callseqno": calseqno, "dgroup": "onl01", "dversion": "1.0", "busiseqno": calseqno, "Content-Type": "application/json" } data = { "input": { "ocrInfo": { "signPlace": "上海", "address": "上海", "validDate": "20190306_20390306", "sex": "男", "name": name, "ethnicGroups": "汉", "idNumber": idnumber }, "userInfo": { "homeAddressCountry": "黄埔", "workAddressDetail": "滇池路756号", "profession": "PROFESSION_001", "homeAddressDetail": "滇池路135号", "workAddressCity": "上海", "education": "UNDERGRADUATE", "unitName": "上海中银消费", "userTel": mobile, "userId": userid, "certNo": idnumber, "homeAddressProvince": "上海", "homeAddressArea": "黄埔", "school": "北京大学", "homeAddressCity": "上海", "workAddressCountry": "黄埔", "workAddressProvince": "上海", "workAddressArea": "黄埔", "unitTel": "17369777481", "emergList": [{ "emergRelation": "PARENT", "emergTel": "15215314777", "emergName": "客户之父" }, { "emergRelation": "PARENT", "emergTel": "15810943875", "emergName": "客户之母" }], "username": name, "monthlyIncome": "LEVEL_5" }, "applyProduct": "zhongyin_001", "applyNo": applyNo, "notifyUrl": "https://jie.baitiao.com/inv/crpl/loan/checkApplyResult", "applyTime": "20200917", "applyPeriod": "12", "channelCode": "CRPL_ZHONGYIN", "applyAmount": "300000" }, "comm_req": { "trantm": "844568", "initiator_system": "301", "app_version": "1.0", "trxn_branch": "06924", "call_seq": seqno, "trxn_teller": "07988122", "sponsor_system": "810", "auth_user_id": "153148", "servtp": "TE", "sys_version": "1.0", "inpudt": "20200604", "servno": "004", "busi_seq": seqno, "page_start": "1", "trxn_seq": seqno, "tranbr": "985000", "trandt": "20200604", "longitude": "31.2579921", "page_size": "10", "orderSeq": seqno, "phone_type": "0", "initiator_date": "20200711", "inpucd": "985", "busisq": calseqno, "rsa_key": "77777777777777", "inpusq": seqno, "corpno": "985", "ip_address": "127.0.0.1", "busi_org_id": "025", "busiseqno": seqno, "terminal_os_type": "0", "tranus": "xadmin", "initiator_seq": seqno, "pageIndex": "1", "pageno": "1", "pgsize": "1", "callseqno": seqno, "channel_id": "JDJR" } } return Requester(headers=header, json=data)
def mifi_apply(self): '''授信申请''' seqno = generate_random_str(17) calseqno = "LN" + generate_random_num(12) name = get_name() mobile = get_tel() openId = generate_random_num(9) applyNo = "GU" + generate_random_num(10) random_sex = random.randint(1, 2) applyTime = get_time() idnumber = IdNumber.generate_id(random_sex) """sit2影像件上传""" filename = "IMG_" + applyNo + "_" + applyTime + ".tar.gz" src_file = 'D:\\Python_work\\walnuts_api\\api_test\\resources\\' applyImgPath = "/lttsdata/MIFI/img/" + filename src_file = rename(src_file,filename) upload(src_file, applyImgPath) # """sit影像件上传""" # filename = "IMG_" + applyNo + "_" + applyTime + ".tar.gz" # src_file = 'D:\\Python_work\\walnuts_api\\api_test\\resources\\' # applyImgPath = "/pc_zyxj/credit/img/20201102/" + filename # src_file = rename(src_file, filename) # upload_MI(src_file, applyImgPath) """存储客户信息""" custinfo = [name, mobile, idnumber, applyNo, openId, applyImgPath] writeExcel(sheetname=idnumber, custinfo=custinfo) """定义请求header和body""" header = { "api_id":"PATSMISS1001", "country":"cn", "calseqno":seqno, "dapplication":"81001", "service":"PATSMISS1001", "callseqno":calseqno, "dgroup":"onl01", "dversion":"1.0", "busiseqno":calseqno, "Content-Type":"application/json" } data = { "input":{ "openId":openId, "applyNo":applyNo, "applyTime":applyTime, "channelCode":"MIFI", "timestamp":"", "bankInfo": { "certNo": idnumber, "name": name, "mobile": mobile, "bankName": "中国银行", "cardNo": "6216610200016587010", "idNum": idnumber }, "userInfo": { "name": name, "mobile": mobile, "idNum": idnumber, "openId": openId }, "extInfo":{ "incomeLevel":"6", "applyImgPath":applyImgPath, "applyAuthPath":"", "industry":{ "firstCode":"B", "firstName":"采矿业", "secondCode":"C", "secondName":"制造业" }, "career":{ "firstCode":"Y", "firstName":"不便分类的其他从业人员", "secondCode":"Z", "secondName":"未知" }, "faceCmpScore":"", "companyName":"棉花糖厂", "riskData":{ "associateDeviceCount":"", "devicePrintAssociateAccountCount":"", "gPSConsistency":"", "devicePrintNull":"", "isMobileTypeChange":"", "deviceIsBlack":"", "associateDevicePrintCount":"", "isFrequentlyUsedDevicePrint":"", "devicePrintIsBlack":"", "deviceAssociateAccountCount":"", "deviceNull":"", "deviceSystem":"", "iPConsistency":"", "iPConcentration":"", "gPSConcentration":"", "mobileTypeNull":"", "isFrequentlyUsedDevice":"" }, "ocr":{ "nameOcr":name, "numberOcr":idnumber, "addressOcr":"上海", "ethnicOcr":"汉", "dueTimeOcr":"20100801_20300801", "sexOcr":"male", "issueOrgOcr":"公安局" }, } }, "comm_req":{ "trantm":"752512", "initiator_system":"301", "app_version":"1.0", "trxn_branch":"77710", "call_seq":calseqno, "trxn_teller":"95068241", "sponsor_system":"810", "auth_user_id":"587046", "servtp":"TE", "sys_version":"1.0", "inpudt":"20200604", "servno":"004", "busi_seq":seqno, "page_start":"1", "trxn_seq":seqno, "tranbr":"985000", "trandt":"20200604", "longitude":"31.2579921", "page_size":"10", "orderSeq":calseqno, "phone_type":"0", "initiator_date":"20200711", "inpucd":"985", "busisq":seqno, "rsa_key":"77777777777777", "inpusq":calseqno, "corpno":"985", "ip_address":"127.0.0.1", "busi_org_id":"025", "busiseqno":seqno, "terminal_os_type":"0", "tranus":"xadmin", "initiator_seq":calseqno, "pageIndex":"1", "pageno":"1", "pgsize":"1", "callseqno":calseqno, "channel_id":"MIFI" } } return Requester(headers=header, json=data)
def miun_apply(self): '''小米联合贷授信申请''' seqno = generate_random_str(7) calseqno = "LN" + generate_random_num(12) name = get_name() mobile = get_tel() userid = generate_random_str(9) applyNo = "GU" + generate_random_num(10) random_sex = random.randint(1, 2) applyTime = get_time() idnumber = IdNumber.generate_id(random_sex) # """影像件上传""" # filename = "IMG_" + applyNo + "_" + applyTime + ".tar.gz" # src_file = 'D:\\Python_work\\walnuts_api\\api_test\\resources\\' # applyImgPath = "/lttsdata/MIUN/20201105/" + "IMG_" + applyNo + "_" + applyTime + ".tar.gz" # src_file = rename(src_file, filename) # upload(src_file, applyImgPath) # """存储客户信息""" # custinfo = [name, mobile, idnumber, applyNo, applyImgPath] # writeExcel(sheetname=idnumber, custinfo=custinfo) """定义请求header和body""" header = { "api_id": "ICMSJKTS0102", "country": "cn", "calseqno": calseqno, "dapplication": "81001", "service": "ICMSJKTS0102", "callseqno": calseqno, "dgroup": "onl01", "dversion": "1.0", "busiseqno": calseqno, "Content-Type": "application/json" } data = { "input": { "businessMode": "1", "decReason": "", "extraData": { "birthday": "19930506", "signPlace": "上海市黄浦区滇池路街道办事处", "career": { "firstName": "国家机关、党群组织、企业、事业单位负责人", "firstCode": "0", "secondCode": "04", "secondName": "事业单位负责人" }, "education": "999", "gender": "1", "city": "上海", "nation": "汉", "industryes": "J", "cardsday": "20190315", "industry": { "firstName": "金融业", "firstCode": "J", "secondCode": "67", "secondName": "资本市场服务" }, "faceScore": "90", "nataddhomeAddressCity": "上海", "province": "上海", "pbcQuery": "", "marriage": "-1", "expireDate": "20240315", "issueDate": "20190315", "enterpriseName": "未知", "monthlyIncome": "5", "cardData": "/lttsdata/MIUN/20201105/IMG_402071594408083456_20180809102350.tar.gz", "area": "浦东新区", "profession": "0", "natadd": "上海市黄浦区滇池路81号", "marrys": "90", "address": "上海市黄浦区滇池路81号", "race": "汉", "unitName": "未知", "sex": "男", "liveCondition": "未知", "authProtocol": "上海市黄浦区滇池路81号", "cardeday": "20240315", "incomeLevel": "5", "nataddAddressArea": "浦东新区", "pbcScore": "{\"guar_cnt\":\"0\",\"cur_loan_rpm_amt\":\"0\",\"consu_cur_ovd_amt\":\"0\",\"car_ovdcnt_6mth\":\"0\",\"busi_account_cnt_12mth\":\"0\",\"ccard_cur_avg_amt\":\"0\",\"ccard_amtl_arp\":\"0\",\"scard_agency_cnt\":\"0\",\"agency_cnt_12mth\":\"0\",\"ccard_ovd_cnt_6mth\":\"0\",\"scard_cur_total_amt\":\"0\",\"acct_age\":\"0\",\"consu_cur_account_cnt\":\"0\",\"consu_cur_ovd_tm\":\"0\",\"busi_ovdcnt_12mth\":\"0\",\"loan_ovdmax_12mth\":\"0\",\"consu_ovdcnt_12mth\":\"0\",\"house_cur_bal\":\"0\",\"ccard_acct_age\":\"0\",\"loan_query_num_1mth\":\"0\",\"car_cur_ovd_tm\":\"0\",\"ccard_rpm_cnt\":\"0\",\"loan_account_cnt\":\"0\",\"ccard_arp_cnt\":\"0\",\"fund_amt\":\"0\",\"query_num_3mth\":\"0\",\"reports_time\":\"20201105\",\"loan_query_num_6mth\":\"0\",\"ovd_maxterm_3mth\":\"0\",\"consu_account_cnt_12mth\":\"0\",\"loan_ovdcnt_12mth\":\"0\",\"ccard_ovd_bal\":\"0\",\"enfore_cnt\":\"0\",\"house_cur_total_amt\":\"0\",\"ccard_disnormal_cnt\":\"0\",\"house_cur_account_cnt\":\"0\",\"avg_hfamt_12mth\":\"0\",\"ccard_ovd_maxamt_12mth\":\"0\",\"cur_loan_ovd_tm\":\"0\",\"ccard_amtc_utl\":\"0\",\"ovd_maxterm_6mth\":\"0\",\"scard_cur_avgbal_6mth\":\"0\",\"scard_cnt_12mth\":\"0\",\"car_cur_bal\":\"0\",\"house_ovdcnt_12mth\":\"0\",\"ccard_cnt_12mth\":\"0\",\"ccard_amtc_aut_p6m\":\"0\",\"scard_total_amt\":\"0\",\"scard_ovd_cnt\":\"0\",\"query_age\":\"0\",\"consu_cur_bal\":\"0\",\"scard_amtl_rpm\":\"0\",\"busi_cur_rpm_amt\":\"0\",\"scard_cnt\":\"0\",\"car_cur_total_amt\":\"0\",\"loan_total_amt\":\"0\",\"consu_ovdcnt_6mth\":\"0\",\"busi_cur_bal\":\"0\",\"ccard_ovd_amt\":\"0\",\"ccard_cnt_6mth\":\"0\",\"query_num_6mth\":\"0\",\"car_cur_account_cnt\":\"0\",\"house_cur_rpm_amt\":\"0\",\"loan_acct_age\":\"0\",\"agency_cnt_6mth\":\"0\",\"ccard_ovd_cnt_12mth\":\"0\",\"ovd_cnt_3mth\":\"0\",\"ccard_ovd_tm\":\"0\",\"car_cur_rpm_amt\":\"0\",\"ovd_cnt_12mth\":\"0\",\"scard_cur_avg_amt\":\"0\",\"guar_lvlmax\":\"0\",\"consu_cur_rpm_amt\":\"0\",\"car_account_cnt_12mth\":\"0\",\"loan_ovdmax\":\"0\",\"query_num_1mth\":\"0\",\"ccard_credit_cnt\":\"0\",\"ccard_query_num_1mth\":\"0\",\"last_query_age\":\"0\",\"ovd_cnt_6mth\":\"0\",\"cur_loan_account_cnt\":\"0\",\"house_ovdcnt_6mth\":\"0\",\"disp_cnt\":\"0\",\"per_query_num_1mth\":\"0\",\"ccard_cur_cnt\":\"0\",\"ccard_amtl_rpm\":\"0\",\"cur_loan_bal\":\"0\",\"loan_ovdcnt_6mth\":\"0\",\"scard_ovd_amt\":\"0\",\"busi_ovdcnt_6mth\":\"0\",\"consu_cur_total_amt\":\"0\",\"scard_od_amt_180up\":\"0\",\"busi_cur_ovd_amt\":\"0\",\"busi_cur_account_cnt\":\"0\",\"ccard_normal_cnt\":\"0\",\"ccard_query_num_6mth\":\"0\",\"loan_ovdmax_6mth\":\"0\",\"loan_query_num_3mth\":\"0\",\"ccard_ovd_cnt\":\"0\",\"car_ovdcnt_12mth\":\"0\",\"ccard_bad_bal\":\"0\",\"cur_loan_total_amt\":\"0\",\"scard_disnormal_cnt\":\"0\",\"ovd_maxterm_12mth\":\"0\",\"cur_loan_ovd_amt\":\"0\",\"ccard_query_num_3mth\":\"0\",\"compen_cnt\":\"0\",\"ccard_cnt\":\"0\",\"per_query_num_6mth\":\"0\",\"busi_cur_total_amt\":\"0\",\"ccard_ovd_maxamt_6mth\":\"0\",\"scard_acct_age\":\"0\",\"car_cur_ovd_amt\":\"0\",\"account_cnt\":\"0\",\"scard_amtl_arp\":\"0\",\"house_cur_ovd_tm\":\"0\",\"house_account_cnt_12mth\":\"0\",\"scard_cur_cnt\":\"0\",\"house_cur_ovd_amt\":\"0\",\"per_query_num_3mth\":\"0\",\"cur_account_cnt\":\"0\",\"ccard_avg_amt\":\"0\",\"consu_account_cnt_6mth\":\"0\",\"scard_max_bal\":\"0\",\"busi_cur_ovd_tm\":\"0\",\"scard_overdraft_cnt\":\"0\",\"scard_normal_cnt\":\"0\"}", "authority": "上海市黄浦区滇池路街道办事处", "nataddAddressProvince": "上海" }, "bankMobile": "15014486030", "loanBefore": "Y", "userTel": "15014486030", "custName": "客户920177667", "userId": "A6386353928", "cardNo": "6216610200016587010", "certNo": "130101199111230127", "applyAmont": "20000", "rateType": "D", "applyProduct": "02050012", "certtp": "101", "dyrate": "0.03", "creditResult": "PAS", "applyNo": "622944023103", "applyTime": "19760527101051", "loanCategory": "0", "channelCode": "MIUN" }, "comm_req": { "trantm": "818557", "initiator_system": "301", "app_version": "1.0", "trxn_branch": "79470", "call_seq": seqno, "trxn_teller": "29502258", "sponsor_system": "810", "auth_user_id": "062169", "servtp": "TE", "sys_version": "1.0", "inpudt": "20200604", "servno": "004", "busi_seq": seqno, "page_start": "1", "trxn_seq": seqno, "tranbr": "985000", "trandt": "20200604", "longitude": "31.2579921", "page_size": "10", "orderSeq": seqno, "phone_type": "0", "initiator_date": "20200711", "inpucd": "985", "busisq": seqno, "rsa_key": "77777777777777", "inpusq": seqno, "corpno": "985", "ip_address": "127.0.0.1", "busi_org_id": "025", "busiseqno": seqno, "terminal_os_type": "0", "tranus": "xadmin", "initiator_seq": seqno, "pageIndex": "1", "pageno": "1", "pgsize": "1", "callseqno": seqno, "channel_id": "MIUN" } } return Requester(headers=header, json=data)
def PATSCMSS5005(self): '''乐信授信申请''' seqno = generate_random_num(17) calseqno = "LN" + generate_random_num(12) name = get_name() mobile = get_tel() mail = get_email() cardNo = "6216610200016587010" applyNo = generate_random_num(18) userid = "user" + generate_random_num(9) random_sex = random.randint(1, 2) applyTime = get_time() date = get_date() idnumber = IdNumber.generate_id(random_sex) birthDate = IdNumber(idnumber).get_birthday() """影像件上传155 SFTP""" tar = get_tar(applyNo=applyNo) src = "D:\\Python_work\\walnuts_api\\api_test\\img\\" + tar # path = "/upload/LXIN/photo/20201208/" + tar path = "/upload/LXIN/photo/" + date + "/" + tar upload_LXIN(src, path) time.sleep(1) os.remove(src) """报文头信息""" header = { "api_id": "PATSCMSS5005", "country": "cn", "calseqno": seqno, "dapplication": "81001", "service": "PATSCMSS5005", "callseqno": calseqno, "dgroup": "onl01", "dversion": "1.0", "busiseqno": calseqno, "Content-Type": "application/json" } data = { "input": { "applyNo": applyNo, "channelCode": "LXIN", "applyTime": applyTime, "prodCode": "LXIN001", "applyAmt": "20000", "applyPeriod": "12", "userInfo": { "userId": userid, "custName": name, "certNo": idnumber, "gender": random_sex, "cardNo": cardNo, "mobileNo": mobile, "emaill": mail, "certType": "101", "certValidStart": "20200810", "certValidEnd": "99991231", "birthDate": birthDate, "marryStatus": "10", "eduLevel": "010", "degree": "5", "monthIncome": "5", "inctry": "156", "liveStatus": "5", "liveYear": "5", "liveAddProvince": "上海", "liveAddCity": "上海", "liveAddArea": "黄浦", "liveAddress": "滇池路81号嘉煜外滩中心", "cardTpye": "C", "workInfo": { "empName": "上海中银消费", "empTelNo": "010-88888888", "empIndustry": "J", "empProp": "0", "workAddProvince": "上海", "workAddCity": "上海", "workAddArea": "黄浦", "workAddDetail": "滇池路74号中银消费", "empZipCode": "200120", "profession": "0", "jobTit": "9", "jobPos": "9", }, "emergList": [{ "emergName": "马保国", "emergRelation": "PARENT", "emergTel": "15936617570", "emergCertNo": "440300196308081042" }] } }, "comm_req": { "trantm": "752512", "initiator_system": "301", "app_version": "1.0", "trxn_branch": "77710", "call_seq": calseqno, "trxn_teller": "95068241", "sponsor_system": "810", "auth_user_id": "587046", "servtp": "TE", "sys_version": "1.0", "inpudt": date, "servno": "004", "busi_seq": seqno, "page_start": "1", "trxn_seq": seqno, "tranbr": date, "trandt": date, "longitude": "31.2579921", "page_size": "10", "orderSeq": calseqno, "phone_type": "0", "initiator_date": date, "inpucd": "985", "busisq": seqno, "rsa_key": "77777777777777", "inpusq": calseqno, "corpno": "985", "ip_address": "127.0.0.1", "busi_org_id": "025", "busiseqno": seqno, "terminal_os_type": "0", "tranus": "xadmin", "initiator_seq": calseqno, "pageIndex": "1", "pageno": "1", "pgsize": "1", "callseqno": calseqno, "channel_id": "LXIN" } } return Requester(headers=header, json=data)
def VIPS_apply(self): '''授信申请接口加密''' seqno = generate_random_str(9) userBirthDate = get_birthday() todaydate = get_date() # 客户信息 custName = get_name() # 客户名称 usertel = get_tel() # 电话号码 spname = get_name() # 配偶名称 emergTel = get_tel() # 配偶联系安话 email = get_email() # 邮件地址 random_sex = random.randint(0, 1) idnumber = IdNumber.generate_id(random_sex) # 客户身份证号码 # 申请单号 referno = "BO" + generate_random_num(16) """影像件上传""" applyImgPath = "/lttsdata/ICMS/VIPS" + referno + "/1.jpg" src_file = '/img\\' src_file = rename(src_file, referno) src_file = src_file + "\\1.jpg" upload(src_file, applyImgPath) data = { "header": { "requestNo": seqno, "timestamp": seqno, "merchantId": "VIP", }, "body": { "openAccountOrderNo": referno, "userBaseInfo": { "userName": custName, "userMobile": usertel, "idType": "0", "userIdNo": idnumber, "userIdIssueOrg": "公安局", "userIdStartDate": "20180916", "userIdExpiryDate": "20280916", "userNation": "01", "userSex": random_sex + 1, "userBirthDate": userBirthDate, "education": "DOCTOR", "userMaritalStatus": "MARRIED_NO_CHILDREN", "userOccupation": "020403", "userCardNo": "622202649761688358", "userCardType": "10", "spouseName": spname, "spouseMobile": emergTel, "spouseCertType": "0", "spouseIdNo": "110101199210015111", "spouseExpiryDate": "20280916", "spouseCorp": "上海市棉花糖厂", "userCorp": "上海市棉花糖厂", "userCorpAddr": "上海市浦东新区蓝天路778号", "userCorpType": "", "userCorpZip": "", "userEmail": email, "userResidenceAddrProvince": "上海市", "userResidenceAddrCity": "上海市", "userResidenceAddrCounty": "浦东新区", "userResidenceAddr": "上海市浦东新区蓝天路233号", "userLiveAddrProvince": "上海市", "userLiveAddrCity": "上海市", "userLiveAddrCounty": "浦东新区", "userLiveAddr": "上海市浦东新区蓝天路233号", "userLiveZip": "200120", "userLiveStatus": "TENEMENT", }, "contactInfo": { "emergencyContactName": spname, "emergencyContactMobile": emergTel, "emergencyContactRelType": "SPOUSE", }, "incomeInfo": { "monthIncome": "6", "yearIncome": "", "familyIncom": "", "moreIncome": "", "taxIdCode": "", }, "riskInfo": { "limit": "20000", "dailyIntRate": "", "yearIntRate": "0.237600", "vipApplyScore": "", }, "extraInfo": { "bizDate": todaydate, "ocrType": "01", } } } return Requester(json=data)