65 changed files with 2895 additions and 799 deletions
Split View
Diff Options
-
5.pabotsuitenames
-
33001.robot
-
41-Client(Test)/1-APPlogin(Test).robot
-
641-Client(Test)/1-APPlogin(master).robot
-
581-Client(Test)/2.1-CreateRegularorder.robot
-
21-Client(Test)/2.2createActiveorder-1.robot
-
21-Client(Test)/2.3createActiveorder-2.robot
-
21-Client(Test)/3-Withdrawal_application.robot
-
91-Client(Test)/3.1-Automatic withdrawal.robot
-
201-Client(Test)/7-Consignment_order.robot
-
281-Client(Test)/factory.robot
-
BIN1635824097672.xlsx
-
BIN1637047948939.xlsx
-
BIN1637048116722.xlsx
-
BIN1637048161685.xlsx
-
202-Background_system(Test)/1.1-New_PaperMill/New_paper_mill.robot
-
172-Background_system(Test)/1.3-operation management/contract.robot
-
722-Background_system(Test)/1.5-Information_management/information.robot
-
72-Background_system(Test)/2.1-Consignment management/2.1-RegularUpload-weightnote.robot
-
22-Background_system(Test)/2.1-Consignment management/2.2-RegularUpload-weightnote-1.robot
-
42-Background_system(Test)/2.1-Consignment management/2.3-ActiveUpload-deliverynote.robot
-
692-Background_system(Test)/2.1-Consignment management/3.1-Operation_audit.robot
-
42-Background_system(Test)/2.1-Consignment management/3.2-Operation_audit.robot
-
592-Background_system(Test)/2.1-Consignment management/3.3-Operation_audit.robot
-
02-Background_system(Test)/2.1-Consignment management/__init__.robot
-
162-Background_system(Test)/2.1-Consignment management/台账查询.txt
-
1352-Background_system(Test)/2.1-Consignment management/提交磅单.txt
-
612-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt
-
212-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot
-
12-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot
-
62-Background_system(Test)/3-Withdrawal_application/Withdrawal application/1-Automatic_receipt.robot
-
202-Background_system(Test)/3-Withdrawal_application/台账查询.txt
-
302-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt
-
722-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt
-
22-Background_system(Test)/4-Consignment_management/2.3-ActiveUpload-weightnote.robot
-
162-Background_system(Test)/4-Consignment_management/3.3--Operation_audit.robot
-
12-Background_system(Test)/4-Consignment_management/4.3-Financial_audit.robot
-
112-Background_system(Test)/4-Consignment_management/台账查询.txt
-
842-Background_system(Test)/4-Consignment_management/更新磅单.txt
-
532-Background_system(Test)/4-Consignment_management/运营审核驳回.txt
-
22-Background_system(Test)/5-Data comparison/5-Consignment_order.robot
-
652-Background_system(Test)/6-Parameter/1-Operation_audit.robot
-
182-Background_system(Test)/6-Parameter/2-parameter.robot
-
262-Background_system(Test)/6-Parameter/Sys_keyword.txt
-
02-Background_system(Test)/6-Parameter/__init__.robot
-
453-pabotdemo/1-get_list.robot
-
363-pabotdemo/login.txt
-
124-Data-comparison/1-Formula-calculation.robot
-
12DemoApp/APP_login.robot
-
6DemoApp/Keyword.txt
-
0DemoApp/__init__.robot
-
BINDemoApp/app-release.apk
-
0Resource/__init__.robot
-
35Resource/关键字.txt
-
25Resource/关键字使用.robot
-
5UI-APP.robot
-
10UI-Browser.robot
-
320log.html
-
881output.xml
-
657pabot_results/0/output.xml
-
2pabot_results/0/robot_stderr.out
-
18pabot_results/0/robot_stdout.out
-
52pabotdemo/添加银行卡.robot
-
46pabotdemo/登录关键字.txt
-
411report.html
@ -0,0 +1,5 @@ |
|||
datasources:1f57f0dac55f5a53bbfff68148aacd196d320d85 |
|||
commandlineoptions:97d170e1550eee4afc0af065b78cda302a97674c |
|||
suitesfrom:no-suites-from-option |
|||
file:e6bd2b6f473842e0707ffeac9e6799b3f750b5d7 |
|||
--suite 3-Pabotdemo.1-Get List |
|||
@ -1,64 +0,0 @@ |
|||
*** Settings *** |
|||
Suite Setup |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Library urllib3 |
|||
Library DatabaseLibrary |
|||
|
|||
*** Variables *** |
|||
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'} |
|||
${url} http://api-client-ztb.qniao.cn |
|||
|
|||
*** Test Cases *** |
|||
Get_verification-code |
|||
#获取验证码 |
|||
Disable Warnings |
|||
${headers} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 |
|||
Create Session ZTBT https://api-client-uec.qniao.cn ${headers} |
|||
${value} Set Variable {"verifiableAccount":"13168550964","verifiableAccountType":1,"purpose":1} |
|||
${reps} Post On Session ZTBT uec/get/auth-captcha ${value.encode('utf-8')} |
|||
log ${reps.json()} |
|||
sleep 5 |
|||
|
|||
Connect to database |
|||
#正式环境数据库获取验证码 |
|||
Connect To Database Using Custom Params pymysql database='user_enterprise_center', host='rm-wz9it4fs5tk7n4tm1zo.mysql.rds.aliyuncs.com', user='uec_root', password='@qniaouecroot88', port=3306 #连接uec数据库 |
|||
${Verification Code1} Query SELECT code FROM user_enterprise_center.qn_captcha WHERE verifiable_account LIKE '%13168550964%' ORDER BY id DESC LIMIT 0,1 |
|||
${text_code} Set Variable ${Verification Code1[0][0]} |
|||
Set Global Variable ${text_code} |
|||
Disconnect From Database |
|||
|
|||
userlogin |
|||
[Setup] |
|||
#验证码登录 |
|||
Create Session ZTBT https://api-client-uec.qniao.cn ${header} |
|||
#${data} Create Dictionary account=13168550964 captcha=${text_code} accountType=2 |
|||
${data} Set Variable {"accountType":2,"password":null,"account":"13168550964","captcha":"${text_code}"} |
|||
${respones} POST On Session ZTBT uec/authorize/by-captcha ${data.encode('utf-8')} |
|||
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} |
|||
@ -1,28 +0,0 @@ |
|||
*** 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,72 @@ |
|||
*** Settings *** |
|||
Library DateTime |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
Library urllib3 |
|||
Library SSHLibrary |
|||
|
|||
*** Variables *** |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
${URL} https://api-ops-ztb-test.qniao.cn |
|||
|
|||
*** Test Cases *** |
|||
get_price-guide-list |
|||
#获取情报信息列表 |
|||
Disable Warnings |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/information-management/page params=queryDate=&pageNum=1&pageSize=100000 |
|||
log ${reps.json()} |
|||
|
|||
update_price-guide-list |
|||
#编辑情报信息 |
|||
Disable Warnings |
|||
Create Session ZTBT ${URL} ${header} |
|||
${data} Set Variable \ { \ \ \ \ "id": 0, \ \ \ \ "isShow": 0, \ \ \ \ "paperMillOrgId": 0 \ \ } |
|||
${reps} Post On Session ZTBT recycle-service/admin/priceGuide/update/price-guide-list ${data.encode('utf-8')} |
|||
|
|||
Download_template |
|||
#下载导入模板 |
|||
Disable Warnings |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/information-management/down-load-template |
|||
${data} Get From Dictionary ${reps.json()} data #获取文件 |
|||
Set Global Variable ${data} |
|||
|
|||
download_temp |
|||
#导出文档 |
|||
#Create Session ZTBT ${URL} ${header} |
|||
#${reps} Get On Session ZTBT recycle-service/admin/download/temp/${data} |
|||
#log ${reps.content} |
|||
Open Connection 39.108.227.105 22 |
|||
Login root @Qniaoyy2020 |
|||
Get File /root/recycle-service/files/temp/${data} |
|||
|
|||
Import |
|||
#批量导入 |
|||
Disable Warnings |
|||
${file} Evaluate open("E:/lyl/Test/1631937001388.xlsx","rb") |
|||
${file_data} Create Dictionary file=${file} |
|||
${headers} Create Dictionary multipart/form-data; boundary=<calculated when request is sent> X-APP-ID=470236309865238555 Authorization=${gettoken} |
|||
Create Session ZTBT ${URL} ${headers} |
|||
${reponse} Post On Session ZTBT recycle-service/admin/received-weight/upload/ files=${file_data} |
|||
|
|||
Export |
|||
#导出纸厂车辆排队信息 |
|||
Disable Warnings |
|||
Create Session ZTBT ${URL} ${header} |
|||
${data} Set Variable { \ \ \ \ "paperMillId":null, \ \ \ \ "queryDate":[ \ \ \ \ \ ] } |
|||
${reps} Post On Session ZTBT recycle-service/admin/information-management/export ${data} |
|||
${DT} Get From Dictionary ${reps.json()} data |
|||
Set Global Variable ${DT} |
|||
|
|||
download_temp1 |
|||
#导出文档 |
|||
#Create Session ZTBT ${URL} ${header} |
|||
#${reps} Get On Session ZTBT recycle-service/admin/download/temp/${data} |
|||
#log ${reps.content} |
|||
Open Connection 39.108.227.105 22 |
|||
Login root @Qniaoyy2020 |
|||
Get File /root/recycle-service/files/temp/${DT} |
|||
Write cd /root/recycle-service/files/temp/ |
|||
Write rm -f \ ${DT} |
|||
Close Connection |
|||
@ -0,0 +1,16 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
台账查询 |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
#Set Global Variable ${台账列表数据} |
|||
Should Be Equal As Numbers ${netWeight} ${reps.json()["data"]["records"][0]["netWeight"]} |
|||
@ -0,0 +1,135 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
获取磅单详情 |
|||
#查看订单列表详情 |
|||
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"]["orderItems"][0]} 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 #纸厂供应商名称 |
|||
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
|||
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
|||
${unitSurcharge} Set Variable If '${unitSurcharge}'=='${None}' 0 ${unitSurcharge} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${磅单id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id |
|||
${status} Get From Dictionary ${reps.json()["data"]} status |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleWeight #获取结算重量 |
|||
${netWeight1} Evaluate ${netWeight}+100 |
|||
FOR ${净重index} IN RANGE ${netWeight} 30 |
|||
Exit For Loop If '${净重index}'=='${netWeight1}' |
|||
END |
|||
${settleWeight1} Evaluate ${settleWeight}+100 |
|||
FOR ${结算重量index} IN RANGE ${settleWeight} 30 |
|||
Exit For Loop If '${结算重量index}'=='${settleWeight1}' |
|||
END |
|||
${unitSurcharge1} Evaluate ${unitSurcharge}+0.001 |
|||
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100 |
|||
Exit For Loop If '${代卖费index}'=='${unitSurcharge1}' |
|||
END |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${unitSurcharge} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${settleUtiPrice} |
|||
Set Global Variable ${unitPrice} |
|||
Set Global Variable ${publicSubsidies} |
|||
Set Global Variable ${millSupplierId} |
|||
Set Global Variable ${paperMillSupplierName} |
|||
Set Global Variable ${proxySellerSettleType} |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${netWeight1} |
|||
Set Global Variable ${settleWeight1} |
|||
Set Global Variable ${磅单id} |
|||
Set Global Variable ${status} |
|||
Set Global Variable ${unitSurcharge1} |
|||
|
|||
weightnote |
|||
#驳回后重新提交磅单 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "deductedPoint":0, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "settleUtiPriceIncludeTax":2.04012, \ \ \ \ "settleUtiPriceIncludeTaxType":1, \ \ \ \ "receivableAdjustMoney":"100", \ \ \ \ "refundSubsidy":0.002, \ \ \ \ "adjustMoney":"0", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "plateNumber":"${carList}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "netWeight":"${netWeight1}", \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge1}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "isSubsidyAndDeductIncludeTax":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleWeight":"${settleWeight1}", \ \ \ \ "deductedWeight":2, \ \ \ \ "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 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "id":"${磅单id}" \ \ \ \ } |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${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 |
|||
|
|||
获取送货单详情 |
|||
#获取订单详情信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${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 |
|||
${paperMillId} Get From Dictionary ${reps.json()["data"]} paperMillId #纸厂id |
|||
${paperCategoryPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类价格 |
|||
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴 |
|||
${activitySettleType} Get From Dictionary ${reps.json()["data"]} activitySettleType #活动订单结算方式 |
|||
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式 |
|||
${交易主体id} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseId #交易主体id |
|||
${交易主体name} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseName #交易主体name |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]} unitSurcharge #代卖费单价 |
|||
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
|||
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${磅单id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id |
|||
${status} Get From Dictionary ${reps.json()["data"]} status |
|||
${unitSurcharge3} Evaluate ${unitSurcharge}+0.001 |
|||
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100 |
|||
Exit For Loop If '${代卖费index}'=='${unitSurcharge3}' |
|||
END |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${netWeight3} Evaluate ${netWeight}+100 |
|||
FOR ${净重index} IN RANGE ${netWeight} 30 |
|||
Exit For Loop If '${净重index}'=='${netWeight3}' |
|||
END |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${paperMillId} |
|||
Set Global Variable ${paperCategoryPrice} |
|||
Set Global Variable ${publicSubsidies} |
|||
Set Global Variable ${activitySettleType} |
|||
Set Global Variable ${proxySellerSettleType} |
|||
Set Global Variable ${settleUtiPrice} |
|||
Set Global Variable ${交易主体id} |
|||
Set Global Variable ${交易主体name} |
|||
Set Global Variable ${unitSurcharge3} |
|||
Set Global Variable ${netWeight3} |
|||
Set Global Variable ${磅单id} |
|||
Set Global Variable ${status} |
|||
|
|||
上传送货单 |
|||
#上传送货单 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "netWeight":"${netWeight3}", \ \ \ \ "settleWeight":null, \ \ \ \ "unitSurcharge":${unitSurcharge3}, \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "activitySettleType":"${activitySettleType}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "remark":null, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "settlePrice":0, \ \ \ \ "contractId":"${contractId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "orderType":"${orderType}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ ], \ \ \ \ "unitPrice":"${paperCategoryPrice}", \ \ \ \ "id":"${磅单id}" \ \ \ \ \ } |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${data.encode('utf-8')} |
|||
log ${reps.json()} |
|||
${weightNoteId} Get From Dictionary ${reps.json()["data"]} weightNoteId #磅单编号 |
|||
Set Global Variable ${weightNoteId} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
Set Global Variable ${datatime} |
|||
|
|||
获取上传送货单后的订单详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight |
|||
Set Global Variable ${netWeight} |
|||
|
|||
audit_weightnote |
|||
Create Session ZTBT ${URL} ${header} |
|||
${repsonse} Post On Session ZTBT recycle-service/admin/customer-service/audit/weightnote/${weightNoteId} |
|||
log ${repsonse.json()} |
|||
@ -0,0 +1,61 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
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&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
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 #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类id |
|||
${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 #结算重量 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
保存磅单信息 |
|||
#b保存磅单信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d #获取当前时间 |
|||
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "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 |
|||
|
|||
运营审核驳回 |
|||
#运营审核驳回 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":2, \ \ \ \ "remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
|||
@ -0,0 +1,20 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
台账查询 |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
#Set Global Variable ${台账列表数据} |
|||
#${receivableAdjustMoney1} Get From Dictionary ${reps.json()["data"]["records"][0]} receivableAdjustMoney #获取应收调节费 |
|||
#${receivableAdjustMoney1} Set Variable If '${receivableAdjustMoney}'=='None' Should Not Be Equal As Numbers ${receivableAdjustMoney} ${receivableAdjustMoney1} |
|||
#Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]} #对比应收调节费 |
|||
Should Be Equal As Numbers ${noReceivablePrice} ${reps.json()["data"]["records"][0]["noReceivablePrice"]} #对比未收款金额 |
|||
Should Be Equal As Strings ${paperMillPayAt} ${reps.json()["data"]["records"][0]["paperMillPayAt"]} #对比预计回款日期 |
|||
@ -0,0 +1,30 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library DateTime |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${url} http://api-ops-psc-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
获取财务审核列表 |
|||
#获取财务审核列表 |
|||
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} |
|||
#${auditedTime} Get From Dictionary ${reps.json()["data"]["records"][0]} auditedTime #财务第一次确认结算时间 |
|||
${staus} Get From Dictionary ${reps.json()["data"]["records"][0]} status #获取审核状态 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
#Set Global Variable ${auditedTime} |
|||
Set Global Variable ${staus} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
财务驳回 |
|||
#财务审核驳回 |
|||
Create Session ZTBT ${url} ${header} |
|||
${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":2,"remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')} |
|||
log ${reps.json()} |
|||
sleep 1 |
|||
@ -0,0 +1,72 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
get_operation_list |
|||
#获取运营审核列表 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
get_order-receipt-audit-details |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL1} ${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 #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id |
|||
${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 #结算重量 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
order-receipt-audit-details |
|||
#b保存磅单信息 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "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 |
|||
|
|||
运营审核通过 |
|||
#运营审核通过 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
|||
|
|||
运营审核后详情 |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收款金额 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #获取计划回款日期 |
|||
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["items"][0]} receivableAdjustMoney #获取应收调节费 |
|||
#${noReceivablePrice} Evaluate ${noReceivablePrice}+1 |
|||
Set Global Variable ${noReceivablePrice} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${receivableAdjustMoney} |
|||
@ -0,0 +1,11 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Keywords *** |
|||
台账查询 |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
#Set Global Variable ${台账列表数据} |
|||
@ -0,0 +1,84 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
获取磅单详情 |
|||
#查看订单详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${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 #纸厂供应商名称 |
|||
${surcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} surcharge #代卖费总额 |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${paymentType} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} paymentType #支付类型 |
|||
${activityNoteStatus} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} activityNoteStatus #活动状态 |
|||
${交易主体id} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseId #交易主体id |
|||
${交易主体name} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseName #交易主体name |
|||
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
|||
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
|||
${unitSurcharge} Set Variable If '${unitSurcharge}'=='${None}' 0 ${unitSurcharge} |
|||
${id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id |
|||
${status} Get From Dictionary ${reps.json()["data"]} status |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleWeight #获取结算重量 |
|||
${netWeight1} Evaluate ${netWeight}+100 |
|||
FOR ${净重index} IN RANGE ${netWeight} 30 |
|||
Exit For Loop If '${净重index}'=='${netWeight1}' |
|||
END |
|||
${settleWeight1} Evaluate ${settleWeight}+100 |
|||
FOR ${结算重量index} IN RANGE ${settleWeight} 30 |
|||
Exit For Loop If '${结算重量index}'=='${settleWeight1}' |
|||
END |
|||
${unitSurcharge1} Evaluate ${unitSurcharge}+0.01 |
|||
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100 |
|||
Exit For Loop If '${代卖费index}'=='${unitSurcharge1}' |
|||
END |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${unitSurcharge} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${settleUtiPrice} |
|||
Set Global Variable ${unitPrice} |
|||
Set Global Variable ${publicSubsidies} |
|||
Set Global Variable ${millSupplierId} |
|||
Set Global Variable ${paperMillSupplierName} |
|||
Set Global Variable ${proxySellerSettleType} |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${paymentType} |
|||
Set Global Variable ${activityNoteStatus} |
|||
Set Global Variable ${交易主体name} |
|||
Set Global Variable ${交易主体id} |
|||
Set Global Variable ${netWeight1} |
|||
Set Global Variable ${settleWeight1} |
|||
Set Global Variable ${id} |
|||
Set Global Variable ${status} |
|||
Set Global Variable ${unitSurcharge1} |
|||
|
|||
weightnote |
|||
#驳回后重新提交磅单 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "id":"${weightNoteId}", \ \ \ \ "orderId":"${orderId}", \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "type":null, \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "settleWeight":13500, \ \ \ \ "deductedPoint":7.5, \ \ \ \ "unitSurcharge":"${unitSurcharge}", \ \ \ \ "surcharge":"${surcharge}", \ \ \ \ "adjustMoney":"20", \ \ \ \ "remark":"${datatime}", \ \ \ \ "imageUrls":null, \ \ \ \ "transactionMainEnterpriseid":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "settlePrice":22585.5, \ \ \ \ "activitySettleType":"${activitySettleType}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "remarkImgs":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "otherAmountList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"freightSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.002, \ \ \ \ \ \ \ \ \ \ \ \ "title":"contrabandPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":2, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":20, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":2, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":10, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "refundSubsidy":0.003, \ \ \ \ "receivableAdjustMoney":"20", \ \ \ \ "settleUtiPriceIncludeTax":1.337448648648649, \ \ \ \ "settleUtiPriceIncludeTaxType":"${settleUtiPriceIncludeTaxType}", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "deductedWeight":1.5, \ \ \ \ "orderType":"${orderType}" } |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${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()} |
|||
@ -0,0 +1,53 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
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&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
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 #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id |
|||
${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 #结算重量 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
运营审核驳回 |
|||
#运营审核驳回 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":2, \ \ \ \ "remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
|||
@ -0,0 +1,65 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Test Cases *** |
|||
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} |
|||
${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id |
|||
${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id |
|||
${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 #结算重量 |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${activitySettleType} Get From Dictionary ${reps.json()["data"]} activitySettleType #活动类型 |
|||
${isSubsidyAndDeductIncludeTax} Get From Dictionary ${reps.json()["data"]["items"][0]} isSubsidyAndDeductIncludeTax #结算单价是否含税 |
|||
${运费补贴} Get From Dictionary ${reps.json()["data"]["items"][0]["otherAmountList"][0]} amount #运费补贴总额 |
|||
${其他补贴} Get From Dictionary ${reps.json()["data"]["items"][0]["otherAmountList"][1]} amount #其他补贴费用总额 |
|||
${违禁物品扣款} Get From Dictionary ${reps.json()["data"]["items"][0]["otherAmountList"][2]} amount #违禁物品扣款总额 |
|||
${装车不规范扣款} Get From Dictionary ${reps.json()["data"]["items"][0]["otherAmountList"][3]} amount #装车不规范扣款总额 |
|||
${其他扣款} Get From Dictionary ${reps.json()["data"]["items"][0]["otherAmountList"][4]} amount #其他扣款总额 |
|||
${返还补贴} Get From Dictionary ${reps.json()["data"]["items"][0]} refundSubsidy #返还补贴 |
|||
${调节费} Get From Dictionary ${reps.json()["data"]["items"][0]} adjustmentFee #调节费 |
|||
${垫资费} Get From Dictionary ${reps.json()["data"]["items"][0]} advanceFund #垫资费 |
|||
${代收费} Get From Dictionary ${reps.json()["data"]["items"][0]} collectionCharges #代收费 |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${activitySettleType} |
|||
Set Global Variable ${运费补贴} |
|||
Set Global Variable ${其他补贴} |
|||
Set Global Variable ${违禁物品扣款} |
|||
Set Global Variable ${装车不规范扣款} |
|||
Set Global Variable ${其他扣款} |
|||
Set Global Variable ${返还补贴} |
|||
Set Global Variable ${垫资费} |
|||
Set Global Variable ${调节费} |
|||
Set Global Variable ${代收费} |
|||
Set Global Variable ${isSubsidyAndDeductIncludeTax} |
|||
|
|||
get_parameter |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
${settlementType} Get From Dictionary ${台账列表数据} settlementType #获取结算类型 |
|||
${firstPayPercent} Get From Dictionary ${台账列表数据} firstPayPercent #获取付款比例 |
|||
Set Global Variable ${settlementType} |
|||
Set Global Variable ${firstPayPercent} |
|||
@ -0,0 +1,18 @@ |
|||
*** Settings *** |
|||
Suite Setup 计算公式 |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Resource Sys_keyword.txt |
|||
|
|||
*** Variables *** |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
|
|||
*** Test Cases *** |
|||
get_parameter |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
Set Global Variable ${台账列表数据} |
|||
Should Be Equal As Numbers ${扣点(%)}= ${reps.json()["data"]["record"][0]["deductedPoint"]} |
|||
@ -0,0 +1,26 @@ |
|||
*** Keywords *** |
|||
计算公式 |
|||
#公式计算 |
|||
${品类单价} Set Variable ${unitPrice} |
|||
${公开补贴} Set Variable ${publicSubsidies} |
|||
${净重} Set Variable ${netWeight} |
|||
${结算单价} Evaluate ${unitPrice}+${publicSubsidies} |
|||
${扣点(%)}= Evaluate (${netWeight}-${settleWeight})/${netWeight} |
|||
${纸厂补贴和扣款} Evaluate ${运费补贴}+${其他补贴}+${违禁物品扣款}+${装车不规范扣款}+${其他扣款} |
|||
${扣点前代卖费} Evaluate ${unitSurcharge}*${netWeight} |
|||
${扣点后代卖费} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${代卖费总额} Set Variable If '${proxySellerSettleType} '=='0' ${扣点前代卖费} ${扣点后代卖费} #0:扣点前,1:扣点后 |
|||
${一次应付} Evaluate ${结算单价}*${settleWeight}+${纸厂补贴和扣款}-${代卖费总额}+${返还补贴}+${调节费} |
|||
${两次首笔应付} Evaluate ${结算单价}*${netWeight}-${代卖费总额} |
|||
#${两次尾款应付} |
|||
${应付金额(元)} Set Variable If '${firstPayPercent}'=='100%' ${一次应付} ${两次首笔应付} #100%:一笔结算,70%、85%:两笔结算 |
|||
${含税结算单价} Set Variable If '${isSubsidyAndDeductIncludeTax} '=='0' (${结算单价}+${纸厂补贴和扣款}/${settleWeight})*(1+${taxRefundRate} ) ${结算单价}*(1+${taxRefundRate}) #0:不含税,1:含税 |
|||
${第一笔金额} Evaluate ${结算单价}*${settleWeight}+${纸厂补贴和扣款} |
|||
#${第二笔金额} Evaluate |
|||
#${总金额} Evaluate ${第一笔金额}+${第二笔金额} |
|||
#${金额} Set Variable If '${settlementType}'==0 ${第一笔金额} ${总金额} |
|||
${垫资费总额} Evaluate ${垫资费}*${settleWeight} |
|||
${代收费总额} Evaluate ${代收费}*${settleWeight} |
|||
${返还补贴总额} Evaluate ${返还补贴}*${settleWeight} |
|||
${采购单价} Evaluate ${应付金额(元)}/${settleWeight} |
|||
Set Global Variable ${扣点(%)}= |
|||
@ -0,0 +1,45 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Library DateTime |
|||
Library redis |
|||
Library urllib3 |
|||
Library pabot.pabotlib |
|||
Resource login.txt |
|||
|
|||
*** Variables *** |
|||
|
|||
*** Test Cases *** |
|||
a |
|||
userlogin {"accountType":2,"password":null,"account":"15014242835","captcha":"888888"} |
|||
userlogin {"accountType":2,"password":null,"account":"13333333333","captcha":"888888"} |
|||
login-token ${token} |
|||
|
|||
get-factorylist |
|||
#获取代卖列表 |
|||
${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${token} |
|||
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 |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
${records} Get From Dictionary ${reps.json()["data"]} records #获取代卖纸厂列表 |
|||
FOR ${item} IN @{records} |
|||
${name} Get From Dictionary ${item} name #获取纸厂name |
|||
${paperCategoryList} Get From Dictionary ${item} paperCategoryList #获取纸厂品类列表 |
|||
${cumulativeWeight} Get From Dictionary ${item} cumulativeWeight #累计已代卖吨数 |
|||
${paperMillId} Get From Dictionary ${item} paperMillId #获取纸厂id |
|||
${locProvinceName} Get From Dictionary ${item} locProvinceName #纸厂所在省 |
|||
${locCityName} Get From Dictionary ${item} locCityName #纸厂所在市 |
|||
${locDistrictName} Get From Dictionary ${item} locDistrictName #纸厂所在区 |
|||
Exit For Loop If '${name}'=='九一纸厂有限公司' |
|||
END |
|||
${value} Evaluate random.choice(${paperCategoryList}) random |
|||
log to console \nvalue: ${value} |
|||
${categoryid} Get From Dictionary ${value} categoryId #纸厂品类id |
|||
${categoryName} Get From Dictionary ${value} categoryName #纸厂品类name |
|||
${unitPrice} Get From Dictionary ${value} unitPrice #纸厂品类价格 |
|||
${paperMillAddress} Catenate ${locProvinceName} ${locCityName} ${locDistrictName} |
|||
Set Global Variable ${categoryid} |
|||
Set Global Variable ${unitPrice} |
|||
Set Global Variable ${paperMillId} |
|||
Set Global Variable ${paperMillAddress} |
|||
Set Global Variable ${categoryName} |
|||
@ -0,0 +1,36 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Library urllib3 |
|||
Library DatabaseLibrary |
|||
|
|||
*** Variables *** |
|||
${url} http://api-client-ztb-test.qniao.cn |
|||
|
|||
*** Keywords *** |
|||
userlogin |
|||
[Arguments] ${data} |
|||
#验证码登录 |
|||
Disable Warnings |
|||
${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 |
|||
Create Session ZTBT https://api-client-uec-test.qniao.cn ${header} |
|||
${data} Create Dictionary account=15014242835 captcha=888888 accountType=2 |
|||
#${data} Set Variable {"accountType":2,"password":null,"account":"15014242835","captcha":"${text_code}"} |
|||
${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 |
|||
Set Global Variable ${token} |
|||
[Teardown] |
|||
|
|||
login-token |
|||
[Arguments] ${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} |
|||
@ -0,0 +1,12 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
|
|||
*** Test Cases *** |
|||
Formula_calculation |
|||
#公式计算 |
|||
${结算单价}= Evaluate ${unitPrice}+${publicSubsidies} |
|||
${扣点(%)}= Evaluate (${netWeight}-${settleWeight})/${netWeight} |
|||
${代卖费(元)}= Set Variable If '${proxySellerSettleType}'=='1' ${unitSurcharge}*${netWeight} ${unitSurcharge}*${settleWeight} |
|||
${第一笔应付金额(元)}= Set Variable If '${activitySettleType}'=='null' |
|||
'${activitySettleType}'=='2' |
|||
@ -0,0 +1,12 @@ |
|||
*** Settings *** |
|||
Suite Setup OpenApp |
|||
Library AppiumLibrary |
|||
Resource Keyword.txt |
|||
Library urllib3 |
|||
|
|||
*** Test Cases *** |
|||
login |
|||
Wait Until Element Is Visible com.qniao.cloudprint:id/tabs 10 #进入首页等待10S |
|||
Click Element name=我的 #点击-我的 |
|||
Click Element name=点击登录 #点击-点击登录 |
|||
Click Button //button[@class='wux-button wux-button--positive wux-button--default wux-button--block wux-button--bordered'] #点击-同意 |
|||
@ -0,0 +1,6 @@ |
|||
*** Settings *** |
|||
Library AppiumLibrary |
|||
|
|||
*** Keywords *** |
|||
OpenApp |
|||
Open Application http://localhost:4723/wd/hub/session platformName=Android platformVersion=5.1.1 deviceName=127.0.0.1:5555 app=E:/lyl/Order/Order/DemoApp/app-release.apk appPackage=com.qniao.cloudprint appActivity=com.qniao.cloudprint.MainActivity unicodeKeyboard=True resetKeyboard=True |
|||
@ -0,0 +1,35 @@ |
|||
*** Settings *** |
|||
Library urllib3 |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'} |
|||
${url} http://api-client-ztb-test.qniao.cn |
|||
|
|||
*** Keywords *** |
|||
userlogin |
|||
#验证码登录 |
|||
Disable Warnings |
|||
Create Session ZTBT https://api-client-uec-test.qniao.cn ${header} |
|||
${data} Create Dictionary account=15014242835 captcha=888888 accountType=2 |
|||
#${data} Set Variable {"accountType":2,"password":null,"account":"13168550964","captcha":"${text_code}"} |
|||
${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 |
|||
Set Global Variable ${token} |
|||
[Teardown] |
|||
[Return] ${token} |
|||
|
|||
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} |
|||
[Return] ${gettoken} |
|||
@ -0,0 +1,25 @@ |
|||
*** Settings *** |
|||
Suite Setup Run Keywords userlogin |
|||
... AND 关键字.Login-token |
|||
Resource 关键字.txt |
|||
Library urllib3 |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${url} https://api-client-ztb-test.qniao.cn |
|||
|
|||
*** Test Cases *** |
|||
get_paper-mill-city |
|||
#获取纸厂所在城市 |
|||
userlogin |
|||
${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=QNT ${gettoken} |
|||
Create Session ZTBT ${url} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/get/paper-mill-city |
|||
${data} Get From Dictionary ${reps.json()} data #城市列表 |
|||
FOR ${items} IN @{data} |
|||
${cityName} Get From Dictionary ${items} cityName #城市name |
|||
${cityId} Get From Dictionary ${items} cityId #城市id |
|||
Exit For Loop If '${cityName}'=='荆州市' |
|||
END |
|||
Set Global Variable ${cityId} |
|||
@ -0,0 +1,5 @@ |
|||
*** Settings *** |
|||
Library AppiumLibrary |
|||
|
|||
*** Test Cases *** |
|||
login |
|||
@ -0,0 +1,10 @@ |
|||
*** Settings *** |
|||
Library SeleniumLibrary |
|||
|
|||
*** Test Cases *** |
|||
1-Open_browser |
|||
Open Browser http://backstage.test.qniao.cn/ chrome #在浏览器中打开网页 |
|||
SeleniumLibrary.Input Text //input[@placeholder="手机号/邮箱"] laiyonglan@qniao.cn #登录交易版系统 |
|||
sleep 1 |
|||
SeleniumLibrary.Input Text //input[@placeholder="密码"] qn123456 |
|||
Click Button //button[@class='ant-btn ant-btn-primary ant-btn-block'] |
|||
320
log.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
881
output.xml
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
657
pabot_results/0/output.xml
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,2 @@ |
|||
[ ERROR ] RuntimeError catched in remotelib keyword execution. Maybe there is no connection - is pabot called with --pabotlib option? ErrorDetails: RuntimeError('Connection to remote server broken: [WinError 10061] 由于目标计算机积极拒绝,无法连接。',) |
|||
pabot.PabotLib#_close: threw an exception: is --pabotlib flag used? ErrorDetails: RuntimeError('Connection to remote server broken: [WinError 10061] 由于目标计算机积极拒绝,无法连接。',) |
|||
@ -0,0 +1,18 @@ |
|||
============================================================================== |
|||
3-Pabotdemo |
|||
============================================================================== |
|||
3-Pabotdemo.1-Get List |
|||
============================================================================== |
|||
a | PASS | |
|||
------------------------------------------------------------------------------ |
|||
get-factorylist |
|||
value: {'categoryId': '630378353517531136', 'categoryName': 'ºÚ¿¨', 'yesterdayUnitPrice': None, 'unitPrice': 1.23, 'floatingPrice': 0.01, 'publicSubsidies': None} |
|||
| PASS | |
|||
------------------------------------------------------------------------------ |
|||
3-Pabotdemo.1-Get List | PASS | |
|||
2 tests, 2 passed, 0 failed |
|||
============================================================================== |
|||
3-Pabotdemo | PASS | |
|||
2 tests, 2 passed, 0 failed |
|||
============================================================================== |
|||
Output: E:\lyl\Order\Order\pabot_results\0\output.xml |
|||
@ -0,0 +1,52 @@ |
|||
*** Settings *** |
|||
Documentation 添加银行卡 |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Resource 登录关键字.txt |
|||
Library pabot.pabotlib |
|||
|
|||
*** Variables *** |
|||
|
|||
*** Test Cases *** |
|||
a |
|||
userlogin {"accountType":2,"password":null,"account":"15014242835","captcha":"888888"} |
|||
login-token ${token} |
|||
getuserinfo |
|||
|
|||
getBankCardList |
|||
#获取银行卡列表 |
|||
${headers} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${token} |
|||
Create Session ZTBT http://api-client-psc-test.qniao.cn ${headers} |
|||
${reps} Get On Session ZTBT payment-settlement-center/bankcard/getBankCardList |
|||
log ${reps.json()} |
|||
|
|||
bankcard_home |
|||
#获取银行卡信息 |
|||
${headers} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${token} |
|||
Create Session ZTBT http://api-client-psc-test.qniao.cn ${headers} |
|||
${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 |
|||
#添加银行卡 |
|||
${headers} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${token} |
|||
Create Session ZTBT http://api-client-psc-test.qniao.cn ${headers} |
|||
${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 |
|||
#提交银行卡验证 |
|||
${headers} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${token} |
|||
Create Session ZTBT http://api-client-psc-test.qniao.cn ${headers} |
|||
${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,46 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Library urllib3 |
|||
Library DatabaseLibrary |
|||
|
|||
*** Variables *** |
|||
${url} http://api-client-ztb-test.qniao.cn |
|||
|
|||
*** Keywords *** |
|||
userlogin |
|||
[Arguments] ${data} |
|||
#验证码登录 |
|||
Disable Warnings |
|||
${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 |
|||
Create Session ZTBT https://api-client-uec-test.qniao.cn ${header} |
|||
${data} Create Dictionary account=15014242835 captcha=888888 accountType=2 |
|||
#${data} Set Variable {"accountType":2,"password":null,"account":"15014242835","captcha":"${text_code}"} |
|||
${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 |
|||
Set Global Variable ${token} |
|||
[Teardown] |
|||
|
|||
login-token |
|||
[Arguments] ${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} |
|||
411
report.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save