47 changed files with 6992 additions and 218 deletions
-
130-Database.robot
-
38001.robot
-
631-Client/2-Createorder.robot
-
641-Client(Test)/1-APPlogin(master).robot
-
111-Client(Test)/1.1-APPlogin(Test).robot
-
1231-Client(Test)/2.1-CreateRegularorder.robot
-
751-Client(Test)/2.2createActiveorder-1.robot
-
741-Client(Test)/2.3createActiveorder-2.robot
-
171-Client(Test)/3-Withdrawal_application.robot
-
181-Client(Test)/3.1-Automatic withdrawal.robot
-
01-Client(Test)/4-Real name authentication.robot
-
01-Client(Test)/5-Add_bank_card.robot
-
51-Client(Test)/6-Enterprise_certification.robot
-
251-Client(Test)/7-Consignment_order.robot
-
21-Client(Test)/__init__.robot
-
01-Client(Test)/factory.robot
-
772-Background_system/1-Consignment management/New_paper_mill.robot
-
182-Background_system/3-operation management/contract.robot
-
02-Background_system(Test)/1-WebLogin/weblogin.robot
-
1532-Background_system(Test)/1.1-New_PaperMill/New_paper_mill.robot
-
02-Background_system(Test)/1.2-enterprise_management/__init__.robot
-
02-Background_system(Test)/1.2-enterprise_management/__init__.txt
-
502-Background_system(Test)/1.2-enterprise_management/enterprise-management.robot
-
802-Background_system(Test)/1.3-operation management/contract.robot
-
1392-Background_system(Test)/1.4-Consignment activities/Consignment_activities.robot
-
392-Background_system(Test)/2.1-Consignment management/1-appointment.robot
-
682-Background_system(Test)/2.1-Consignment management/2.1-RegularUpload-weightnote.robot
-
2052-Background_system(Test)/2.1-Consignment management/2.2-RegularUpload-weightnote-1.robot
-
1882-Background_system(Test)/2.1-Consignment management/2.3-ActiveUpload-deliverynote.robot
-
772-Background_system(Test)/2.1-Consignment management/3.1-Operation_audit.robot
-
782-Background_system(Test)/2.1-Consignment management/3.2-Operation_audit.robot
-
782-Background_system(Test)/2.1-Consignment management/3.3-Operation_audit.robot
-
392-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot
-
332-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot
-
152-Background_system(Test)/3-Withdrawal_application/Withdrawal application/1-Automatic_receipt.robot
-
22-Background_system(Test)/3-Withdrawal_application/Withdrawal application/2-Manual_receipt.robot
-
2072-Background_system(Test)/4-Consignment_management/2.3-ActiveUpload-weightnote.robot
-
182-Background_system(Test)/4-Consignment_management/3.3--Operation_audit.robot
-
72-Background_system(Test)/4-Consignment_management/4.3-Financial_audit.robot
-
332-Background_system(Test)/4-Consignment_management/5.3-sales_receivable.robot
-
02-Background_system(Test)/4-Consignment_management/__init__.robot
-
552-Background_system(Test)/5-Data comparison/5-Consignment_order.robot
-
02-Background_system(Test)/5-Data comparison/__init__.txt
-
2__init__.robot
-
2125log.html
-
465output.xml
-
2431report.html
@ -0,0 +1,13 @@ |
|||||
|
*** Settings *** |
||||
|
Library DatabaseLibrary |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
Connect to database |
||||
|
#连接数据库 |
||||
|
Connect To Database Using Custom Params pymysql host='8.135.8.221',user='root', password='password', \ port=3306,database='ztb_recycle' #连接数据库 |
||||
|
${username} Query SELECT * FROM `ztb_recycle`.`qn_user` WHERE `real_name` LIKE '%赖勇兰%' #查找数据库ztb_recycle,表qn_user中real_name是赖勇兰的所有数据 |
||||
|
log many ${username} |
||||
|
#Execute Sql String DELETE FROM `ztb_recycle`.`qn_user` WHERE `real_name` LIKE '%赖勇兰%' AND `id` = 584452885719420928 #删除数据 |
||||
|
#Execute Sql String UPDATE `ztb_recycle`.`qn_user` SET `nick_name` = 'GGG' WHERE `id` = 597492076942331904 #修改数据 |
||||
|
#Query SELECT * FROM `ztb_recycle`.`qn_user` WHERE `real_name` LIKE '%赖勇兰%' into outfile 'C:/Users/qniao/Desktop/测试.xls' |
||||
|
Disconnect From Database #断开数据库的连接 |
||||
@ -1,63 +0,0 @@ |
|||||
*** 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,64 @@ |
|||||
|
*** 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} |
||||
@ -0,0 +1,123 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 创建常规订单 |
||||
|
Test Teardown Run Keyword If Test Failed Fatal Error |
||||
|
Test Timeout 10 seconds |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library DateTime |
||||
|
Library RedisLibrary |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528','Authorization':'QNT ${gettoken}'} |
||||
|
${url} http://api-client-ztb-test.qniao.cn |
||||
|
|
||||
|
*** 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 |
||||
|
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} |
||||
|
|
||||
|
paper-mill-paper-category-price-details |
||||
|
#获取纸厂详情信息 |
||||
|
Create Session ZTBT ${url} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/get/paper-mill-paper-category-price-details/${paperMillId} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
relation |
||||
|
#获取业务邀请码弹窗 |
||||
|
Create Session ZTBT ${url} ${header} |
||||
|
${reps} get On Session ZTBT recycle-service/proxy-sell/get/relation |
||||
|
log ${reps,json()} |
||||
|
|
||||
|
relation_code |
||||
|
#填写业务人员邀请码 |
||||
|
Create Session ZTBT ${url} ${header} |
||||
|
${data} Set Variable {"code":"9999"} |
||||
|
${reps} Post On Session ZTBT recycle-service/proxy-sell/bind/relation ${data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
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 |
||||
|
|
||||
|
save_factory-by-shipment-info |
||||
|
#填写发货信息 |
||||
|
#${headers} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=QNT d6SX3ESr8Jb2tYq/89Ft7ONlmJEiWUarjlNpFfW2lU9rgLvV1vzRLbb1Y4C5/b3g/PxwWTrvGmZUIarJEaEOkQ== |
||||
|
Disable Warnings |
||||
|
${datatime} Get Current Date result_format=%Y-%m-%d |
||||
|
Create Session ZTBT https://api-client-ztb-test.qniao.cn ${header} |
||||
|
${data} Set Variable {"packageFactoryName":"${datatime}打包站"} |
||||
|
${reps} Post On Session ZTBT recycle-user-center/save/factory-by-shipment-info ${data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
|
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')} |
||||
|
${orderId} Get From Dictionary ${reps.json()["data"]} orderId #获取订单编号 |
||||
|
log ${reps.json()} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
Set Global Variable ${datatime} |
||||
|
Set Global Variable ${orderId} |
||||
|
|
||||
|
createorder-newcar |
||||
|
#创建下单(填写车辆信息) |
||||
|
#${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":"宁G54321"}]} |
||||
|
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')} |
||||
|
${orderId} Get From Dictionary ${reps.json()["data"]} orderId #获取订单编号 |
||||
|
log ${reps.json()} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
Set Global Variable ${datatime} |
||||
|
Set Global Variable ${orderId} |
||||
@ -0,0 +1,75 @@ |
|||||
|
*** Settings *** |
||||
|
Library DateTime |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
|
||||
|
*** Variables *** |
||||
|
${url} http://api-client-ztb-test.qniao.cn |
||||
|
${headers} {'content-type':'application/json','X-APP-ID':'470236309865238528','Authorization':'QNT ${gettoken}'} |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
proxy-sell-activity_list |
||||
|
#获取活动代卖列表 |
||||
|
Create Session ZTBT ${url} ${headers} |
||||
|
${repsponse} Get On Session ZTBT recycle-service/proxy-sell-activity/list params=pageNum=1&pageSize=15 |
||||
|
${records} Get From Dictionary ${repsponse.json()["data"]} records #获取代卖活动列表 |
||||
|
FOR ${item} IN @{records} |
||||
|
${activityName} Get From Dictionary ${item} activityName #获取活动名称 |
||||
|
${paperCategoryList} Get From Dictionary ${item} paperCategoryList #获取纸厂品类 |
||||
|
${paperMillId} Get From Dictionary ${item} paperMillId #获取纸厂id |
||||
|
${activityId} Get From Dictionary ${item} activityId #获取活动id |
||||
|
Exit For Loop If '${activityName}'=='无账期活动一次' |
||||
|
END |
||||
|
${Category_value} Evaluate random.choice(${paperCategoryList}) random #获取纸品列表 |
||||
|
log to console \nvalue: ${Category_value} |
||||
|
${categoryId} Get From Dictionary ${Category_value} categoryId #获取纸品id |
||||
|
${categoryName} Get From Dictionary ${Category_value} categoryName #获取纸品名称 |
||||
|
${unitPrice} Get From Dictionary ${Category_value} unitPrice #获取纸品价格 |
||||
|
Set Global Variable ${paperMillId} |
||||
|
Set Global Variable ${activityId} |
||||
|
Set Global Variable ${categoryId} |
||||
|
Set Global Variable ${categoryName} |
||||
|
Set Global Variable ${unitPrice} |
||||
|
|
||||
|
get-carinfo |
||||
|
#获取使用过的车辆信息 |
||||
|
#${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${gettoken} |
||||
|
Create Session get-carinfo ${url} ${headers} |
||||
|
${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 #车辆列表 |
||||
|
${plateNumber_value} Evaluate random.sample(${carNumber},1) random |
||||
|
log to console \nvalue:${plateNumber_value} |
||||
|
${plateNumber1} Get From Dictionary ${plateNumber_value[0]} plateNumber #车辆信息1 |
||||
|
#${plateNumber2} Get From Dictionary ${plateNumber_value[1]} plateNumber #车辆信息2 |
||||
|
Set Global Variable ${plateNumber1} |
||||
|
#Set Global Variable ${plateNumber2} |
||||
|
|
||||
|
get_paper-mill-paper-category-price-details |
||||
|
#获取纸厂详情 |
||||
|
Create Session ZTBT ${url} ${headers} |
||||
|
${reps} Get On Session ZTBT recycle-service/get/paper-mill-paper-category-price-details/${paperMillId} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get_relation |
||||
|
#创建用户和业务归属人关系 |
||||
|
Create Session ZTBT ${url} ${headers} |
||||
|
${reps} Get On Session ZTBT recycle-service/proxy-sell/get/relation |
||||
|
${bizUserId} Get From Dictionary ${reps.json()["data"]} bizUserId #业务归属人id |
||||
|
${cusormerId} Get From Dictionary ${reps.json()["data"]} cusormerId #用户id |
||||
|
${customerName} Get From Dictionary ${reps.json()["data"]} customerName #用户名称 |
||||
|
Set Global Variable ${bizUserId} |
||||
|
Set Global Variable ${cusormerId} |
||||
|
Set Global Variable ${customerName} |
||||
|
|
||||
|
create_order |
||||
|
#创建代卖活动订单-1次付款 |
||||
|
Create Session ZTBT ${url} ${headers} |
||||
|
${datatime} get current date result_format=%Y-%m-%d |
||||
|
${order_data} Set Variable { \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "totalEstimatedWeight":30000, \ \ \ \ "activityId":"${activityId}", \ \ \ \ "customerName":"${customerName}", \ \ \ \ "deliveryTime":"${datatime}", \ \ \ \ "carInfos":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "plateNumber":"${plateNumber1}" \ \ \ \ \ \ \ \ } \ \ \ \ ] } |
||||
|
${reps} Post On Session ZTBT recycle-service/proxy-sell/create/order ${order_data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
|
${orderId} Get From Dictionary ${reps.json()["data"]} orderId #获取订单编号 |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
Set Global Variable ${orderId} |
||||
|
Set Global Variable ${datatime} |
||||
@ -0,0 +1,74 @@ |
|||||
|
*** Settings *** |
||||
|
Library DateTime |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
|
||||
|
*** Variables *** |
||||
|
${url} http://api-client-ztb-test.qniao.cn |
||||
|
${headers} {'content-type':'application/json','X-APP-ID':'470236309865238528','Authorization':'QNT ${gettoken}'} |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
proxy-sell-activity_list |
||||
|
#获取活动代卖列表 |
||||
|
Create Session ZTBT ${url} ${headers} |
||||
|
${repsponse} Get On Session ZTBT recycle-service/proxy-sell-activity/list params=pageNum=1&pageSize=15 |
||||
|
${records} Get From Dictionary ${repsponse.json()["data"]} records #获取代卖活动列表 |
||||
|
FOR ${item} IN @{records} |
||||
|
${activityName} Get From Dictionary ${item} activityName #获取活动名称 |
||||
|
${paperCategoryList} Get From Dictionary ${item} paperCategoryList #获取纸厂品类 |
||||
|
${paperMillId} Get From Dictionary ${item} paperMillId #获取纸厂id |
||||
|
${activityId} Get From Dictionary ${item} activityId #获取活动id |
||||
|
Exit For Loop If '${activityName}'=='无账期九一(两次)' |
||||
|
END |
||||
|
${Category_value} Evaluate random.choice(${paperCategoryList}) random #获取纸品 |
||||
|
log to console \nvalue: ${Category_value} |
||||
|
${categoryId} Get From Dictionary ${Category_value} categoryId #获取纸品id |
||||
|
${categoryName} Get From Dictionary ${Category_value} categoryName #获取纸品名称 |
||||
|
${unitPrice} Get From Dictionary ${Category_value} unitPrice #获取纸品价格 |
||||
|
Set Global Variable ${paperMillId} |
||||
|
Set Global Variable ${activityId} |
||||
|
Set Global Variable ${categoryId} |
||||
|
Set Global Variable ${categoryName} |
||||
|
Set Global Variable ${unitPrice} |
||||
|
|
||||
|
get-carinfo |
||||
|
#获取使用过的车辆信息 |
||||
|
#${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${gettoken} |
||||
|
Create Session get-carinfo ${url} ${headers} |
||||
|
${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 #车辆列表 |
||||
|
${plateNumber_value} Evaluate random.sample(${carNumber},1) random |
||||
|
log to console \nvalue:${plateNumber_value} |
||||
|
${plateNumber1} Get From Dictionary ${plateNumber_value[0]} plateNumber #车辆信息1 |
||||
|
#${plateNumber2} Get From Dictionary ${plateNumber_value[1]} plateNumber #车辆信息2 |
||||
|
Set Global Variable ${plateNumber1} |
||||
|
#Set Global Variable ${plateNumber2} |
||||
|
|
||||
|
get_paper-mill-paper-category-price-details |
||||
|
#获取纸厂详情 |
||||
|
Create Session ZTBT ${url} ${headers} |
||||
|
${reps} Get On Session ZTBT recycle-service/get/paper-mill-paper-category-price-details/${paperMillId} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get_relation |
||||
|
#创建用户和业务归属人关系 |
||||
|
Create Session ZTBT ${url} ${headers} |
||||
|
${reps} Get On Session ZTBT recycle-service/proxy-sell/get/relation |
||||
|
${bizUserId} Get From Dictionary ${reps.json()["data"]} bizUserId #业务归属人id |
||||
|
${cusormerId} Get From Dictionary ${reps.json()["data"]} cusormerId #用户id |
||||
|
${customerName} Get From Dictionary ${reps.json()["data"]} customerName #用户名称 |
||||
|
Set Global Variable ${bizUserId} |
||||
|
Set Global Variable ${cusormerId} |
||||
|
Set Global Variable ${customerName} |
||||
|
|
||||
|
create_order |
||||
|
#创建代卖活动订单-2次付款 |
||||
|
Create Session ZTBT ${url} ${headers} |
||||
|
${datatime} get current date result_format=%Y-%m-%d |
||||
|
${order_data} Set Variable { \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "totalEstimatedWeight":30000, \ \ \ \ "activityId":"${activityId}", \ \ \ \ "customerName":"${customerName}", \ \ \ \ "deliveryTime":"${datatime}", \ \ \ \ "carInfos":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "plateNumber":"${plateNumber1}" \ \ \ \ \ \ \ \ } \ \ \ \ ] } |
||||
|
${reps} Post On Session ZTBT recycle-service/proxy-sell/create/order ${order_data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
|
${orderId} Get From Dictionary ${reps.json()["data"]} orderId #获取订单编号 |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
Set Global Variable ${orderId} |
||||
@ -0,0 +1,18 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library DateTime |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
login |
||||
|
|
||||
|
Automatic withdrawal |
||||
|
#自动提现 |
||||
|
Disable Warnings |
||||
|
${headers} Create Dictionary Content-Type=application/x-www-form-urlencoded |
||||
|
${datatime} Get Current Date result_format=%Y-%m-%d |
||||
|
log ${datatime} |
||||
|
Create Session xxl-job http://xxl-job-admin-test.qniao.cn ${headers} |
||||
|
${data} Create Dictionary id=2 executorParam={'datatime':'${datatime}','period':'0'} addressList= |
||||
|
${reps} Post On Session xxl-job xxl-job-admin/jobinfo/trigger data=${data} |
||||
|
#log ${reps.json()} |
||||
@ -0,0 +1,5 @@ |
|||||
|
*** Settings *** |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
|
||||
|
*** Test Cases *** |
||||
@ -0,0 +1,25 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 查看代卖订单 |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library DateTime |
||||
|
Library RedisLibrary |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528','Authorization':'QNT ${gettoken}'} |
||||
|
${url} http://api-client-ztb-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get_proxy-order-list |
||||
|
Create Session ZTBT ${url} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/proxy-sell/get/proxy-order-list params=status=&pageNum=1&pageSize=15 |
||||
|
${orderId} Get From Dictionary ${reps.json()["data"]["records"][0]} orderId #获取代卖订单编号 |
||||
|
Set Global Variable ${orderId} |
||||
|
|
||||
|
get_proxy-order_details |
||||
|
Create Session ZTBT ${url} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/proxy-sell/get/proxy-order/${orderId} |
||||
|
${data} Get From Dictionary ${reps.json()} data |
||||
|
Set Global Variable ${data} |
||||
|
Run Keyword If '${orderId}' in ${data} Log To Console ${data} |
||||
@ -0,0 +1,2 @@ |
|||||
|
*** Settings *** |
||||
|
Test Setup |
||||
@ -1,77 +0,0 @@ |
|||||
*** 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 *** |
|
||||
@ -1,18 +0,0 @@ |
|||||
*** 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,153 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library requests |
||||
|
Library DateTime |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','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":"${区域id}", \ \ \ \ "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":1, \ \ \ \ \ \ \ \ "fundWarningPercentage":null, \ \ \ \ \ \ \ \ "weightWarningPercentage":null, \ \ \ \ \ \ \ \ "isOperations":1, \ \ \ \ \ \ \ \ "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 |
||||
|
|
||||
|
get_paperMill_list-1 |
||||
|
#获取纸厂列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-list params=pageNum=1&pageSize=20 |
||||
|
${paperMillId} Get From Dictionary ${reps.json()["data"]["records"][0]} id #纸厂信息 |
||||
|
${paperMilld_name} Get From Dictionary ${reps.json()["data"]["records"][0]} name #纸厂name |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
Set Global Variable ${paperMillId} |
||||
|
Set Global Variable ${paperMilld_name} |
||||
|
|
||||
|
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()} |
||||
|
|
||||
|
update_paper-mill-category |
||||
|
#更新纸品品类 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable { \ \ \ \ "paperMillCategories":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "categoryName":"1号", \ \ \ \ \ \ \ \ \ \ \ \ "inspectionNote":"" \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "categoryName":"2号", \ \ \ \ \ \ \ \ \ \ \ \ "inspectionNote":"" \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "categoryName":"3号", \ \ \ \ \ \ \ \ \ \ \ \ "inspectionNote":"" \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "id":"${paperMillId} " } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/paperMill/update/paper-mill-category/${paperMillId} ${data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get_paper-mill-category-list |
||||
|
#获取品类列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-category/${paperMillId} params=id=${paperMillId} |
||||
|
${data} Get From Dictionary ${reps.json()} data |
||||
|
${List} Create List |
||||
|
FOR ${items} IN @{data} |
||||
|
${paperMillCategoryId} Get From Dictionary ${items} paperMillCategoryId #纸品id |
||||
|
${categoryName} Get From Dictionary ${items} categoryName #纸品name |
||||
|
Append To List ${List} ${paperMillCategoryId} |
||||
|
END |
||||
|
#${paperMillCategoryId1} Get From Dictionary ${reps.json()["data"][0]} paperMillCategoryId #获取品类1id |
||||
|
#${categoryName1} Get From Dictionary ${reps.json()["data"][0]} categoryName #品类1名称 |
||||
|
#Set Global Variable ${paperMillCategoryId} |
||||
|
#Set Global Variable ${categoryName} |
||||
|
${List0} Get From List ${List} 0 |
||||
|
${List1} Get From List ${List} 1 |
||||
|
${List2} Get From List ${List} 2 |
||||
|
Set Global Variable ${List0} |
||||
|
Set Global Variable ${List1} |
||||
|
Set Global Variable ${List2} |
||||
|
|
||||
|
get_paper-mill-category-price-list |
||||
|
#获取报价列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/paperMillCategory/get/paper-mill-category-price-list params=pageNum=1&pageSize=10&paperMillId=${paperMillId} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get_paper-mill-category-price-last |
||||
|
#获取纸厂报价详情 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable { \ \ \ \ "paperMillId":"${paperMillId}" } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/paperMillCategory/get/paper-mill-category-price-last ${data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
add_paper-mill-category-price |
||||
|
#发布最新报价 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${Datatime} Get Time |
||||
|
${data} Set Variable { \ \ \ \ "publishDate":"${Datatime}", \ \ \ \ "paperMillCategoryDetailsEntries":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryId":"${List0}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":1.52, \ \ \ \ \ \ \ \ \ \ \ \ "publicSubsidies":0.005 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryId":"${List1}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":1.32, \ \ \ \ \ \ \ \ \ \ \ \ "publicSubsidies":0.01 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryId":"${List2}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":1.55, \ \ \ \ \ \ \ \ \ \ \ \ "publicSubsidies":null \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "paperMillId":"${paperMillId}", \ \ \ \ "time":"${Datatime}" } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/paperMillCategory/add/paper-mill-category-price ${data.encode('utf-8')} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
|
||||
|
upadte_paper-mill-category-price |
||||
|
#更新最新报价 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${Datatime} Get Time |
||||
|
${data} Set Variable { \ \ \ \ "publishDate":"${Datatime}", \ \ \ \ "paperMillCategoryDetailsEntries":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryId":"${List0}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":1.53, \ \ \ \ \ \ \ \ \ \ \ \ "publicSubsidies":0.005 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryId":"${List1}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":1.32, \ \ \ \ \ \ \ \ \ \ \ \ "publicSubsidies":0.01 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryId":"${List2}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":1.55, \ \ \ \ \ \ \ \ \ \ \ \ "publicSubsidies":null \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "paperMillId":"${paperMillId}", \ \ \ \ "time":"${Datatime}" } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/paperMillCategory/update/paper-mill-category-price ${data.encode('utf-8')} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
|
||||
|
*** Keywords *** |
||||
@ -0,0 +1,50 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library DateTime |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
||||
|
${URL} https://api-ops-uec-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
Find_enterprise |
||||
|
#查找企业基本信息 |
||||
|
Disable Warnings |
||||
|
Create Session ZTBT https://api-ops-ztb-test.qniao.cn ${header} |
||||
|
${reps} Get On Session ZTBT recycle-user-center/admin/get/enterprise-profile-list params=pageNum=1&pageSize=10 |
||||
|
${records} Get From Dictionary ${reps.json()["data"]} records #企业列表 |
||||
|
FOR ${items} IN @{records} |
||||
|
${enterpriseName} Get From Dictionary ${items} enterpriseName #企业名称 |
||||
|
${enterpriseId} Get From Dictionary ${items} enterpriseId #企业id |
||||
|
Exit For Loop If '${enterpriseName}'=='${paperMilld_name}' |
||||
|
END |
||||
|
Set Global Variable ${enterpriseId} |
||||
|
Set Global Variable ${enterpriseName} |
||||
|
|
||||
|
get_enterprise-profile-list |
||||
|
#获取企业列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-user-center/admin/get/enterprise-profile-list pageNum=1&pageSize=10 |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get_user-list |
||||
|
#获取关联用户信息 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT uec/admin/get/user/user-list pageNum=1&pageSize=30&keyword=133 |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
Upload_pictures |
||||
|
#上传图片 |
||||
|
#${dict} Create Dictionary Content-Type=image/jpeg filename=20210803.jpg |
||||
|
#Create Session ZTBT ${URL} ${dict} |
||||
|
${filepath} Evaluate open('E:/lyl/图片/16pic_6879381_b.jpg','rb') |
||||
|
${image} Evaluate open('E:/lyl/图片/16pic_6879381_b.jpg','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} |
||||
@ -0,0 +1,80 @@ |
|||||
|
*** Settings *** |
||||
|
Library DateTime |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
Library String |
||||
|
|
||||
|
*** Variables *** |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
||||
|
${psc_url} http://api-ops-psc-test.qniao.cn |
||||
|
|
||||
|
*** 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=10&status=1 |
||||
|
log ${response.json()} |
||||
|
|
||||
|
get_contract_by_paperMilldName |
||||
|
#通过纸厂查找合同 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/contract/get/page-list params=pageNum=1&pageSize=10&status=1&buyerEnterpriseId=${enterpriseId} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
Seller_enterprise-list |
||||
|
#获取卖方企业列表 |
||||
|
Create Session ZTBT ${psc_url} ${header} |
||||
|
${reps} Get On Session ZTBT payment-settlement-center/admin/supplier/get/enterprise-list/serarch-by-name-and-type |
||||
|
log ${reps.json()} |
||||
|
${data} Get From Dictionary ${reps.json()} data #获取企业列表 |
||||
|
FOR ${items} IN @{data} |
||||
|
${sellerEnterpriseName} Get From Dictionary ${items} enterpriseName #卖方企业名称 |
||||
|
${sellerEnterpriseId} Get From Dictionary ${items} enterpriseId #卖方企业id |
||||
|
${seller_id} Get From Dictionary ${items} id #企业标识符 |
||||
|
Exit For Loop If '${enterpriseName}'=='企业' |
||||
|
END |
||||
|
Set Global Variable ${seller_id} |
||||
|
Set Global Variable ${sellerEnterpriseName} |
||||
|
Set Global Variable ${sellerEnterpriseId} |
||||
|
|
||||
|
Buyer_enterprise-list |
||||
|
#获取买方企业列表 |
||||
|
Create Session ZTBT ${psc_url} ${header} |
||||
|
${reps} Get On Session ZTBT payment-settlement-center/admin/supplier/get/enterprise-list/serarch-by-name-and-type |
||||
|
log ${reps.json()} |
||||
|
${data} Get From Dictionary ${reps.json()} data #获取企业列表 |
||||
|
FOR ${items} IN @{data} |
||||
|
${buyerEnterpriseName} Get From Dictionary ${items} enterpriseName #买方企业名称 |
||||
|
${buyerEnterpriseId} Get From Dictionary ${items} enterpriseId #买方企业id |
||||
|
${buyer_id} Get From Dictionary ${items} id #企业标识符 |
||||
|
Exit For Loop If '${enterpriseName}'=='${paperMilld_name}' |
||||
|
END |
||||
|
Set Global Variable ${buyer_id} |
||||
|
Set Global Variable ${buyerEnterpriseName} |
||||
|
Set Global Variable ${buyerEnterpriseId} |
||||
|
|
||||
|
buyer-paper-mill-categories_list |
||||
|
#买方纸厂品类 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/contract/get/buyer-paper-mill-categories/list params=enterpriseId=${enterpriseId} |
||||
|
log ${reps.json()} |
||||
|
${category_data} Get From Dictionary ${reps.json()} data #获取纸厂所有品类 |
||||
|
${category_value} Evaluate random.choice(${category_data}) random #获取随机品类信息 |
||||
|
log to console \nvalue: ${category_value} |
||||
|
${categoryId} Get From Dictionary ${category_value} categoryId #获取品类id |
||||
|
${categoryName} Get From Dictionary ${category_value} categoryName #品类名称 |
||||
|
${paperMillId} Get From Dictionary ${category_value} paperMillId #纸厂id |
||||
|
Set Global Variable ${categoryId} |
||||
|
Set Global Variable ${categoryName} |
||||
|
Set Global Variable ${paperMillId} |
||||
|
|
||||
|
create_contract |
||||
|
#创建纸厂合同 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${datatime} Get Current Date result_format=%Y-%m-%d |
||||
|
${New_DataTime} Add Time To Date ${datatime} 10 days |
||||
|
${str_time} Get Substring ${New_DataTime} 0 10 |
||||
|
${data} Set Variable { \ \ \ \ "contractCategories":[ \ \ \ \ \ ], \ \ \ \ "limitLine":null, \ \ \ \ "accountPeriod":[ \ \ \ \ \ \ \ \ 30 \ \ \ \ ], \ \ \ \ "settleRules":0, \ \ \ \ "isSubsidyAndDeductIncludeTax":0, \ \ \ \ "settlePriceIncludeTaxSettleRules":0, \ \ \ \ "contractType":"0", \ \ \ \ "contractNo":"${datatime}合同", \ \ \ \ "accountPeriodType":0, \ \ \ \ "sellerEnterpriseId":"${sellerEnterpriseId}", \ \ \ \ "buyerEnterpriseId":"${buyerEnterpriseId}", \ \ \ \ "hasInvoice":1, \ \ \ \ "taxRefundRate":6.5, \ \ \ \ "startDate":"${datatime}", \ \ \ \ "endDate":"${str_time}", \ \ \ \ "signDateStart":"${datatime}", \ \ \ \ "signDateEnd":"${str_time}", \ \ \ \ "buyerEnterpriseName":"${buyerEnterpriseName}", \ \ \ \ "sellerEnterpriseName":"${sellerEnterpriseName}", \ \ \ \ "hasSubsidiesTax":0 } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/contract/create ${data.encode('utf-8')} |
||||
|
log ${reps.json()} |
||||
@ -0,0 +1,139 @@ |
|||||
|
*** Settings *** |
||||
|
Library DateTime |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
Library String |
||||
|
|
||||
|
*** Variables *** |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
proxy-sell-activity_list |
||||
|
#代卖活动列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/proxy-sell-activity/list params=pageNum=1&pageSize=10&status=1 |
||||
|
${records} Get From Dictionary ${reps.json()["data"]} records #代卖活动列表 |
||||
|
${value} Evaluate random.choice(${records}) random |
||||
|
log to console \nvalue: ${value} |
||||
|
${settlementModes} Get From Dictionary ${value} settlementModes #代卖活动结算方式 |
||||
|
${settlementMode} Set Variable If '${settlementModes}'=='1' 1 0 |
||||
|
Set Global Variable ${settlementMode} |
||||
|
|
||||
|
get_paper-mill-list |
||||
|
#获取纸厂列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-list params=pageNum=1&pageSize=30&enableSalesAgent=1 |
||||
|
${records} Get From Dictionary ${reps.json()["data"]} records #获取纸厂列表 |
||||
|
FOR ${items} IN @{records} |
||||
|
${shortName} Get From Dictionary ${items} shortName #纸厂简称 |
||||
|
${PaperMillId} Get From Dictionary ${items} id #纸厂id |
||||
|
Exit For Loop If '${shortName}'=='宇茂纸业' |
||||
|
END |
||||
|
Set Global Variable ${shortName} |
||||
|
Set Global Variable ${PaperMillId} |
||||
|
|
||||
|
factory-licence-list |
||||
|
#纸厂企业对照表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-user-center/admin/get/factory-licence-list params=pageNum=1&pageSize=30 |
||||
|
|
||||
|
get-Transaction subject |
||||
|
#获取交易主体 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/transaction-main-enterprise/list |
||||
|
${交易数据} Get From Dictionary ${reps.json()} data |
||||
|
#随机获取交易主体 |
||||
|
${交易信息} Evaluate random.choice(${交易数据}) random |
||||
|
log to console \nvalue:${交易信息} |
||||
|
${交易主体id} Get From Dictionary ${交易信息} id #交易主体id |
||||
|
${交易主体name} Get From Dictionary ${交易信息} name #交易主体name |
||||
|
Set Global Variable ${交易主体id} |
||||
|
Set Global Variable ${交易主体name} |
||||
|
|
||||
|
user_search |
||||
|
#参与用户 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/proxy-sell-activity/user/search |
||||
|
${data} Get From Dictionary ${reps.json()} data #用户列表 |
||||
|
FOR ${items} IN @{data} |
||||
|
${userId} Get From Dictionary ${items} userId #用户id |
||||
|
${phone} Get From Dictionary ${items} phone #用户手机号 |
||||
|
Exit For Loop If '${phone}'=='15014242835' |
||||
|
END |
||||
|
Set Global Variable ${userId} |
||||
|
|
||||
|
get_paper-mill-category |
||||
|
#获取纸厂品类 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-category/${PaperMillId} |
||||
|
${data} Get From Dictionary ${reps.json()} data #纸厂品类列表 |
||||
|
${value} Evaluate random.choice(${data}) random |
||||
|
log to console \nvalue: ${value} |
||||
|
${categoryName} Get From Dictionary ${value} categoryName #品类名称 |
||||
|
${paperMillCategoryId} Get From Dictionary ${value} paperMillCategoryId #品类id |
||||
|
Set Global Variable ${categoryName} |
||||
|
Set Global Variable ${paperMillCategoryId} |
||||
|
|
||||
|
get_mill-supplier-list |
||||
|
#获取纸厂供应商列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/get/mill-supplier-list/${PaperMillId} |
||||
|
${data} Get From Dictionary ${reps.json()} data #供应商列表 |
||||
|
${supplier_value} Evaluate random.choice(${data}) random |
||||
|
log to console \nvalue: ${supplier_value} |
||||
|
${account} Get From Dictionary ${supplier_value} account #供应商名称 |
||||
|
${merchantAccountId} Get From Dictionary ${supplier_value} merchantAccountId #供应商id |
||||
|
Set Global Variable ${account} |
||||
|
Set Global Variable ${merchantAccountId} |
||||
|
|
||||
|
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} |
||||
|
|
||||
|
saveOrUpdate-2 |
||||
|
#新增代卖活动(2次) |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${datatime} Get Time |
||||
|
${DT} Add Time To Date ${datatime} 2 days |
||||
|
${DT_str} Get Substring ${DT} 0 19 |
||||
|
${activity_data} Set Variable { \ \ \ \ "id":null, \ \ \ \ "activityName":"${shortName}-两次", \ \ \ \ "paperMillId":"${PaperMillId}", \ \ \ \ "millSupplierId":"${merchantAccountId}", \ \ \ \ "settlementModes":1, \ \ \ \ "tradeOwnerName":"${交易主体name}", \ \ \ \ "tradeOwnerId":"${交易主体id}", \ \ \ \ "isEntire":0, \ \ \ \ "agreedDeliveryWeight":100000, \ \ \ \ "ruleUrl":"${pictures}", \ \ \ \ "paperMillPaperCategoriesList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "paperMillPaperCategoryId":"${paperMillCategoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "paperMillPaperCategoryPrice":1.23, \ \ \ \ \ \ \ \ \ \ \ \ "paperMillPaperCategorySubsidyPrice":0.01 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "activityId":null, \ \ \ \ "users":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "userId":"${userId}", \ \ \ \ \ \ \ \ \ \ \ \ "paymentModes":1, \ \ \ \ \ \ \ \ \ \ \ \ "surcharge":0.015 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "factorys":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "factoryId":null, \ \ \ \ \ \ \ \ \ \ \ \ "paymentModes":0, \ \ \ \ \ \ \ \ \ \ \ \ "surcharge":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "startTime":"${datatime}", \ \ \ \ "endTime":"${DT_str}" } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell-activity/saveOrUpdate ${activity_data.encode('utf-8')} |
||||
|
|
||||
|
saveOrUpdate-1 |
||||
|
#新增代卖活动(1次) |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${datatime} Get Time |
||||
|
${DT} Add Time To Date ${datatime} 2 days |
||||
|
${DT_str} Get Substring ${DT} 0 19 |
||||
|
${activity_data} Set Variable { \ \ \ \ "id":null, \ \ \ \ "activityName":"${shortName}-一次", \ \ \ \ "paperMillId":"${PaperMillId}", \ \ \ \ "millSupplierId":"${merchantAccountId}", \ \ \ \ "settlementModes":0, \ \ \ \ "tradeOwnerName":"${交易主体name}", \ \ \ \ "tradeOwnerId":"${交易主体id}", \ \ \ \ "isEntire":0, \ \ \ \ "agreedDeliveryWeight":100000, \ \ \ \ "ruleUrl":"${pictures}", \ \ \ \ "paperMillPaperCategoriesList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "paperMillPaperCategoryId":"${paperMillCategoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "paperMillPaperCategoryPrice":1.33, \ \ \ \ \ \ \ \ \ \ \ \ "paperMillPaperCategorySubsidyPrice":0.015 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "activityId":null, \ \ \ \ "users":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "userId":"${userId}", \ \ \ \ \ \ \ \ \ \ \ \ "paymentModes":1, \ \ \ \ \ \ \ \ \ \ \ \ "surcharge":0.02 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "factorys":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "factoryId":null, \ \ \ \ \ \ \ \ \ \ \ \ "paymentModes":0, \ \ \ \ \ \ \ \ \ \ \ \ "surcharge":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "startTime":"${datatime}", \ \ \ \ "endTime":"${DT_str}" } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell-activity/saveOrUpdate ${activity_data.encode('utf-8')} |
||||
|
|
||||
|
proxy-sell-activity_list1 |
||||
|
#代卖活动列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/proxy-sell-activity/list params=pageNum=1&pageSize=10&status=1 |
||||
|
${records} Get From Dictionary ${reps.json()["data"]} records #活动列表 |
||||
|
FOR ${items} IN @{records} |
||||
|
${Activity_id} Get From Dictionary ${items} id #获取活动id |
||||
|
${activityName} Get From Dictionary ${items} activityName #获取活动名称 |
||||
|
Exit For Loop If '${activityName}'=='${shortName}-一次' |
||||
|
END |
||||
|
Set Global Variable ${Activity_id} |
||||
|
|
||||
|
shutActivity |
||||
|
#结束活动 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable {"activityId":"${Activity_id}"} |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell-activity/shutActivity ${data.encode('utf-8')} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
@ -0,0 +1,205 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 上传磅单-一次付款活动 |
||||
|
Library DateTime |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library requests |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
|
||||
|
*** 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()} |
||||
|
${records} Get From Dictionary ${reps.json()["data"]} records #获取订单列表 |
||||
|
${orderItemId_value} Evaluate random.choice(${records}) random #随机获取订单信息 |
||||
|
log to console \nvalue: ${orderItemId_value} |
||||
|
${orderItemId} Get From Dictionary ${orderItemId_value} 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} |
||||
|
${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 #代卖费单价 |
||||
|
${settleUtiPriceIncludeTaxType} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} settleUtiPriceIncludeTaxType #含税补贴类型 |
||||
|
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
||||
|
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
||||
|
${unitSurcharge} Set Variable If '${unitSurcharge}'=='${None}' 0 ${unitSurcharge} |
||||
|
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 ${unitSurcharge} |
||||
|
Set Global Variable ${settleUtiPriceIncludeTaxType} |
||||
|
|
||||
|
get_delivery-info |
||||
|
#获取订单名片信息 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get/proxy-order/delivery-info/${orderItemId} |
||||
|
log ${reps.json()} |
||||
|
${plateNumber} Get From Dictionary ${reps.json()["data"]} plateNumber #车牌号 |
||||
|
${settleUtiPrice} Get From Dictionary ${reps.json()["data"]} settleUtiPrice #结算单价 |
||||
|
Set Global Variable ${plateNumber} |
||||
|
Set Global Variable ${settleUtiPrice} |
||||
|
|
||||
|
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 #垫资费 |
||||
|
${accountPeriod} Get From Dictionary ${reps.json()["data"]} accountPeriod #账期 |
||||
|
${buyerEnterpriseId} Get From Dictionary ${reps.json()["data"]} buyerEnterpriseId #企业id |
||||
|
${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 #含税结算单价结算规则 |
||||
|
${advanceFund} Set Variable If '${advanceFund}'=='${None}' 0 ${advanceFund} |
||||
|
${proxyPaySurcharge} Set Variable If '${proxyPaySurcharge}'=='${None}' 0 ${proxyPaySurcharge} |
||||
|
Set Global Variable ${advanceFund} |
||||
|
Set Global Variable ${accountPeriod} |
||||
|
Set Global Variable ${buyerEnterpriseId} |
||||
|
Set Global Variable ${taxRefundRate} |
||||
|
Set Global Variable ${proxyPaySurcharge} |
||||
|
Set Global Variable ${hasInvoice} |
||||
|
Set Global Variable ${accountPeriodType} |
||||
|
Set Global Variable ${settlePriceIncludeTaxSettleRules} |
||||
|
Set Global Variable ${isSubsidyAndDeductIncludeTax} |
||||
|
Set Global Variable ${receivableSettlementRules} |
||||
|
Set Global Variable ${settlePriceIncludeTaxSettleRules} |
||||
|
|
||||
|
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-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 |
||||
|
FOR ${item} IN @{data} |
||||
|
log ${item} |
||||
|
${isDefault} Get From Dictionary ${item} isDefault #获取启用状态 |
||||
|
${name} Get From Dictionary ${item} name #获取name |
||||
|
${id} Get From Dictionary ${item} id #获取id |
||||
|
Exit For Loop If '${isDefault}'=='1' |
||||
|
END |
||||
|
Set Global Variable ${name} |
||||
|
Set Global Variable ${id} |
||||
|
|
||||
|
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_proxy-order_delivery-info |
||||
|
#获取订单名片信息 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get/proxy-order/delivery-info/${orderItemId} |
||||
|
log ${reps.json()} |
||||
|
${plateNumber} Get From Dictionary ${reps.json()["data"]} plateNumber #车牌号 |
||||
|
${settleUtiPrice} Get From Dictionary ${reps.json()["data"]} settleUtiPrice #结算单价 |
||||
|
Set Global Variable ${plateNumber} |
||||
|
Set Global Variable ${settleUtiPrice} |
||||
|
|
||||
|
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()} |
||||
|
|
||||
|
Upload_pictures |
||||
|
#上传图片 |
||||
|
#${dict} Create Dictionary Content-Type=image/jpeg filename=20210803.jpg |
||||
|
#Create Session ZTBT ${URL} ${dict} |
||||
|
${filepath} Evaluate open('E:/lyl/图片/16pic_6879381_b.jpg','rb') |
||||
|
${image} Evaluate open('E:/lyl/图片/16pic_6879381_b.jpg','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} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/repeat/proxy-order params=orderItemId=${orderItemId}&plateNumber=${carList}&settleWeight=14800&weighingDate=${datatime}&orderType=${orderType}&settlePrice=29466.6 |
||||
|
${records} Get From Dictionary ${reps.json()["data"]} records #获取重复订单列表 |
||||
|
${orderItemId_list} Create List |
||||
|
#sleep 0.5 |
||||
|
FOR ${items} IN @{records} |
||||
|
${orderItemId} Get From Dictionary ${items} orderItemId |
||||
|
Append To List ${orderItemId_list} '''${orderItemId}''' |
||||
|
END |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
Set Global Variable ${orderItemId_list} |
||||
|
|
||||
|
repeat_proxy-order |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable { \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "remark":"${datatime}", \ \ \ \ "repeatOrderItem":${orderItemId_list} } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/customer-service/confirm/repeat/proxy-order ${data.encode('utf-8')} |
||||
|
|
||||
|
weightnote |
||||
|
#提交磅单 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${datatime} Get Current Date result_format=%Y-%m-%d |
||||
|
${data} Set Variable { \ \ \ \ "deductedPoint":0, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "scrapeOrderId":"", \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "unitPrice":"${paperCategoryPrice}", \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "settleUtiPriceIncludeTax":1.6608157894736841, \ \ \ \ "settleUtiPriceIncludeTaxType":"${settleUtiPriceIncludeTaxType}", \ \ \ \ "receivableAdjustMoney":"30", \ \ \ \ "refundSubsidy":0.002, \ \ \ \ "adjustMoney":"20", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "netWeight":15800, \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "nonStandardPenalty_car":"", \ \ \ \ "settleWeight":14800, \ \ \ \ "deductedWeight":0, \ \ \ \ "orderType":1, \ \ \ \ "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":2, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":15, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ] } |
||||
|
log ${data} |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/save/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} |
||||
|
|
||||
|
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,188 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 上次送货单-两次付款活动 |
||||
|
Library DateTime |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library requests |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
|
||||
|
*** 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()} |
||||
|
${records} Get From Dictionary ${reps.json()["data"]} records #获取订单列表 |
||||
|
${orderItemId_value} Evaluate random.choice(${records}) random #随机获取订单信息 |
||||
|
log to console \nvalue: ${orderItemId_value} |
||||
|
${orderItemId} Get From Dictionary ${orderItemId_value} 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} |
||||
|
${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 |
||||
|
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
||||
|
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
||||
|
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
||||
|
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} |
||||
|
|
||||
|
get_delivery-info |
||||
|
#获取订单名片信息 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get/proxy-order/delivery-info/${orderItemId} |
||||
|
log ${reps.json()} |
||||
|
${plateNumber} Get From Dictionary ${reps.json()["data"]} plateNumber #车牌号 |
||||
|
${settleUtiPrice} Get From Dictionary ${reps.json()["data"]} settleUtiPrice #结算单价 |
||||
|
Set Global Variable ${plateNumber} |
||||
|
Set Global Variable ${settleUtiPrice} |
||||
|
|
||||
|
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 #垫资费 |
||||
|
${accountPeriod} Get From Dictionary ${reps.json()["data"]} accountPeriod #账期 |
||||
|
${buyerEnterpriseId} Get From Dictionary ${reps.json()["data"]} buyerEnterpriseId #企业id |
||||
|
${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 #含税结算单价结算规则 |
||||
|
${advanceFund} Set Variable If '${advanceFund}'=='${None}' 0 ${advanceFund} |
||||
|
${proxyPaySurcharge} Set Variable If '${proxyPaySurcharge}'=='${None}' 0 ${proxyPaySurcharge} |
||||
|
Set Global Variable ${advanceFund} |
||||
|
Set Global Variable ${accountPeriod} |
||||
|
Set Global Variable ${buyerEnterpriseId} |
||||
|
Set Global Variable ${taxRefundRate} |
||||
|
Set Global Variable ${proxyPaySurcharge} |
||||
|
Set Global Variable ${hasInvoice} |
||||
|
Set Global Variable ${accountPeriodType} |
||||
|
Set Global Variable ${settlePriceIncludeTaxSettleRules} |
||||
|
Set Global Variable ${isSubsidyAndDeductIncludeTax} |
||||
|
Set Global Variable ${receivableSettlementRules} |
||||
|
Set Global Variable ${settlePriceIncludeTaxSettleRules} |
||||
|
|
||||
|
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-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 |
||||
|
FOR ${item} IN @{data} |
||||
|
log ${item} |
||||
|
${isDefault} Get From Dictionary ${item} isDefault #获取启用状态 |
||||
|
${name} Get From Dictionary ${item} name #获取name |
||||
|
${id} Get From Dictionary ${item} id #获取id |
||||
|
Exit For Loop If '${isDefault}'=='1' |
||||
|
END |
||||
|
Set Global Variable ${name} |
||||
|
Set Global Variable ${id} |
||||
|
|
||||
|
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_proxy-order_delivery-info |
||||
|
#获取订单名片信息 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get/proxy-order/delivery-info/${orderItemId} |
||||
|
log ${reps.json()} |
||||
|
${plateNumber} Get From Dictionary ${reps.json()["data"]} plateNumber #车牌号 |
||||
|
${settleUtiPrice} Get From Dictionary ${reps.json()["data"]} settleUtiPrice #结算单价 |
||||
|
Set Global Variable ${plateNumber} |
||||
|
Set Global Variable ${settleUtiPrice} |
||||
|
|
||||
|
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()} |
||||
|
|
||||
|
Upload_pictures |
||||
|
#上传图片 |
||||
|
#${dict} Create Dictionary Content-Type=image/jpeg filename=20210803.jpg |
||||
|
#Create Session ZTBT ${URL} ${dict} |
||||
|
${filepath} Evaluate open('E:/lyl/图片/16pic_6879381_b.jpg','rb') |
||||
|
${image} Evaluate open('E:/lyl/图片/16pic_6879381_b.jpg','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} Get Current Date result_format=%Y-%m-%d |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/repeat/proxy-order params=orderItemId=${orderItemId} &plateNumber=${plateNumber} &netWeight=30000&weighingDate=${datatime}&orderType=3 |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
weightnote |
||||
|
#提交磅单 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${datatime} Get Current Date result_format=%Y-%m-%d |
||||
|
${data} Set Variable { \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "netWeight":13000, \ \ \ \ "settleWeight":null, \ \ \ \ "unitSurcharge":0.02, \ \ \ \ "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}" } |
||||
|
log ${data} |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/save/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} |
||||
|
|
||||
|
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,77 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 运营审核-常规 |
||||
|
Library DateTime |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','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 #纸品品类名称 |
||||
|
${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 #结算重量 |
||||
|
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' '${unitSurcharge}'*'${netWeight}' '${unitSurcharge}'*'${settleWeight}' #代卖费总额 |
||||
|
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
||||
|
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} |
||||
|
|
||||
|
order-receipt-audit-details |
||||
|
#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":null, \ \ \ \ "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 |
||||
|
|
||||
|
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":"${datatime}" } |
||||
|
${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,78 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 运用审核-一次付款活动 |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library DateTime |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','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} |
||||
|
${datatime} Get Current Date result_format=%Y-%m-%d |
||||
|
${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 #结算重量 |
||||
|
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' '${unitSurcharge}'*'${netWeight}' '${unitSurcharge}'*'${settleWeight}' #代卖费总额 |
||||
|
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
||||
|
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 ${datatime} |
||||
|
|
||||
|
order-receipt-audit-details |
||||
|
#b保存磅单信息 |
||||
|
Create Session ZTBT ${URL} ${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 |
||||
|
|
||||
|
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":"${datatime}" } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
sleep 1 |
||||
@ -0,0 +1,78 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 运营审核-两次付款活动 |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library DateTime |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','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} |
||||
|
${datatime} Get Current Date result_format=%Y-%m-%d |
||||
|
${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 #结算重量 |
||||
|
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
||||
|
${settleWeight} Set Variable If '${settleWeight}'=='None' 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} |
||||
|
Set Global Variable ${paperCategoryId} |
||||
|
Set Global Variable ${datatime} |
||||
|
|
||||
|
order-receipt-audit-details |
||||
|
#b保存磅单信息 |
||||
|
Create Session ZTBT ${URL} ${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 |
||||
|
|
||||
|
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":"${datatime}" } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
sleep 1 |
||||
@ -0,0 +1,39 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 代卖应付 |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','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} |
||||
|
${auditedTime} Get From Dictionary ${reps.json()["data"]["records"][0]} auditedTime #财务第一次确认结算时间 |
||||
|
log ${auditedTime.year} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
|
Set Global Variable ${auditedTime} |
||||
|
|
||||
|
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":"${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 |
||||
|
|
||||
|
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')} |
||||
|
sleep 1 |
||||
@ -0,0 +1,33 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 代卖应收 |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get_paper-payment-order-list |
||||
|
#通过订单编号获取代卖应收列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-payment-order-list params=pageNum=1&pageSize=10&orderId=${orderId} |
||||
|
${paymentOrderId} Get From Dictionary ${reps.json()["data"]["records"][0]} id #回款单号 |
||||
|
log ${reps.json()} |
||||
|
Set Global Variable ${paymentOrderId} |
||||
|
|
||||
|
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} |
||||
|
${receivablePriceIncludeTax} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePriceIncludeTax #获取应收金额 |
||||
|
${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #未回款金额 |
||||
|
Set Global Variable ${receivablePriceIncludeTax} |
||||
|
Set Global Variable ${noReceivablePrice} |
||||
|
|
||||
|
update_payment-order-status |
||||
|
#确认回款操作 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable { \ \ \ \ "paymentOrderId":"${paymentOrderId}", \ \ \ \ "receivablePrice":"${receivablePriceIncludeTax}", \ \ \ \ "paidPrice":"${receivablePriceIncludeTax}", \ \ \ \ "noReceiveblePrice":"${noReceivablePrice}", \ \ \ \ "bankFlowNo":null, \ \ \ \ "paymentAdjustmentFee":null, \ \ \ \ "returnPayDate":"${datatime}" } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/operation/update/payment-order-status ${data.encode('utf-8')} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
@ -0,0 +1,207 @@ |
|||||
|
*** Settings *** |
||||
|
Library requests |
||||
|
Library Collections |
||||
|
Library RequestsLibrary |
||||
|
Library DateTime |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get_proxy-order-item-list |
||||
|
#查找预约的订单项列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order-item-list params=pageNum=1&pageSize=10&orderType=2&status=51&weightNoteType=2&orderItemId=${orderItemId} |
||||
|
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_proxy-order-details |
||||
|
#查看订单详情 |
||||
|
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} #结算单价 |
||||
|
log ${contractId} |
||||
|
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} |
||||
|
|
||||
|
get_delivery-info |
||||
|
#获取订单名片信息 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get/proxy-order/delivery-info/${orderItemId} |
||||
|
log ${reps.json()} |
||||
|
${plateNumber} Get From Dictionary ${reps.json()["data"]} plateNumber #车牌号 |
||||
|
${settleUtiPrice} Get From Dictionary ${reps.json()["data"]} settleUtiPrice #结算单价 |
||||
|
${settleUtiPriceIncludeTaxType} Get From Dictionary ${reps.json()["data"]} settleUtiPriceIncludeTaxType #含税补贴价类型 |
||||
|
${netWeight} Get From Dictionary ${reps.json()["data"]} netWeight #净重 |
||||
|
Set Global Variable ${plateNumber} |
||||
|
Set Global Variable ${settleUtiPrice} |
||||
|
Set Global Variable ${settleUtiPriceIncludeTaxType} |
||||
|
Set Global Variable ${netWeight} |
||||
|
|
||||
|
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_weightnote |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/get/weightnote/${weightnoteId} |
||||
|
log ${reps.json()} |
||||
|
|
||||
|
get_paperMill-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-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 |
||||
|
FOR ${item} IN @{data} |
||||
|
log ${item} |
||||
|
${isDefault} Get From Dictionary ${item} isDefault #获取启用状态 |
||||
|
${name} Get From Dictionary ${item} name #获取name |
||||
|
${id} Get From Dictionary ${item} id #获取id |
||||
|
Exit For Loop If '${isDefault}'=='1' |
||||
|
END |
||||
|
Set Global Variable ${name} |
||||
|
Set Global Variable ${id} |
||||
|
|
||||
|
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 #含税结算单价结算规则 |
||||
|
${advanceFund} Set Variable If '${advanceFund}'=='${None}' 0 ${advanceFund} |
||||
|
${proxyPaySurcharge} Set Variable If '${proxyPaySurcharge}'=='${None}' 0 ${proxyPaySurcharge} |
||||
|
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} |
||||
|
|
||||
|
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} |
||||
|
|
||||
|
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 { \ \ \ \ "id":"${weightNoteId}", \ \ \ \ "orderId":"${orderId}", \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "type":null, \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "settleWeight":12500, \ \ \ \ "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()} |
||||
|
|
||||
|
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,33 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 代卖应收 |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
|
||||
|
*** Variables *** |
||||
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
||||
|
${URL} http://api-ops-ztb-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
get_paper-payment-order-list |
||||
|
#通过订单编号获取代卖应收列表 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-payment-order-list params=pageNum=1&pageSize=10&orderId=${orderId} |
||||
|
${paymentOrderId} Get From Dictionary ${reps.json()["data"]["records"][0]} id #回款单号 |
||||
|
log ${reps.json()} |
||||
|
Set Global Variable ${paymentOrderId} |
||||
|
|
||||
|
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} |
||||
|
${receivablePriceIncludeTax} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePriceIncludeTax #获取应收金额 |
||||
|
${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #未回款金额 |
||||
|
Set Global Variable ${receivablePriceIncludeTax} |
||||
|
Set Global Variable ${noReceivablePrice} |
||||
|
|
||||
|
update_payment-order-status |
||||
|
#确认回款操作 |
||||
|
Create Session ZTBT ${URL} ${header} |
||||
|
${data} Set Variable { \ \ \ \ "paymentOrderId":"${paymentOrderId}", \ \ \ \ "receivablePrice":"${receivablePriceIncludeTax}", \ \ \ \ "paidPrice":"${receivablePriceIncludeTax}", \ \ \ \ "noReceiveblePrice":"${noReceivablePrice}", \ \ \ \ "bankFlowNo":null, \ \ \ \ "paymentAdjustmentFee":null, \ \ \ \ "returnPayDate":"${datatime}" } |
||||
|
${reps} Post On Session ZTBT recycle-service/admin/operation/update/payment-order-status ${data.encode('utf-8')} |
||||
|
Should Be Equal As Strings ${reps.json()["message"]} successful |
||||
@ -0,0 +1,55 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 查看代卖订单(数据对比) |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library DateTime |
||||
|
Library RedisLibrary |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** 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} |
||||
|
|
||||
|
get_proxy-order-list |
||||
|
#获取代卖订单列表 |
||||
|
${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=QNT ${gettoken} |
||||
|
Create Session ZTBT http://api-client-ztb-test.qniao.cn ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/proxy-sell/get/proxy-order-list params=status=&pageNum=1&pageSize=15 |
||||
|
${orderId} Get From Dictionary ${reps.json()["data"]["records"][0]} orderId #获取代卖订单编号 |
||||
|
Set Global Variable ${orderId} |
||||
|
|
||||
|
get_proxy-order_details |
||||
|
#获取代卖订单详情 |
||||
|
${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=QNT ${gettoken} |
||||
|
Create Session ZTBT http://api-client-ztb-test.qniao.cn ${header} |
||||
|
${reps} Get On Session ZTBT recycle-service/proxy-sell/get/proxy-order/${orderId} |
||||
|
${data} Get From Dictionary ${reps.json()} data |
||||
|
${data_value} Set Variable |
||||
|
#Run Keyword If '${orderId}' in ${data} Log To Console ${data} |
||||
|
Should Be Equal ${data} ${data_value} |
||||
@ -1,3 +1,5 @@ |
|||||
*** Settings *** |
*** Settings *** |
||||
Suite Setup |
Suite Setup |
||||
Library RequestsLibrary |
Library RequestsLibrary |
||||
|
Library SeleniumLibrary |
||||
|
Library AppiumLibrary |
||||
2125
log.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
465
output.xml
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
2431
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