17 changed files with 817 additions and 4 deletions
Unified View
Diff Options
-
20001.robot
-
441-Client/1-APPlogin.robot
-
631-Client/2-Createorder.robot
-
491-Client/3-Withdrawal_application.robot
-
471-Client/4-Real name authentication.robot
-
431-Client/5-Add_bank_card.robot
-
01-Client/__init__.robot
-
281-Client/factory.robot
-
652-Background_system/1-Consignment management/1-appointment.robot
-
1882-Background_system/1-Consignment management/2-Upload-weightnote.robot
-
702-Background_system/1-Consignment management/3-Operation_audit.robot
-
772-Background_system/1-Consignment management/New_paper_mill.robot
-
342-Background_system/2-Withdrawal_application/4-Financial_audit.robot
-
272-Background_system/2-Withdrawal_application/Withdrawal application/1-Automatic_receipt.robot
-
272-Background_system/2-Withdrawal_application/Withdrawal application/2-Manual_receipt.robot
-
182-Background_system/3-operation management/contract.robot
-
212-Background_system/weblogin.robot
@ -0,0 +1,44 @@ |
|||||
|
*** Settings *** |
||||
|
Suite Setup |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'} |
||||
|
${url} http://api-client-ztb-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
userlogin |
||||
|
[Setup] |
||||
|
#验证码登录 |
||||
|
#${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 |
||||
|
Create Session ZTBT http://api-client-uec-test.qniao.cn ${header} |
||||
|
${data} Create Dictionary account=15014242835 captcha=888888 accountType=2 |
||||
|
${respones} POST On Session ZTBT /uec/authorize/by-captcha json=${data} |
||||
|
log ${respones.status_code} |
||||
|
log ${respones.json()} |
||||
|
${token} Get From Dictionary ${respones.json()["data"]} token |
||||
|
#log ${respones.json()["data"]["token"]} |
||||
|
Set Global Variable ${token} |
||||
|
[Teardown] |
||||
|
|
||||
|
login-token |
||||
|
#${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 |
||||
|
Create Session ZTBT ${url} ${header} |
||||
|
${token1} Create Dictionary loginToken=${token} |
||||
|
${reps} Post On Session ZTBT recycle-user-center/authorize/get/product-line-token/by/login-token json=${token1} |
||||
|
${gettoken} Get From Dictionary ${reps.json()["data"]} token #获取token |
||||
|
${userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id |
||||
|
log ${reps.json()["data"]["token"]} |
||||
|
Set Global Variable ${gettoken} |
||||
|
Set Global Variable ${userId} |
||||
|
|
||||
|
getuserinfo |
||||
|
#获取用户信息 |
||||
|
${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${gettoken} |
||||
|
Create Session baseinfo ${url} ${header} |
||||
|
${reps} Get On Session baseinfo recycle-service/user/get/base-info |
||||
|
${realName} Get From Dictionary ${reps.json()["data"]} realName #获取实名 |
||||
|
${userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id |
||||
|
Set Global Variable ${realName} |
||||
|
Set Global Variable ${userId} |
||||
@ -0,0 +1,63 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 创建常规订单 |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library DateTime |
||||
|
Library RedisLibrary |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'} |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get-factorylist |
||||
|
#${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${gettoken} |
||||
|
Create Session factorylist http://api-client-ztb-test.qniao.cn ${header} |
||||
|
${reps} Get On Session factorylist recycle-service/get/paper-mill-paper-category-price-list params=cityId=&enableSalesAgent=1&pageNum=1&pageSize=10&listType=0 |
||||
|
#log ${reps.json()} |
||||
|
#Set Global Variable ${reps} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
log ${reps.json()["data"]["records"]} |
||||
|
${categoryid} Get From Dictionary ${reps.json()["data"]["records"][0]["paperCategoryList"][1]} categoryId #纸厂品类id |
||||
|
${unitPrice} Get From Dictionary ${reps.json()["data"]["records"][0]["paperCategoryList"][1]} unitPrice #纸厂品类价格 |
||||
|
${cumulativeWeight} Get From Dictionary ${reps.json()["data"]["records"][0]} cumulativeWeight #累计已代卖吨数 |
||||
|
Set Global Variable ${categoryid} |
||||
|
Set Global Variable ${unitPrice} |
||||
|
|
||||
|
链接redis |
||||
|
#连接redis |
||||
|
${redis_conn}= Connect To Redis 8.135.8.221 6379 2 qnredis |
||||
|
${data} Get From Redis ${redis_conn} 1234567890 |
||||
|
${redis_data} Get From Redis ${redis_conn} PAPER_MILL_ID |
||||
|
|
||||
|
get-carinfo |
||||
|
#获取使用过的车辆信息 |
||||
|
${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${gettoken} |
||||
|
Create Session get-carinfo http://api-client-ztb-test.qniao.cn ${header} |
||||
|
${reps} Get On Session get-carinfo recycle-service/proxy-sell/get/his-car-info |
||||
|
log ${reps.json()} |
||||
|
${carNumber} Get From Dictionary ${reps.json()["data"]} records |
||||
|
${plateNumber1} Evaluate random.choice(${carNumber}) random |
||||
|
log to console \nvalue:${plateNumber1} |
||||
|
${plateNumber} Get From Dictionary ${plateNumber1} plateNumber #车辆信息 |
||||
|
Set Global Variable ${plateNumber} |
||||
|
|
||||
|
choose-factory |
||||
|
${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${gettoken} |
||||
|
Create Session choose-factory https://api-client-ztb-test.qniao.cn ${header} |
||||
|
${reps} Get On Session choose-factory recycle-service/get/paper-mill-paper-category-price-details/612629674392162304 |
||||
|
log ${reps.json()["data"]} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
|
||||
|
createorder |
||||
|
#下单 |
||||
|
${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=QNT ${gettoken} |
||||
|
${datatime} get current date result_format=%Y-%m-%d |
||||
|
log ${datatime} |
||||
|
${data} Set Variable {"paperCategoryId":"${categoryid}" ,"unitPrice":${unitPrice},"totalEstimatedWeight":30000,"customerName":"赖勇兰","deliveryTime":"${datatime}","carInfos":[{"plateNumber":"${plateNumber}"}]} |
||||
|
log ${data} |
||||
|
Create Session createorder http://api-client-ztb-test.qniao.cn ${header} |
||||
|
${reps} Post On Session createorder recycle-service/proxy-sell/create/order ${data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
Set Global Variable ${datatime} |
||||
|
#sleep 10 |
||||
@ -0,0 +1,49 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 提现申请 |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
|
||||
|
*** Variables *** |
||||
|
${URL} http://api-client-psc-test.qniao.cn/ |
||||
|
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528','Authorization':'${gettoken}'} |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get_balance |
||||
|
#查看账户余额 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT payment-settlement-center/balance/get/balance |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get_order-withdrawal-list |
||||
|
#获取可提现单列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps_data} Get On Session ZTBT payment-settlement-center/balance/get/order-withdrawal-list |
||||
|
log ${reps_data.json()} |
||||
|
${tradeOrderId} Get From Dictionary ${reps_data.json()["data"]["orderWithdrawalList"][-1]} tradeOrderId #交易订单号 |
||||
|
${提现订单id} Get From Dictionary ${reps_data.json()["data"]["orderWithdrawalList"][-1]} id #提现订单id |
||||
|
#${orderWithdrawalList} Get From Dictionary ${reps_data.json()["data"]} orderWithdrawalList |
||||
|
#${value} Evaluate random.choice(${orderWithdrawalList} ) random |
||||
|
#log to console \nvalue: ${value} |
||||
|
Set Global Variable ${tradeOrderId} |
||||
|
Set Global Variable ${提现订单id} |
||||
|
|
||||
|
getBankCardList |
||||
|
#获取银行卡列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT payment-settlement-center/bankcard/getBankCardList |
||||
|
${data_list} Get From Dictionary ${reps.json()} data #银行卡列表 |
||||
|
log ${data_list} |
||||
|
${value} Evaluate random.choice(${data_list}) random |
||||
|
log to console \nvalue: ${value} |
||||
|
${银行卡id} Get From Dictionary ${value} id #银行卡id |
||||
|
Set Global Variable ${银行卡id} |
||||
|
|
||||
|
order_withdraw |
||||
|
#提交申请提现 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable {"bankId":"${银行卡id} ","ids":["${提现订单id} "]} |
||||
|
${reps} Post On Session ZTBT payment-settlement-center/balance/order/withdraw ${data} |
||||
|
#log ${reps.json()} |
||||
|
${markedWords} Get From Dictionary ${reps.json()["data"]} markedWords |
||||
|
log ${markedWords} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
@ -0,0 +1,47 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 实名认证 |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
|
||||
|
*** Variables *** |
||||
|
${URL} http://api-client-uec-test.qniao.cn |
||||
|
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528','Authorization':'${gettoken}'} |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
identity-auth-session |
||||
|
#创建身份认证对话 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT uec/create/identity-auth-session |
||||
|
log ${reps.json()} |
||||
|
${token} Get From Dictionary ${reps.json()["data"]} token #临时token |
||||
|
${userId} Get From Dictionary ${reps.json()["data"]} userId #用户id |
||||
|
Set Global Variable ${token} |
||||
|
Set Global Variable ${userId} |
||||
|
|
||||
|
certificate-img |
||||
|
#上传身份证图片 |
||||
|
${filepath1} Set Variable E:/lyl/图片/20210805134405.jpg |
||||
|
${frontImg} Evaluate base64.b64encode(open('${filepath1}','rb').read()).decode('utf-8') base64 |
||||
|
log ${frontImg} |
||||
|
${filepath2} Set Variable E:/lyl/图片/20210805134412.jpg |
||||
|
${backImg} Evaluate base64.b64encode(open('${filepath2}','rb').read()).decode('utf-8') base64 |
||||
|
log ${backImg} |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
log ${frontImg} |
||||
|
${data} Set Variable { \ \ \ \ "identityAuthToken":"${token}", \ \ \ \ "frontImg":{ \ \ \ \ \ \ \ \ "base64":"${frontImg}", \ \ \ \ \ \ \ \ "type":"jpg" \ \ \ \ }, \ \ \ \ "backImg":{ \ \ \ \ \ \ \ \ "base64":"${backImg}", \ \ \ \ \ \ \ \ "type":"jpg" \ \ \ \ } } |
||||
|
${result} Post On Session ZTBT uec/recognize/certificate-img ${data.encode('utf-8')} |
||||
|
log ${result.json()} |
||||
|
${certificateNo} Get From Dictionary ${result.json()["data"]} certificateNo #获取身份证号 |
||||
|
${realName} Get From Dictionary ${result.json()["data"]} realName #获取持卡人姓名 |
||||
|
${identityAuthToken} Get From Dictionary ${result.json()["data"]} identityAuthToken #身份认证token |
||||
|
Set Global Variable ${certificateNo} |
||||
|
Set Global Variable ${realName} |
||||
|
Set Global Variable ${identityAuthToken} |
||||
|
|
||||
|
identity |
||||
|
#身份认证 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable {"realName":"${realName}","certificateNo":"${certificateNo}","identityAuthToken":"${identityAuthToken}"} |
||||
|
${reps} Post On Session ZTBT uec/identify/identity ${data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
@ -0,0 +1,43 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 添加银行卡 |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
|
||||
|
*** Variables *** |
||||
|
${URL} http://api-client-psc-test.qniao.cn |
||||
|
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528','Authorization':'${gettoken}'} |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
getBankCardList |
||||
|
#获取银行卡列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT payment-settlement-center/bankcard/getBankCardList |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
bankcard_home |
||||
|
#获取银行卡信息 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT payment-settlement-center/bankcard/bankcard/home/6212263602133910992 |
||||
|
log ${reps.json()} |
||||
|
${cardNo} Get From Dictionary ${reps.json()["data"]} cardNo #获取银行卡号 |
||||
|
${bankName} Get From Dictionary ${reps.json()["data"]} bankName #获取银行名称 |
||||
|
${bank} Get From Dictionary ${reps.json()["data"]} bank #银行名称 |
||||
|
${cardType} Get From Dictionary ${reps.json()["data"]} cardType #银行卡类型 |
||||
|
Set Global Variable ${cardNo} |
||||
|
Set Global Variable ${bankName} |
||||
|
Set Global Variable ${bank} |
||||
|
Set Global Variable ${cardType} |
||||
|
|
||||
|
bankverify |
||||
|
#添加银行卡 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable {"phone":null,"cardName":null,"cardNo":"${cardNo}","openingBank":null,"cardType":null,"idno":null,"name":"${realName}","verificationCode":null,"isExist":0,"type":2} |
||||
|
${repsponse} Post On Session ZTBT payment-settlement-center/bankcard/post/verify/bankverify ${data.encode('utf-8')} |
||||
|
log ${repsponse.json()} |
||||
|
|
||||
|
post_bankverify |
||||
|
#提交银行卡验证 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable {"phone":"15014242835","cardName":"${bank}","cardNo":"${cardNo}","openingBank":null,"cardType":"${cardType}","idno":null,"name":"${realName}","verificationCode":"888888","isExist":0,"type":4} |
||||
|
${reps} Post On Session ZTBT payment-settlement-center/bankcard/post/verify/bankverify ${data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
@ -0,0 +1,28 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'Content-Type': 'application/json','X-APP-ID':'503258978847953924'} |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
login |
||||
|
${header} Create Dictionary Content-Type=application/json X-APP-ID=503258978847953924 |
||||
|
Create Session ZTBF http://api-client-uec-test.qniao.cn ${header} |
||||
|
${data} Create Dictionary account=13517986787 captcha=888888 accountType=2 |
||||
|
log ${data} |
||||
|
#${data} Set Variable {"account":"13517986787","accountType":2,"captcha":"888888","signType":1,"sign":"c2d5ef09b96575e04503461af4bc7044","signStr":"{\"account\":\"13517986787\",\"accountType\":2,\"captcha\":\"888888\",\"signType\":1}"} |
||||
|
${respones} POST On Session ZTBF /uec/authorize/by-captcha json=${data} |
||||
|
${gettoken} Get From Dictionary ${respones.json()["data"]} token |
||||
|
Set Global Variable ${gettoken} |
||||
|
|
||||
|
login-token |
||||
|
${header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847953924 Authorization=QNT ${gettoken} |
||||
|
Create Session ZTB http://api-client-ztb-test.qniao.cn ${header} |
||||
|
${data} Set Variable {"loginToken":"${gettoken}"} |
||||
|
${respones} POST On Session ZTB recycle-user-center/authorize/get/product-line-token/by/login-token ${data} |
||||
|
|
||||
|
员工管理 |
||||
|
${header} Create Dictionary X-APP-ID=503258978847953924 X-FACTORY-ID=615992051053498368 Authorization=QNT ${gettoken} |
||||
|
Create Session ZTBF http://api-client-ztb-test.qniao.cn ${header} |
||||
|
${reps} Get On Session ZTBF recycle-user-center/get/self-department-role-list |
||||
@ -0,0 +1,65 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library DateTime |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'Token 6b08add42d6bcf73abb935b2adf83525','Content-Type':'application/json'} |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
reservation-list |
||||
|
#${header} Create Dictionary X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525 |
||||
|
#获取预约列表信息 |
||||
|
Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header} |
||||
|
${reps_data} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-order-reservation-list params=pageNum=1&pageSize=20&status= |
||||
|
log ${reps_data.json()} |
||||
|
#获取订单编号${orderId}、纸厂id${paperMillId}、订单类型${orderType} |
||||
|
${orderId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderId #订单编号 |
||||
|
${paperMillId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillId #纸厂id |
||||
|
${id} Get From Dictionary ${reps_data.json()["data"]["records"][0]} id #预约id |
||||
|
${orderType} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderType #订单类型 |
||||
|
${carNoList} Get From Dictionary ${reps_data.json()["data"]["records"][0]} carNoList #车辆信息 |
||||
|
${paperMillName} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillName #纸厂名称 |
||||
|
${sellerReservationDate} Get From Dictionary ${reps_data.json()["data"]["records"][0]} sellerReservationDate #送货时间 |
||||
|
#随机获取车辆信息 |
||||
|
${carList} Evaluate random.choice(${carNoList}) random |
||||
|
log to console \nvalue:${carList} |
||||
|
Should Be Equal As Strings ${reps_data.json()["message"]} successful |
||||
|
Set Global Variable ${orderId} |
||||
|
Set Global Variable ${paperMillId} |
||||
|
Set Global Variable ${id} |
||||
|
Set Global Variable ${paperMillName} |
||||
|
Set Global Variable ${sellerReservationDate} |
||||
|
Set Global Variable ${orderType} |
||||
|
Set Global Variable ${carList} |
||||
|
|
||||
|
get-factory-list |
||||
|
Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-list params=pageNum=1&pageSize=20&name= |
||||
|
${id} Get From Dictionary ${reps.json()["data"]["records"][0]} id |
||||
|
log ${id} |
||||
|
Set Suite Variable ${id} |
||||
|
|
||||
|
get-supplier |
||||
|
Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId} |
||||
|
log ${reps.json()} |
||||
|
#获取供应商id和name |
||||
|
${data} Get From Dictionary ${reps.json()} data |
||||
|
${value} Evaluate random.choice(${data}) random |
||||
|
log to console \nvalue: ${value} |
||||
|
${supplier_id} Get From Dictionary ${value} id #供应商id |
||||
|
${millSupplierName} Get From Dictionary ${value} name #供应商名称 |
||||
|
Set Suite Variable ${supplier_id} |
||||
|
Set Suite Variable ${millSupplierName} |
||||
|
|
||||
|
Submit-appointment |
||||
|
#${headers} Create Dictionary Content-Type=application/json X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525 |
||||
|
#提交预约信息 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${datatime} get current date result_format=%Y-%m-%d |
||||
|
${data} Set Variable {"attention":"${orderId}","buyerReservationDate":"${datatime}", "id":"${id}","millDeliveryOrderId":"${orderId}","millSupplierId":"${supplier_id}","millSupplierName":"${millSupplierName}","proxySellerSettleType":1,"scrapeOrderId":"${orderId}"} |
||||
|
log ${data} |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/customer-service/update/reservation ${data.encode('utf-8')} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
@ -0,0 +1,188 @@ |
|||||
|
*** Settings *** |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
Library DateTime |
||||
|
Library requests |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'Token 6b08add42d6bcf73abb935b2adf83525','Content-Type':'application/json'} |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
${filepath} E:\lyl\图片\ChMkKWCUz0SIX9MmADmjEvANMxkAAOa3QAAAAAAOaMq795.jpg |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get-order-item-list |
||||
|
#查找预约的订单列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order-item-list params=orderType=${orderType} &pageNum=1&pageSize=10&status=51&orderId=${orderId} |
||||
|
log ${reps.json()} |
||||
|
${orderItemId} Get From Dictionary ${reps.json()["data"]["records"][0]} orderItemId #订单项编号 |
||||
|
Set Global Variable ${orderItemId} |
||||
|
Should Be Equal As Strings ${reps.json()["data"]["records"][0]["orderId"]} ${orderId} |
||||
|
|
||||
|
get-order-item-details |
||||
|
#查看订单列表详情 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
#${data} Set Variable orderId=${orderId} orderItemId=${orderItemId} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
||||
|
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #当前订单下单时的合同id |
||||
|
${unitSurcharge} Get From Dictionary ${reps.json()["data"]} unitSurcharge #代卖费 |
||||
|
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式 |
||||
|
${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类ID |
||||
|
${unitPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类单价 |
||||
|
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴 |
||||
|
${millSupplierId} Get From Dictionary ${reps.json()["data"]} millSupplierId #纸厂供应商ID |
||||
|
${paperMillSupplierName} Get From Dictionary ${reps.json()["data"]} paperMillSupplierName #纸厂供应商名称 |
||||
|
${settleUtiPrice} Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
||||
|
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
||||
|
log ${contractId} |
||||
|
Set Global Variable ${contractId} |
||||
|
Set Global Variable ${unitSurcharge} |
||||
|
Set Global Variable ${paperCategoryId} |
||||
|
Set Global Variable ${settleUtiPrice} |
||||
|
log ${reps.json()} |
||||
|
Set Global Variable ${unitPrice} |
||||
|
Set Global Variable ${publicSubsidies} |
||||
|
Set Global Variable ${millSupplierId} |
||||
|
Set Global Variable ${paperMillSupplierName} |
||||
|
Set Global Variable ${proxySellerSettleType} |
||||
|
Set Global Variable ${contractId} |
||||
|
|
||||
|
get-Transaction subject |
||||
|
#获取交易主体 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/transaction-main-enterprise/list/name |
||||
|
${交易} Get From Dictionary ${reps.json()} data |
||||
|
#随机获取交易主体 |
||||
|
${交易主体} Evaluate random.choice(${交易}) random |
||||
|
log to console \nvalue:${交易主体} |
||||
|
Set Global Variable ${交易主体} |
||||
|
|
||||
|
get-Warehouse |
||||
|
#获取所属仓库 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/transaction-main-enterprise/get/warehouse-name |
||||
|
${仓库} Get From Dictionary ${reps.json()} data |
||||
|
#随机获取仓库 |
||||
|
${所属仓库} Evaluate random.choice(${仓库}) random |
||||
|
log to console \nvalue:${所属仓库} |
||||
|
Set Global Variable ${所属仓库} |
||||
|
|
||||
|
get-Source of funds |
||||
|
#获取资金来源 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/fund-source/get/list |
||||
|
log ${reps.json()} |
||||
|
#@{data} Get From Dictionary ${reps.json()} data |
||||
|
${name} Get From Dictionary ${reps.json()["data"][5]} name #资金来源名称 |
||||
|
${id} Get From Dictionary ${reps.json()["data"][5]} id #资金来源id |
||||
|
Set Global Variable ${name} |
||||
|
Set Global Variable ${id} |
||||
|
#FOR ${isDefault} IN @{data} |
||||
|
#${isDefault} Set Variable 1 |
||||
|
#Run Keyword If ${isDefault}==1 log ${reps.json()["data"][5]["name"]} |
||||
|
#Set Global Variable ${isDefault} |
||||
|
#\ Run Keyword If '${isDefault}'==5 log @{data} |
||||
|
|
||||
|
get-contract-list |
||||
|
#获取订单纸厂的所有合同信息 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT /recycle-service/admin/contract/get/selectable-contract-list params=orderItemId=${orderItemId} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get-supplier |
||||
|
#获取纸厂供应商 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get-category price |
||||
|
#获取下单品类,上传磅单时的价格 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${dataTime} Get Current Date result_format=%Y-%m-%d |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get-category-price-by-date params=orderItemId=${orderItemId}&weightDay=${dataTime} |
||||
|
log ${reps.json()} |
||||
|
${price} Get From Dictionary ${reps.json()["data"][0]} price #下单品类价格 |
||||
|
${publicSubsidies} Get From Dictionary ${reps.json()["data"][0]} publicSubsidies #下单品类公开补贴 |
||||
|
Set Global Variable ${price} |
||||
|
Set Global Variable ${publicSubsidies} |
||||
|
Set Global Variable ${dataTime} |
||||
|
|
||||
|
get_paper-mill-category |
||||
|
#获取当前纸厂的所有纸品品类 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-category/${paperMillId} params=id=${paperMillId} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get_contract_by_id |
||||
|
#获取下单时绑定的合同 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/contract/get/detail-by-id params=id=${contractId} |
||||
|
log ${reps.json()} |
||||
|
#获取垫资费、企业ID、应收金额结算规则、含税结算单价结算规则 |
||||
|
${advanceFund} Get From Dictionary ${reps.json()["data"]} advanceFund #垫资费 |
||||
|
${buyerEnterpriseId} Get From Dictionary ${reps.json()["data"]} buyerEnterpriseId #企业id |
||||
|
${settleRules} Get From Dictionary ${reps.json()["data"]} settleRules #应收金额结算规则 |
||||
|
${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则 |
||||
|
${taxRefundRate} Get From Dictionary ${reps.json()["data"]} taxRefundRate #税点 |
||||
|
${proxyPaySurcharge} Get From Dictionary ${reps.json()["data"]} proxyPaySurcharge #代收费 |
||||
|
${hasInvoice} Get From Dictionary ${reps.json()["data"]} hasInvoice #是否开票 |
||||
|
${accountPeriodType} Get From Dictionary ${reps.json()["data"]} accountPeriodType #账期类型 |
||||
|
${isSubsidyAndDeductIncludeTax} Get From Dictionary ${reps.json()["data"]} isSubsidyAndDeductIncludeTax #纸厂补贴是否含税 |
||||
|
${receivableSettlementRules} Get From Dictionary ${reps.json()["data"]} settleRules #应收金额结算规则 |
||||
|
${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则 |
||||
|
Set Global Variable ${advanceFund} |
||||
|
Set Global Variable ${buyerEnterpriseId} |
||||
|
Set Global Variable ${taxRefundRate} |
||||
|
Set Global Variable ${proxyPaySurcharge} |
||||
|
Set Global Variable ${hasInvoice} |
||||
|
Set Global Variable ${accountPeriodType} |
||||
|
Set Global Variable ${settleRules} |
||||
|
Set Global Variable ${settlePriceIncludeTaxSettleRules} |
||||
|
Set Global Variable ${isSubsidyAndDeductIncludeTax} |
||||
|
Set Global Variable ${receivableSettlementRules} |
||||
|
Set Global Variable ${settlePriceIncludeTaxSettleRules} |
||||
|
|
||||
|
Upload_pictures |
||||
|
#上传图片 |
||||
|
#${dict} Create Dictionary Content-Type=image/jpeg filename=20210803.jpg |
||||
|
#Create Session ZTBT ${URL} ${dict} |
||||
|
${filepath} Evaluate open('E:/lyl/图片/21042217001449712.png','rb') |
||||
|
${image} Evaluate open('E:/lyl/图片/21042217001449712.png','rb') |
||||
|
${file} Create Dictionary filepath=${filepath} image=${image} |
||||
|
Create Session ZTBT ${URL} |
||||
|
log ${file} |
||||
|
${result} Post On Session ZTBT recycle-user-center/upload/image files=${file} |
||||
|
${pictures} Get From Dictionary ${result.json()} data |
||||
|
log ${result.content} |
||||
|
Set Global Variable ${pictures} |
||||
|
|
||||
|
get_repeat_proxy-order |
||||
|
#获取重复订单信息 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
#${datatime} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/repeat/proxy-order params=orderItemId=${orderItemId}&plateNumber=${carList}&settleWeight=13550&weighingDate=${datatime}&orderType=${orderType} |
||||
|
log ${reps.json()} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
|
||||
|
weightnote |
||||
|
#提交磅单 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${datatime} Get Current Date result_format=%Y-%m-%d |
||||
|
${data} Set Variable { \ \ \ \ "deductedPoint":9.666666666666666, \ \ \ \ "imageUrl":["${pictures}"], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "millSupplierId":"${millSupplierId}", \ \ \ \ "millSupplierName":"${paperMillSupplierName}", \ \ \ \ "settleUtiPriceIncludeTax":2.2677065, \ \ \ \ "settleUtiPriceIncludeTaxType":1, \ \ \ \ "receivableAdjustMoney":"10", \ \ \ \ "refundSubsidy":0.002, \ \ \ \ "adjustMoney":"30", \ \ \ \ "collectionCharges":0, \ \ \ \ "advanceFund":0, \ \ \ \ "contractId":"${contractId}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "deductionNotes":"2021年8月9号", \ \ \ \ "plateNumber":"${carList}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "netWeight":15000, \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge}", \ \ \ \ "deliveryImageUrls":[], \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "isSubsidyAndDeductIncludeTax":1, \ \ \ \ "orderId":"621039556547973120", \ \ \ \ "settleWeight":13550, \ \ \ \ "deductedWeight":1.45, \ \ \ \ "orderType":"${orderType}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"freightSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"contrabandPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ] \ } |
||||
|
log ${data} |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/save/weightnote data=${data.encode('utf-8')} |
||||
|
log ${reps.json()["data"]} |
||||
|
${weightNoteId} Get From Dictionary ${reps.json()["data"]} weightNoteId |
||||
|
Set Global Variable ${weightNoteId} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
|
||||
|
audit_weightnote |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${repsonse} Post On Session ZTBT recycle-service/admin/customer-service/audit/weightnote/${weightNoteId} |
||||
|
log ${repsonse.json()} |
||||
|
|
||||
|
get_proxy-order |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
||||
|
log ${reps.json()} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
@ -0,0 +1,70 @@ |
|||||
|
*** Settings *** |
||||
|
Library DateTime |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'Token 6b08add42d6bcf73abb935b2adf83525','Content-Type':'application/json'} |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get_operation_list |
||||
|
#获取运营审核列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0 |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get_paper-mill-order-by-orderItemId |
||||
|
#根据订单编号获取运营审核单 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=${orderItemId} |
||||
|
log ${reps.json()} |
||||
|
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId #获取审核id |
||||
|
${weightNoteId} Get From Dictionary ${reps.json()["data"]["records"][0]} weightNoteId #获取磅单id |
||||
|
Set Global Variable ${auditRequestId} |
||||
|
Set Global Variable ${weightNoteId} |
||||
|
|
||||
|
get_order-log-detail |
||||
|
#获取订单日志 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get_order-receipt-audit-details |
||||
|
#查看运营审核详情 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
||||
|
log ${reps.json()} |
||||
|
${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id |
||||
|
${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称 |
||||
|
${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重 |
||||
|
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期 |
||||
|
${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号 |
||||
|
${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量 |
||||
|
Set Global Variable ${auditRequestItemId} |
||||
|
Set Global Variable ${categoryName} |
||||
|
Set Global Variable ${netWeight} |
||||
|
Set Global Variable ${paperMillPayAt} |
||||
|
Set Global Variable ${plateNumber} |
||||
|
Set Global Variable ${settleWeight} |
||||
|
|
||||
|
order-receipt-audit-details |
||||
|
#b保存磅单信息 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":${netWeight}, \ \ \ \ "paperCategoryId":null, \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "receivablePrice":29186.7, \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":${settleWeight}, \ \ \ \ "isInvoice":${hasInvoice}, \ \ \ \ "fundSourceId":${id}, \ \ \ \ "transactionMainEnterpriseName":"${交易主体}", \ \ \ \ "invoicePoint":${taxRefundRate}, \ \ \ \ "publicSubsidies":${publicSubsidies}, \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":${settleUtiPrice}, \ \ \ \ "settleUnitPriceIncludeTax":2.281517, \ \ \ \ "fundSourceName":"${name}" } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
|
||||
|
get_order-log-detail2 |
||||
|
#运营审核驳回操作日志 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId} &operationStatus=2 |
||||
|
log ${reps.json()} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
|
||||
|
operation_audit |
||||
|
#运营审核确认通过 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable { \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"2021年8月10号" } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
@ -0,0 +1,77 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library requests |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'Token 6b08add42d6bcf73abb935b2adf83525','Content-Type':'application/json'} |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get_paperMill_list |
||||
|
#获取纸厂列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-list params=pageNum=1&pageSize=20 |
||||
|
log ${reps} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
|
||||
|
get_regions |
||||
|
#获取区域 |
||||
|
Create Session ZTBT http://api-ops-uec.qniao.cn ${header} |
||||
|
${reps} Get On Session ZTBT uec/get/regions |
||||
|
log ${reps.json()} |
||||
|
${省区域} Get From Dictionary ${reps.json()} data |
||||
|
log ${省区域} |
||||
|
${value} Evaluate random.choice(${省区域}) random |
||||
|
log to console \nvalue: ${value} |
||||
|
${市区域} Get From Dictionary ${value} children #区域省 |
||||
|
log ${市区域} |
||||
|
${value1} Evaluate random.choice(${市区域}) random |
||||
|
log to console \nvalue: ${value1} |
||||
|
${区区域} Get From Dictionary ${value1} children |
||||
|
log ${区区域} |
||||
|
${value2} Evaluate random.choice(${区区域}) random |
||||
|
log to console \nvalue: ${value2} |
||||
|
${区域id} Get From Dictionary ${value2} id #区区域id |
||||
|
${区域name} Get From Dictionary ${value2} name #区区域名称 |
||||
|
Set Suite Variable ${区域id} |
||||
|
|
||||
|
paperMill_logo |
||||
|
#上传纸厂logo |
||||
|
#${dict} Create Dictionary Content-Type=image/jpeg filename=20210803.jpg |
||||
|
#Create Session ZTBT ${URL} ${dict} |
||||
|
${filepath} Evaluate open('E:/lyl/图片/21042217001449712.png','rb') |
||||
|
${image} Evaluate open('E:/lyl/图片/21042217001449712.png','rb') |
||||
|
${file} Create Dictionary filepath=${filepath} image=${image} |
||||
|
Create Session ZTBT ${URL} |
||||
|
log ${file} |
||||
|
${result} Post On Session ZTBT recycle-user-center/upload/image files=${file} |
||||
|
${pictures} Get From Dictionary ${result.json()} data |
||||
|
log ${result.content} |
||||
|
Set Global Variable ${pictures} #本地图片 |
||||
|
|
||||
|
get_employer-auditor-list |
||||
|
#获取渠道归属人 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/employer/get/employer-auditor-list params=name= |
||||
|
log ${reps} |
||||
|
${归属人} Get From Dictionary ${reps.json()} data |
||||
|
${value} Evaluate random.choice(${归属人}) random |
||||
|
log to console \nvalue: ${value} |
||||
|
${adminId} Get From Dictionary ${value} adminId #归属人id |
||||
|
${name} Get From Dictionary ${value} name #归属人名称 |
||||
|
Set Suite Variable ${adminId} |
||||
|
Set Suite Variable ${name} |
||||
|
|
||||
|
New_paper_mill |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable { \ \ \ \ "newTime":[ \ ], \ \ \ \ "name":"天河纸业有限公司", \ \ \ \ "locDistrictId":130204, \ \ \ \ "contacts":"", \ \ \ \ "mobile":"", \ \ \ \ "logoImg":"https://qncloudprintfile.oss-cn-shenzhen.aliyuncs.com/cloudprint/1628499726181.jpg", \ \ \ \ "millSupplierNameList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "account":"天河1号" \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "account":"天河2号" \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "locDetails":"", \ \ \ \ "attentionsReportCar":"", \ \ \ \ "attentionsLoadingCar":"", \ \ \ \ "attentionsArrival":"", \ \ \ \ "attentionsRegulations":"", \ \ \ \ "shortName":"天河纸业", \ \ \ \ "enableSalesAgent":"", \ \ \ \ "paperMillSettlementInfo":{ \ \ \ \ \ \ \ \ "invoicePoint":null, \ \ \ \ \ \ \ \ "invoiceType":null, \ \ \ \ \ \ \ \ "isInvoice":null, \ \ \ \ \ \ \ \ "paperMillId":null, \ \ \ \ \ \ \ \ "paybackIntever":"30" \ \ \ \ }, \ \ \ \ "operatingStrategy":{ \ \ \ \ \ \ \ \ "enableSalesAgent":null, \ \ \ \ \ \ \ \ "fundWarningPercentage":null, \ \ \ \ \ \ \ \ "weightWarningPercentage":null, \ \ \ \ \ \ \ \ "isOperations":null, \ \ \ \ \ \ \ \ "manageNotifyMessage":"该纸厂已暂停接单,请联系相关负责人!", \ \ \ \ \ \ \ \ "proxyPaySurcharge":0.015, \ \ \ \ \ \ \ \ "stopManageThreshold":null, \ \ \ \ \ \ \ \ "surplusFund":null, \ \ \ \ \ \ \ \ "surplusWeight":null, \ \ \ \ \ \ \ \ "adminIds":[ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ "paperMillBizId":"619675947926425600", \ \ \ \ \ \ \ \ "paperMillBizAccount":{ \ \ \ \ \ \ \ \ \ \ \ \ "id":"619675947926425600", \ \ \ \ \ \ \ \ \ \ \ \ "name":"李雷刚" \ \ \ \ \ \ \ \ } \ \ \ \ }, \ \ \ \ "paperMillBizId":"619675947926425600", \ \ \ \ "matCharges":null, \ \ \ \ "collectionCharges":null } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/paperMill/add/paper-mill ${data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
update |
||||
|
Create Session ZTBT http://api-ops-uec.qniao.cn ${header} |
||||
|
${reps} Get On Session ZTBT uec/get/application/update |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
|
||||
|
*** Keywords *** |
||||
@ -0,0 +1,34 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'Token 6b08add42d6bcf73abb935b2adf83525','Content-Type':'application/json'} |
||||
|
${url} http://api-ops-psc-test.qniao.cn |
||||
|
${URL1} http://api-ops-ztb-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get_list |
||||
|
#获取财务审核列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/get/list params=pageNum=1&pageSize=10&status=&orderId=&orderItemId=${orderItemId} |
||||
|
log ${reps.json()} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
|
||||
|
get_order-log-detail |
||||
|
#财务审核驳回操作记录 |
||||
|
Create Session ZTBT ${URL1} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId}&operationStatus=3 |
||||
|
|
||||
|
paper-mill-order-receipt-proof-request_audit |
||||
|
#财务审核确认通过 |
||||
|
Create Session ZTBT ${url} ${header} |
||||
|
${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":1,"remark":"2021年8月10号" } |
||||
|
${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
paper-mill-order-receipt-proof-request_settle |
||||
|
#确认结算 |
||||
|
Create Session ZTBT ${url} ${header} |
||||
|
${data} Set Variable { \ \ \ \ "id":"${auditRequestId}", \ \ \ \ "adminId":null } |
||||
|
${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/settle ${data.encode('utf-8')} |
||||
@ -0,0 +1,27 @@ |
|||||
|
*** Settings *** |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
|
||||
|
*** Variables *** |
||||
|
${URL} http://api-ops-psc-test.qniao.cn |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'Token 6b08add42d6bcf73abb935b2adf83525','Content-Type':'application/json'} |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get_withdraw-list |
||||
|
#通过订单编号获取自动提现列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT payment-settlement-center/admin/settlement/get/withdraw-list params=pageNum=1&pageSize=10&isAutoHandle=1&status=&money=&orderId=${tradeOrderId} |
||||
|
log ${reps.json()} |
||||
|
${records} Get From Dictionary ${reps.json()["data"]} records #提现单列表 |
||||
|
${value} Evaluate random.choice(${records} ) random |
||||
|
log to console \nvalue: ${value} |
||||
|
${提现id} Get From Dictionary ${value} id #提现id |
||||
|
Set Global Variable ${提现id} |
||||
|
|
||||
|
withdraw_{id} |
||||
|
#提现审核 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable { \ \ "billType": 0, \ \ "remark": "string", \ \ "status": 1 } |
||||
|
${reps} Post On Session ZTBT payment-settlement-center/admin/settlement/verify/withdraw/${提现id} ${data} |
||||
|
log ${reps.json()} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
@ -0,0 +1,27 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
|
||||
|
*** Variables *** |
||||
|
${URL} http://api-ops-psc-test.qniao.cn |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'Token 6b08add42d6bcf73abb935b2adf83525','Content-Type':'application/json'} |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get_withdraw-list |
||||
|
#通过订单编号获取手动到账提现列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT payment-settlement-center/admin/settlement/get/withdraw-list params=pageNum=1&pageSize=10&status=0&isAutoHandle=0&orderId=${tradeOrderId} |
||||
|
log ${reps.json()} |
||||
|
${records} Get From Dictionary ${reps.json()["data"]} records #提现列表 |
||||
|
${value} Evaluate random.choice(${records} ) random |
||||
|
log to console \nvalue: ${value} |
||||
|
${提现ID} Get From Dictionary ${value} id #提现id |
||||
|
Set Global Variable ${提现ID} |
||||
|
|
||||
|
settlement_verify-withdraw |
||||
|
#确认提现 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable { \ \ \ \ "id":null, \ \ \ \ "remark":null, \ \ \ \ "status":"1" } |
||||
|
${reps} Post On Session ZTBT payment-settlement-center/admin/settlement/verify/withdraw/${提现ID} ${data} |
||||
|
log ${reps.json()} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
@ -0,0 +1,18 @@ |
|||||
|
*** Settings *** |
||||
|
Library DateTime |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
|
||||
|
*** Variables *** |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'Token 6b08add42d6bcf73abb935b2adf83525','Content-Type':'application/json'} |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get_contract_list |
||||
|
#获取合同列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${response} Get On Session ZTBT recycle-service/admin/contract/get/page-list params=pageNum=1&pageSize=20&status=1 |
||||
|
log ${response.json()} |
||||
|
|
||||
|
get_contract_by_paperMilldName |
||||
|
#通过纸厂查找合同 |
||||
@ -0,0 +1,21 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
pwlogin |
||||
|
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded X-APP-ID=470236309865238555 |
||||
|
Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header} |
||||
|
&{data} Create Dictionary username=laiyonglan@qniao.cn password=qn123456 |
||||
|
log ${data} |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/login data=${data} |
||||
|
log ${reps.json()} |
||||
|
${gettoken} Set Variable Token 6b08add42d6bcf73abb935b2adf83525 |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} 登陆成功 |
||||
|
Set Global Variable ${gettoken} |
||||
|
|
||||
|
login-info |
||||
|
${header} Create Dictionary X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525 |
||||
|
Create Session login-info http://api-ops-ztb-test.qniao.cn ${header} |
||||
|
${reps_data} Get On Session login-info recycle-service/admin/employee/get/login-info |
||||
|
log ${reps_data} |
||||
|
Should Be Equal As Strings ${reps_data.json()["message"]} successful |
||||
Write
Preview
Loading…
Cancel
Save