65 changed files with 11716 additions and 809 deletions
-
37000-Regularorder/1-Client(Test)/1-APPlogin(Test).robot
-
87000-Regularorder/1-Client(Test)/2.1-CreateRegularorder.robot
-
2000-Regularorder/1-Client(Test)/__init__.robot
-
2192000-Regularorder/1-Client(Test)/log.html
-
335000-Regularorder/1-Client(Test)/output.xml
-
2461000-Regularorder/1-Client(Test)/report.html
-
21000-Regularorder/2-Background_system(Test)/1-WebLogin/weblogin.robot
-
57000-Regularorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot
-
211000-Regularorder/2-Background_system(Test)/2.1-Consignment management/2.1-RegularUpload-weightnote.robot
-
144000-Regularorder/2-Background_system(Test)/2.1-Consignment management/3.1-Operation_audit.robot
-
0000-Regularorder/2-Background_system(Test)/2.1-Consignment management/__init__.robot
-
21000-Regularorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt
-
172000-Regularorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt
-
61000-Regularorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt
-
54000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot
-
36000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot
-
20000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt
-
30000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt
-
72000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt
-
37001-Activeorder/1-Client(Test)/1-APPlogin(Test).robot
-
75001-Activeorder/1-Client(Test)/2.2createActiveorder-1.robot
-
2001-Activeorder/1-Client(Test)/__init__.robot
-
21001-Activeorder/2-Background_system(Test)/1-WebLogin/weblogin.robot
-
57001-Activeorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot
-
205001-Activeorder/2-Background_system(Test)/2.1-Consignment management/2.2-RegularUpload-weightnote-1.robot
-
80001-Activeorder/2-Background_system(Test)/2.1-Consignment management/3.2-Operation_audit.robot
-
0001-Activeorder/2-Background_system(Test)/2.1-Consignment management/__init__.robot
-
21001-Activeorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt
-
172001-Activeorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt
-
61001-Activeorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt
-
41001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot
-
36001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot
-
20001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt
-
30001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt
-
72001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt
-
37002-Activeorder/1-Client(Test)/1-APPlogin(Test).robot
-
74002-Activeorder/1-Client(Test)/2.3createActiveorder-2.robot
-
2002-Activeorder/1-Client(Test)/__init__.robot
-
21002-Activeorder/2-Background_system(Test)/1-WebLogin/weblogin.robot
-
57002-Activeorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot
-
190002-Activeorder/2-Background_system(Test)/2.1-Consignment management/2.3-ActiveUpload-deliverynote.robot
-
135002-Activeorder/2-Background_system(Test)/2.1-Consignment management/3.3-Operation_audit.robot
-
0002-Activeorder/2-Background_system(Test)/2.1-Consignment management/__init__.robot
-
21002-Activeorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt
-
172002-Activeorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt
-
61002-Activeorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt
-
41002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot
-
36002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot
-
20002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt
-
30002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt
-
72002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt
-
207002-Activeorder/2-Background_system(Test)/4-Consignment_management/2.3-ActiveUpload-weightnote.robot
-
81002-Activeorder/2-Background_system(Test)/4-Consignment_management/3.3--Operation_audit.robot
-
36002-Activeorder/2-Background_system(Test)/4-Consignment_management/4.3-Financial_audit.robot
-
34002-Activeorder/2-Background_system(Test)/4-Consignment_management/5.3-sales_receivable.robot
-
0002-Activeorder/2-Background_system(Test)/4-Consignment_management/__init__.robot
-
11002-Activeorder/2-Background_system(Test)/4-Consignment_management/台账查询.txt
-
84002-Activeorder/2-Background_system(Test)/4-Consignment_management/更新磅单.txt
-
53002-Activeorder/2-Background_system(Test)/4-Consignment_management/运营审核驳回.txt
-
BIN16pic_6879381_b.jpg
-
BIN20210803.jpg
-
BIN21042217001449712.png
-
318log.html
-
3376output.xml
-
407report.html
@ -0,0 +1,37 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Library urllib3 |
|||
Library DatabaseLibrary |
|||
|
|||
*** Variables *** |
|||
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'} |
|||
${url} http://api-client-ztb-test.qniao.cn |
|||
|
|||
*** Test Cases *** |
|||
userlogin |
|||
[Setup] |
|||
#验证码登录 |
|||
Disable Warnings |
|||
Create Session ZTBT https://api-client-uec-test.qniao.cn ${header} |
|||
${data} Create Dictionary account=18888888888 captcha=888888 accountType=2 |
|||
${account} Set Variable 18888888888 |
|||
#${data} Set Variable {"accountType":2,"account":"${account}","captcha":888888} |
|||
${respones} POST On Session ZTBT uec/authorize/by-captcha json=${data} |
|||
log ${respones.status_code} |
|||
log ${respones.json()} |
|||
${token} Get From Dictionary ${respones.json()["data"]} token |
|||
Set Global Variable ${token} |
|||
Set Global Variable ${account} |
|||
[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} |
|||
@ -0,0 +1,87 @@ |
|||
*** Settings *** |
|||
Documentation 创建常规订单 |
|||
Test Teardown Run Keyword If Test Failed Fatal Error |
|||
Test Timeout |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Library DateTime |
|||
Library urllib3 |
|||
Library String |
|||
|
|||
*** Variables *** |
|||
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528','Authorization':'QNT ${gettoken}'} |
|||
${url} https://api-client-ztb-test.qniao.cn |
|||
|
|||
*** Test Cases *** |
|||
get_paper-mill-city |
|||
#获取纸厂所在城市 |
|||
Create Session ZTBT ${url} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/get/paper-mill-city |
|||
${data} Get From Dictionary ${reps.json()} data #城市列表 |
|||
FOR ${items} IN @{data} |
|||
${cityName} Get From Dictionary ${items} cityName #城市name |
|||
${cityId} Get From Dictionary ${items} cityId #城市id |
|||
Exit For Loop If '${cityName}'=='大同市' |
|||
END |
|||
Set Global Variable ${cityId} |
|||
|
|||
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=${cityId}&enableSalesAgent=1&pageNum=1&pageSize=20&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}'=='Ceshi_factory' |
|||
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} |
|||
Set Global Variable ${name} |
|||
|
|||
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} |
|||
|
|||
createorder |
|||
#创建下单 |
|||
#${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=QNT ${gettoken} |
|||
${datatime} get current date result_format=%Y-%m-%d |
|||
#${DT} Add Time To Date ${datatime} -1 day |
|||
#${str} Get Substring ${DT} 0 10 |
|||
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} |
|||
|
|||
*** Keywords *** |
|||
@ -0,0 +1,2 @@ |
|||
*** Settings *** |
|||
Test Setup |
|||
2192
000-Regularorder/1-Client(Test)/log.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,335 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<robot rpa="false" generated="20211119 10:45:59.419" schemaversion="2" generator="Robot 4.1.2 (Python 2.7.5 on linux2)"> |
|||
<suite source="/root/ztb-trading-rf-api/ztb-trading-rf-api/1-Client(Test)/2.2createActiveorder-1.robot" id="s1" name="2.2createActiveorder-1"> |
|||
<test id="s1-t1" name="proxy-sell-activity_list"> |
|||
<kw name="Create Session" library="RequestsLibrary"> |
|||
<arg>ZTBT</arg> |
|||
<arg>${url}</arg> |
|||
<arg>${headers}</arg> |
|||
<doc>Create Session: create a HTTP session to a server</doc> |
|||
<msg timestamp="20211119 10:45:59.547" level="FAIL">Variable '${headers}' not found.</msg> |
|||
<status status="FAIL" endtime="20211119 10:45:59.547" starttime="20211119 10:45:59.544"/> |
|||
</kw> |
|||
<kw name="GET On Session" library="RequestsLibrary"> |
|||
<var>${repsponse}</var> |
|||
<arg>ZTBT</arg> |
|||
<arg>recycle-service/proxy-sell-activity/list</arg> |
|||
<arg>params=pageNum=1&pageSize=15</arg> |
|||
<doc>Sends a GET request on a previously created HTTP Session.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.548" starttime="20211119 10:45:59.548"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${records}</var> |
|||
<arg>${repsponse.json()["data"]}</arg> |
|||
<arg>records</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.549" starttime="20211119 10:45:59.548"/> |
|||
</kw> |
|||
<for flavor="IN"> |
|||
<var>${item}</var> |
|||
<value>@{records}</value> |
|||
<iter> |
|||
<var name="${item}">${item}</var> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${activityName}</var> |
|||
<arg>${item}</arg> |
|||
<arg>activityName</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.549" starttime="20211119 10:45:59.549"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${paperCategoryList}</var> |
|||
<arg>${item}</arg> |
|||
<arg>paperCategoryList</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.550" starttime="20211119 10:45:59.550"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${paperMillId}</var> |
|||
<arg>${item}</arg> |
|||
<arg>paperMillId</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.550" starttime="20211119 10:45:59.550"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${activityId}</var> |
|||
<arg>${item}</arg> |
|||
<arg>activityId</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.551" starttime="20211119 10:45:59.550"/> |
|||
</kw> |
|||
<kw name="Exit For Loop If" library="BuiltIn"> |
|||
<arg>'${activityName}'=='无账期活动一次'</arg> |
|||
<doc>Stops executing the enclosing for loop if the ``condition`` is true.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.551" starttime="20211119 10:45:59.551"/> |
|||
</kw> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.551" starttime="20211119 10:45:59.549"/> |
|||
</iter> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.551" starttime="20211119 10:45:59.549"/> |
|||
</for> |
|||
<kw name="Evaluate" library="BuiltIn"> |
|||
<var>${Category_value}</var> |
|||
<arg>random.choice(${paperCategoryList})</arg> |
|||
<arg>random</arg> |
|||
<doc>Evaluates the given expression in Python and returns the result.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.552" starttime="20211119 10:45:59.551"/> |
|||
</kw> |
|||
<kw name="Log To Console" library="BuiltIn"> |
|||
<arg>\nvalue: ${Category_value}</arg> |
|||
<doc>Logs the given message to the console.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.552" starttime="20211119 10:45:59.552"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${categoryId}</var> |
|||
<arg>${Category_value}</arg> |
|||
<arg>categoryId</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.552" starttime="20211119 10:45:59.552"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${categoryName}</var> |
|||
<arg>${Category_value}</arg> |
|||
<arg>categoryName</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.553" starttime="20211119 10:45:59.553"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${unitPrice}</var> |
|||
<arg>${Category_value}</arg> |
|||
<arg>unitPrice</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.553" starttime="20211119 10:45:59.553"/> |
|||
</kw> |
|||
<kw name="Set Global Variable" library="BuiltIn"> |
|||
<arg>${paperMillId}</arg> |
|||
<doc>Makes a variable available globally in all tests and suites.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.554" starttime="20211119 10:45:59.554"/> |
|||
</kw> |
|||
<kw name="Set Global Variable" library="BuiltIn"> |
|||
<arg>${activityId}</arg> |
|||
<doc>Makes a variable available globally in all tests and suites.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.554" starttime="20211119 10:45:59.554"/> |
|||
</kw> |
|||
<kw name="Set Global Variable" library="BuiltIn"> |
|||
<arg>${categoryId}</arg> |
|||
<doc>Makes a variable available globally in all tests and suites.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.554" starttime="20211119 10:45:59.554"/> |
|||
</kw> |
|||
<kw name="Set Global Variable" library="BuiltIn"> |
|||
<arg>${categoryName}</arg> |
|||
<doc>Makes a variable available globally in all tests and suites.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.555" starttime="20211119 10:45:59.555"/> |
|||
</kw> |
|||
<kw name="Set Global Variable" library="BuiltIn"> |
|||
<arg>${unitPrice}</arg> |
|||
<doc>Makes a variable available globally in all tests and suites.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.555" starttime="20211119 10:45:59.555"/> |
|||
</kw> |
|||
<status status="FAIL" endtime="20211119 10:45:59.555" starttime="20211119 10:45:59.543">Variable '${headers}' not found.</status> |
|||
</test> |
|||
<test id="s1-t2" name="get-carinfo"> |
|||
<kw name="Create Session" library="RequestsLibrary"> |
|||
<arg>get-carinfo</arg> |
|||
<arg>${url}</arg> |
|||
<arg>${headers}</arg> |
|||
<doc>Create Session: create a HTTP session to a server</doc> |
|||
<msg timestamp="20211119 10:45:59.558" level="FAIL">Variable '${headers}' not found.</msg> |
|||
<status status="FAIL" endtime="20211119 10:45:59.558" starttime="20211119 10:45:59.556"/> |
|||
</kw> |
|||
<kw name="GET On Session" library="RequestsLibrary"> |
|||
<var>${reps}</var> |
|||
<arg>get-carinfo</arg> |
|||
<arg>recycle-service/proxy-sell/get/his-car-info</arg> |
|||
<doc>Sends a GET request on a previously created HTTP Session.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.559" starttime="20211119 10:45:59.559"/> |
|||
</kw> |
|||
<kw name="Log" library="BuiltIn"> |
|||
<arg>${reps.json()}</arg> |
|||
<doc>Logs the given message with the given level.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.559" starttime="20211119 10:45:59.559"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${carNumber}</var> |
|||
<arg>${reps.json()["data"]}</arg> |
|||
<arg>records</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.559" starttime="20211119 10:45:59.559"/> |
|||
</kw> |
|||
<kw name="Evaluate" library="BuiltIn"> |
|||
<var>${plateNumber_value}</var> |
|||
<arg>random.sample(${carNumber},1)</arg> |
|||
<arg>random</arg> |
|||
<doc>Evaluates the given expression in Python and returns the result.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.559" starttime="20211119 10:45:59.559"/> |
|||
</kw> |
|||
<kw name="Log To Console" library="BuiltIn"> |
|||
<arg>\nvalue:${plateNumber_value}</arg> |
|||
<doc>Logs the given message to the console.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.560" starttime="20211119 10:45:59.560"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${plateNumber1}</var> |
|||
<arg>${plateNumber_value[0]}</arg> |
|||
<arg>plateNumber</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.561" starttime="20211119 10:45:59.560"/> |
|||
</kw> |
|||
<kw name="Set Global Variable" library="BuiltIn"> |
|||
<arg>${plateNumber1}</arg> |
|||
<doc>Makes a variable available globally in all tests and suites.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.561" starttime="20211119 10:45:59.561"/> |
|||
</kw> |
|||
<status status="FAIL" endtime="20211119 10:45:59.562" starttime="20211119 10:45:59.556">Variable '${headers}' not found.</status> |
|||
</test> |
|||
<test id="s1-t3" name="get_paper-mill-paper-category-price-details"> |
|||
<kw name="Create Session" library="RequestsLibrary"> |
|||
<arg>ZTBT</arg> |
|||
<arg>${url}</arg> |
|||
<arg>${headers}</arg> |
|||
<doc>Create Session: create a HTTP session to a server</doc> |
|||
<msg timestamp="20211119 10:45:59.566" level="FAIL">Variable '${headers}' not found.</msg> |
|||
<status status="FAIL" endtime="20211119 10:45:59.566" starttime="20211119 10:45:59.564"/> |
|||
</kw> |
|||
<kw name="GET On Session" library="RequestsLibrary"> |
|||
<var>${reps}</var> |
|||
<arg>ZTBT</arg> |
|||
<arg>recycle-service/get/paper-mill-paper-category-price-details/${paperMillId}</arg> |
|||
<doc>Sends a GET request on a previously created HTTP Session.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.566" starttime="20211119 10:45:59.566"/> |
|||
</kw> |
|||
<kw name="Log" library="BuiltIn"> |
|||
<arg>${reps.json()}</arg> |
|||
<doc>Logs the given message with the given level.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.566" starttime="20211119 10:45:59.566"/> |
|||
</kw> |
|||
<status status="FAIL" endtime="20211119 10:45:59.567" starttime="20211119 10:45:59.563">Variable '${headers}' not found.</status> |
|||
</test> |
|||
<test id="s1-t4" name="get_relation"> |
|||
<kw name="Create Session" library="RequestsLibrary"> |
|||
<arg>ZTBT</arg> |
|||
<arg>${url}</arg> |
|||
<arg>${headers}</arg> |
|||
<doc>Create Session: create a HTTP session to a server</doc> |
|||
<msg timestamp="20211119 10:45:59.570" level="FAIL">Variable '${headers}' not found.</msg> |
|||
<status status="FAIL" endtime="20211119 10:45:59.570" starttime="20211119 10:45:59.568"/> |
|||
</kw> |
|||
<kw name="GET On Session" library="RequestsLibrary"> |
|||
<var>${reps}</var> |
|||
<arg>ZTBT</arg> |
|||
<arg>recycle-service/proxy-sell/get/relation</arg> |
|||
<doc>Sends a GET request on a previously created HTTP Session.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.571" starttime="20211119 10:45:59.571"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${bizUserId}</var> |
|||
<arg>${reps.json()["data"]}</arg> |
|||
<arg>bizUserId</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.571" starttime="20211119 10:45:59.571"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${cusormerId}</var> |
|||
<arg>${reps.json()["data"]}</arg> |
|||
<arg>cusormerId</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.571" starttime="20211119 10:45:59.571"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${customerName}</var> |
|||
<arg>${reps.json()["data"]}</arg> |
|||
<arg>customerName</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.572" starttime="20211119 10:45:59.571"/> |
|||
</kw> |
|||
<kw name="Set Global Variable" library="BuiltIn"> |
|||
<arg>${bizUserId}</arg> |
|||
<doc>Makes a variable available globally in all tests and suites.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.572" starttime="20211119 10:45:59.572"/> |
|||
</kw> |
|||
<kw name="Set Global Variable" library="BuiltIn"> |
|||
<arg>${cusormerId}</arg> |
|||
<doc>Makes a variable available globally in all tests and suites.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.572" starttime="20211119 10:45:59.572"/> |
|||
</kw> |
|||
<kw name="Set Global Variable" library="BuiltIn"> |
|||
<arg>${customerName}</arg> |
|||
<doc>Makes a variable available globally in all tests and suites.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.572" starttime="20211119 10:45:59.572"/> |
|||
</kw> |
|||
<status status="FAIL" endtime="20211119 10:45:59.573" starttime="20211119 10:45:59.567">Variable '${headers}' not found.</status> |
|||
</test> |
|||
<test id="s1-t5" name="create_order"> |
|||
<kw name="Create Session" library="RequestsLibrary"> |
|||
<arg>ZTBT</arg> |
|||
<arg>${url}</arg> |
|||
<arg>${headers}</arg> |
|||
<doc>Create Session: create a HTTP session to a server</doc> |
|||
<msg timestamp="20211119 10:45:59.576" level="FAIL">Variable '${headers}' not found.</msg> |
|||
<status status="FAIL" endtime="20211119 10:45:59.576" starttime="20211119 10:45:59.574"/> |
|||
</kw> |
|||
<kw name="Get Current Date" library="DateTime"> |
|||
<var>${datatime}</var> |
|||
<arg>result_format=%Y-%m-%d</arg> |
|||
<doc>Returns current local or UTC time with an optional increment.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.576" starttime="20211119 10:45:59.576"/> |
|||
</kw> |
|||
<kw name="Set Variable" library="BuiltIn"> |
|||
<var>${order_data}</var> |
|||
<arg>{ \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "totalEstimatedWeight":30000, \ \ \ \ "activityId":"${activityId}", \ \ \ \ "customerName":"${customerName}", \ \ \ \ "deliveryTime":"${datatime}", \ \ \ \ "carInfos":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "plateNumber":"${plateNumber1}" \ \ \ \ \ \ \ \ } \ \ \ \ ] }</arg> |
|||
<doc>Returns the given values which can then be assigned to a variables.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.577" starttime="20211119 10:45:59.577"/> |
|||
</kw> |
|||
<kw name="POST On Session" library="RequestsLibrary"> |
|||
<var>${reps}</var> |
|||
<arg>ZTBT</arg> |
|||
<arg>recycle-service/proxy-sell/create/order</arg> |
|||
<arg>${order_data.encode('utf-8')}</arg> |
|||
<doc>Sends a POST request on a previously created HTTP Session.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.577" starttime="20211119 10:45:59.577"/> |
|||
</kw> |
|||
<kw name="Log" library="BuiltIn"> |
|||
<arg>${reps.json()}</arg> |
|||
<doc>Logs the given message with the given level.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.577" starttime="20211119 10:45:59.577"/> |
|||
</kw> |
|||
<kw name="Get From Dictionary" library="Collections"> |
|||
<var>${orderId}</var> |
|||
<arg>${reps.json()["data"]}</arg> |
|||
<arg>orderId</arg> |
|||
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.578" starttime="20211119 10:45:59.577"/> |
|||
</kw> |
|||
<kw name="Should Be Equal As Strings" library="BuiltIn"> |
|||
<arg>${reps.json()["message"]}</arg> |
|||
<arg>successful</arg> |
|||
<doc>Fails if objects are unequal after converting them to strings.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.578" starttime="20211119 10:45:59.578"/> |
|||
</kw> |
|||
<kw name="Set Global Variable" library="BuiltIn"> |
|||
<arg>${orderId}</arg> |
|||
<doc>Makes a variable available globally in all tests and suites.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.578" starttime="20211119 10:45:59.578"/> |
|||
</kw> |
|||
<kw name="Set Global Variable" library="BuiltIn"> |
|||
<arg>${datatime}</arg> |
|||
<doc>Makes a variable available globally in all tests and suites.</doc> |
|||
<status status="NOT RUN" endtime="20211119 10:45:59.578" starttime="20211119 10:45:59.578"/> |
|||
</kw> |
|||
<status status="FAIL" endtime="20211119 10:45:59.579" starttime="20211119 10:45:59.573">Variable '${headers}' not found.</status> |
|||
</test> |
|||
<status status="FAIL" endtime="20211119 10:45:59.580" starttime="20211119 10:45:59.420"/> |
|||
</suite> |
|||
<statistics> |
|||
<total> |
|||
<stat fail="5" skip="0" pass="0">All Tests</stat> |
|||
</total> |
|||
<tag> |
|||
</tag> |
|||
<suite> |
|||
<stat fail="5" skip="0" id="s1" name="2.2createActiveorder-1" pass="0">2.2createActiveorder-1</stat> |
|||
</suite> |
|||
</statistics> |
|||
<errors> |
|||
<msg timestamp="20211119 10:45:59.541" level="ERROR">Error in file '/root/ztb-trading-rf-api/ztb-trading-rf-api/1-Client(Test)/2.2createActiveorder-1.robot' on line 8: Setting variable '${headers}' failed: Variable '${gettoken}' not found.</msg> |
|||
</errors> |
|||
</robot> |
|||
2461
000-Regularorder/1-Client(Test)/report.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,21 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
|
|||
*** Test Cases *** |
|||
pwlogin |
|||
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded X-APP-ID=470236309865238555 |
|||
Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header} |
|||
&{data} Create Dictionary username=laiyonglan@qniao.cn password=qn123456 |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/login data=${data} |
|||
log ${reps.json()} |
|||
${gettoken} Set Variable Token 6b08add42d6bcf73abb935b2adf83525 |
|||
Should Be Equal As Strings ${reps.json()["message"]} 登陆成功 |
|||
Set Global Variable ${gettoken} |
|||
|
|||
login-info |
|||
${header} Create Dictionary X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525 |
|||
Create Session login-info http://api-ops-ztb-test.qniao.cn ${header} |
|||
${reps_data} Get On Session login-info recycle-service/admin/employee/get/login-info |
|||
log ${reps_data} |
|||
Should Be Equal As Strings ${reps_data.json()["message"]} successful |
|||
@ -0,0 +1,57 @@ |
|||
*** 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_paper-mill-order-reservation-list |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps_data} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-order-reservation-list params=pageNum=1&pageSize=10&status=&orderId=${orderId} |
|||
log ${reps_data.json()} |
|||
#获取订单编号${orderId}、纸厂id${paperMillId}、订单类型${orderType} |
|||
${orderId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderId #订单编号 |
|||
${paperMillId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillId #纸厂id |
|||
${id} Get From Dictionary ${reps_data.json()["data"]["records"][0]} id #预约id |
|||
${orderType} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderType #订单类型 |
|||
${carNoList} Get From Dictionary ${reps_data.json()["data"]["records"][0]} carNoList #车辆信息列表 |
|||
${paperMillName} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillName #纸厂名称 |
|||
${sellerReservationDate} Get From Dictionary ${reps_data.json()["data"]["records"][0]} sellerReservationDate #送货时间 |
|||
#随机获取车辆信息 |
|||
${carList} Evaluate random.choice(${carNoList}) random |
|||
log to console \nvalue:${carList} |
|||
Should Be Equal As Strings ${reps_data.json()["message"]} successful |
|||
Set Global Variable ${orderId} |
|||
Set Global Variable ${paperMillId} |
|||
Set Global Variable ${id} |
|||
Set Global Variable ${paperMillName} |
|||
Set Global Variable ${sellerReservationDate} |
|||
Set Global Variable ${orderType} |
|||
Set Global Variable ${carList} |
|||
|
|||
get-supplier |
|||
Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId} |
|||
log ${reps.json()} |
|||
#获取供应商id和name |
|||
${data} Get From Dictionary ${reps.json()} data |
|||
${value} Evaluate random.choice(${data}) random |
|||
log to console \nvalue: ${value} |
|||
${supplier_id} Get From Dictionary ${value} id #供应商id |
|||
${millSupplierName} Get From Dictionary ${value} name #供应商名称 |
|||
Set Global Variable ${supplier_id} |
|||
Set Global Variable ${millSupplierName} |
|||
|
|||
Submit-appointment |
|||
#${headers} Create Dictionary Content-Type=application/json X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525 |
|||
#提交预约信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} get current date result_format=%Y-%m-%d |
|||
${data} Set Variable {"attention":"${orderId}","buyerReservationDate":"${datatime}", "id":"${id}","millDeliveryOrderId":"${orderId}","millSupplierId":"${supplier_id}","millSupplierName":"${millSupplierName}","proxySellerSettleType":0,"scrapeOrderId":"${orderId}"} |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/customer-service/update/reservation ${data.encode('utf-8')} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
@ -0,0 +1,211 @@ |
|||
*** Settings *** |
|||
Documentation 上传磅单-常规 |
|||
Test Timeout |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
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()} |
|||
${orderItemId} Get From Dictionary ${reps.json()["data"]["records"][0]} orderItemId #订单项编号 |
|||
${bizOwnerName} Get From Dictionary ${reps.json()["data"]["records"][0]} bizOwnerName #业务归属人name |
|||
${bizOwnerId} Get From Dictionary ${reps.json()["data"]["records"][0]} bizOwnerId #业务归属人id |
|||
Set Global Variable ${orderItemId} |
|||
Should Be Equal ${reps.json()["data"]["records"][0]["orderId"]} ${orderId} |
|||
|
|||
get-order-item-details |
|||
#查看订单列表详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
#${data} Set Variable orderId=${orderId} orderItemId=${orderItemId} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #当前订单下单时的合同id |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]} unitSurcharge #代卖费 |
|||
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类ID |
|||
${unitPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类单价 |
|||
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴 |
|||
${millSupplierId} Get From Dictionary ${reps.json()["data"]} millSupplierId #纸厂供应商ID |
|||
${paperMillSupplierName} Get From Dictionary ${reps.json()["data"]} paperMillSupplierName #纸厂供应商名称 |
|||
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
|||
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
|||
${unitSurcharge} Set Variable If '${unitSurcharge}'=='${None}' 0 ${unitSurcharge} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
#${activitySettleType} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} activitySettleType #活动结算方式(0:70%,1:85%,2:全额) |
|||
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 ${activitySettleType} |
|||
|
|||
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} |
|||
|
|||
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-contract-list |
|||
#获取订单纸厂的所有合同信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT /recycle-service/admin/contract/get/selectable-contract-list params=orderItemId=${orderItemId} |
|||
log ${reps.json()} |
|||
|
|||
get-supplier |
|||
#获取纸厂供应商 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId} |
|||
log ${reps.json()} |
|||
|
|||
get-category price |
|||
#获取下单品类,上传磅单时的价格 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${dataTime} Get Current Date result_format=%Y-%m-%d |
|||
${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get-category-price-by-date params=orderItemId=${orderItemId}&weightDay=${dataTime} |
|||
log ${reps.json()} |
|||
${price} Get From Dictionary ${reps.json()["data"][0]} price #下单品类价格 |
|||
${publicSubsidies} Get From Dictionary ${reps.json()["data"][0]} publicSubsidies #下单品类公开补贴 |
|||
Set Global Variable ${price} |
|||
Set Global Variable ${publicSubsidies} |
|||
Set Global Variable ${dataTime} |
|||
|
|||
get_paper-mill-category |
|||
#获取当前纸厂的所有纸品品类 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-category/${paperMillId} params=id=${paperMillId} |
|||
log ${reps.json()} |
|||
|
|||
get_contract_by_id |
|||
#获取下单时绑定的合同 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/contract/get/detail-by-id params=id=${contractId} |
|||
log ${reps.json()} |
|||
#获取垫资费、企业ID、应收金额结算规则、含税结算单价结算规则 |
|||
${advanceFund} Get From Dictionary ${reps.json()["data"]} advanceFund #垫资费 |
|||
${buyerEnterpriseId} Get From Dictionary ${reps.json()["data"]} buyerEnterpriseId #企业id |
|||
${settleRules} Get From Dictionary ${reps.json()["data"]} settleRules #应收金额结算规则 |
|||
${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则 |
|||
${taxRefundRate} Get From Dictionary ${reps.json()["data"]} taxRefundRate #税点 |
|||
${proxyPaySurcharge} Get From Dictionary ${reps.json()["data"]} proxyPaySurcharge #代收费 |
|||
${hasInvoice} Get From Dictionary ${reps.json()["data"]} hasInvoice #是否开票 |
|||
${accountPeriodType} Get From Dictionary ${reps.json()["data"]} accountPeriodType #账期类型 |
|||
${isSubsidyAndDeductIncludeTax} Get From Dictionary ${reps.json()["data"]} isSubsidyAndDeductIncludeTax #纸厂补贴是否含税 |
|||
${receivableSettlementRules} Get From Dictionary ${reps.json()["data"]} settleRules #应收金额结算规则 |
|||
${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则 |
|||
${advanceFund} Set Variable If '${advanceFund}'=='${None}' 0 ${advanceFund} |
|||
${proxyPaySurcharge} Set Variable If '${proxyPaySurcharge}'=='${None}' 0 ${proxyPaySurcharge} |
|||
${taxRefundRate} Set Variable If '${taxRefundRate}'=='${None}' 0 ${taxRefundRate} |
|||
Set Global Variable ${advanceFund} |
|||
Set Global Variable ${buyerEnterpriseId} |
|||
Set Global Variable ${taxRefundRate} |
|||
Set Global Variable ${proxyPaySurcharge} |
|||
Set Global Variable ${hasInvoice} |
|||
Set Global Variable ${accountPeriodType} |
|||
Set Global Variable ${settleRules} |
|||
Set Global Variable ${settlePriceIncludeTaxSettleRules} |
|||
Set Global Variable ${isSubsidyAndDeductIncludeTax} |
|||
Set Global Variable ${receivableSettlementRules} |
|||
Set Global Variable ${settlePriceIncludeTaxSettleRules} |
|||
|
|||
Upload_pictures |
|||
#上传图片 |
|||
#${dict} Create Dictionary Content-Type=image/jpeg filename=20210803.jpg |
|||
#Create Session ZTBT ${URL} ${dict} |
|||
${filepath} Evaluate open('./21042217001449712.png','rb') |
|||
${image} Evaluate open('./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} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/repeat/proxy-order params=orderItemId=${orderItemId}&plateNumber=${carList}&settleWeight=17550&weighingDate=${datatime}&orderType=${orderType}&settlePrice= 41953.05 |
|||
${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}" \ \ \ \ ], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "settleUtiPriceIncludeTax":2.04012, \ \ \ \ "settleUtiPriceIncludeTaxType":1, \ \ \ \ "receivableAdjustMoney":"100", \ \ \ \ "refundSubsidy":0.002, \ \ \ \ "adjustMoney":"0", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "plateNumber":"${carList}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "netWeight":300, \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "isSubsidyAndDeductIncludeTax":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleWeight":230, \ \ \ \ "deductedWeight":2, \ \ \ \ "orderType":"${orderType}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"freightSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"contrabandPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ] } |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/save/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,144 @@ |
|||
*** Settings *** |
|||
Documentation 运营审核-常规 |
|||
Test Timeout |
|||
Library DateTime |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
Resource 提交磅单.txt |
|||
Resource 运营审核驳回.txt |
|||
Resource 台账查询.txt |
|||
|
|||
*** 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 #结算重量 |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]} status |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${audit_status} |
|||
|
|||
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":"${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 |
|||
|
|||
重复执行驳回上传磅单 |
|||
#重复执行上传磅单、运营驳回操作 |
|||
FOR ${items} IN RANGE 2 |
|||
Run Keyword get_operation_list |
|||
Run Keyword get_order-receipt-audit-details |
|||
Run Keyword If '${audit_status}'=='0' Run Keyword 运营审核驳回 |
|||
sleep 1 |
|||
Run Keyword 获取磅单详情 |
|||
Run Keyword If '${status}'=='51' weightnote |
|||
Run Keyword audit_weightnote |
|||
Run Keyword 获取上传磅单后的订单详情 |
|||
Run Keyword 台账查询 |
|||
END |
|||
|
|||
get_operation_list1 |
|||
#获取运营审核列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
get_order-receipt-audit-details1 |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
log ${reps.json()} |
|||
${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id |
|||
${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期 |
|||
${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
order-receipt-audit-details1 |
|||
#b保存磅单信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d #获取当前时间 |
|||
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
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,21 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
台账查询 |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
#Set Global Variable ${台账列表数据} |
|||
Should Be Equal As Numbers ${netWeight} ${reps.json()["data"]["records"][0]["netWeight"]} |
|||
Should Be Equal As Numbers ${unitSurcharge} ${reps.json()["data"]["records"][0]["unitSurcharge"]} |
|||
Should Be Equal As Numbers ${settleWeight} ${reps.json()["data"]["records"][0]["settleWeight"]} |
|||
Should Be Equal As Numbers ${settleUnitPrice} ${reps.json()["data"]["records"][0]["settleUtiPrice"]} |
|||
Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]} |
|||
Should Be Equal As Numbers ${adjustMoney} ${reps.json()["data"]["records"][0]["adjustMoney"]} |
|||
@ -0,0 +1,172 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
获取磅单详情 |
|||
#查看订单列表详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
#${data} Set Variable orderId=${orderId} orderItemId=${orderItemId} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #当前订单下单时的合同id |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #代卖费 |
|||
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类ID |
|||
${unitPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类单价 |
|||
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴 |
|||
${millSupplierId} Get From Dictionary ${reps.json()["data"]} millSupplierId #纸厂供应商ID |
|||
${paperMillSupplierName} Get From Dictionary ${reps.json()["data"]} paperMillSupplierName #纸厂供应商名称 |
|||
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
|||
#${settleUtiPrice} Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
|||
${unitSurcharge} Set Variable If '${unitSurcharge}'=='${None}' 0 ${unitSurcharge} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${磅单id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id |
|||
${status} Get From Dictionary ${reps.json()["data"]} status |
|||
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} receivableAdjustMoney #获取应收调节费 |
|||
${adjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} adjustMoney #获取调节费 |
|||
${receivableAdjustMoney} Set Variable If '${receivableAdjustMoney}'=='${None}' 0 ${receivableAdjustMoney} |
|||
${adjustMoney} Set Variable If '${adjustMoney}'=='${None}' 0 ${adjustMoney} |
|||
${settleUtiPrice} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleUtiPrice #获取结算单价 |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleWeight #获取结算重量 |
|||
${netWeight1} Evaluate ${netWeight}+30 |
|||
FOR ${净重index} IN RANGE ${netWeight} 30 |
|||
Exit For Loop If '${净重index}'=='${netWeight1}' |
|||
END |
|||
${settleWeight1} Evaluate ${settleWeight}+30 |
|||
FOR ${结算重量index} IN RANGE ${settleWeight} 30 |
|||
Exit For Loop If '${结算重量index}'=='${settleWeight1}' |
|||
END |
|||
${unitSurcharge1} Evaluate ${unitSurcharge}+0.001 |
|||
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100 |
|||
Exit For Loop If '${代卖费index}'=='${unitSurcharge1}' |
|||
END |
|||
${settleUtiPrice1} Evaluate ${settleUtiPrice}+0.1 |
|||
FOR ${结算单价index} IN RANGE ${settleUtiPrice} 100 |
|||
Exit For Loop If '${结算单价index}'=='${settleUtiPrice1}' |
|||
END |
|||
${receivableAdjustMoney1} Evaluate ${receivableAdjustMoney}+10 |
|||
FOR ${应收调节费index} IN RANGE ${receivableAdjustMoney} 500 |
|||
Exit For Loop If '${应收调节费index}'=='${receivableAdjustMoney1}' |
|||
END |
|||
${adjustMoney1} Evaluate ${adjustMoney}+10 |
|||
FOR ${应收调节费index} IN RANGE ${adjustMoney} 500 |
|||
Exit For Loop If '${应收调节费index}'=='${adjustMoney1}' |
|||
END |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${unitSurcharge} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${settleUtiPrice1} |
|||
Set Global Variable ${unitPrice} |
|||
Set Global Variable ${publicSubsidies} |
|||
Set Global Variable ${millSupplierId} |
|||
Set Global Variable ${paperMillSupplierName} |
|||
Set Global Variable ${proxySellerSettleType} |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${netWeight1} |
|||
Set Global Variable ${settleWeight1} |
|||
Set Global Variable ${磅单id} |
|||
Set Global Variable ${status} |
|||
Set Global Variable ${unitSurcharge1} |
|||
Set Global Variable ${adjustMoney1} |
|||
Set Global Variable ${receivableAdjustMoney1} |
|||
|
|||
weightnote |
|||
#驳回后重新提交磅单 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "deductedPoint":0, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "settleUtiPriceIncludeTax":2.04012, \ \ \ \ "settleUtiPriceIncludeTaxType":1, \ \ \ \ "receivableAdjustMoney":"${receivableAdjustMoney1}", \ \ \ \ "refundSubsidy":0.002, \ \ \ \ "adjustMoney":"${adjustMoney1}", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "plateNumber":"${carList}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice1}", \ \ \ \ "netWeight":"${netWeight1}", \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge1}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "isSubsidyAndDeductIncludeTax":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleWeight":"${settleWeight1}", \ \ \ \ "deductedWeight":2, \ \ \ \ "orderType":"${orderType}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"freightSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"contrabandPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "id":"${磅单id}" \ \ \ \ } |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${data.encode('utf-8')} |
|||
log ${reps.json()["data"]} |
|||
${weightNoteId} Get From Dictionary ${reps.json()["data"]} weightNoteId |
|||
Set Global Variable ${weightNoteId} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
获取上传磅单后的订单详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${settleUnitPrice} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleUtiPrice #获取结算单价 |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #获取代卖费 |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleWeight #获取结算重量 |
|||
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} receivableAdjustMoney #获取应收调节费 |
|||
${adjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} adjustMoney #获取调节费 |
|||
Set Global Variable ${settleUnitPrice} |
|||
Set Global Variable ${unitSurcharge} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${receivableAdjustMoney} |
|||
Set Global Variable ${adjustMoney} |
|||
|
|||
获取送货单详情 |
|||
#获取订单详情信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId} &orderItemId=${orderItemId} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${paperMillId} Get From Dictionary ${reps.json()["data"]} paperMillId #纸厂id |
|||
${paperCategoryPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类价格 |
|||
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴 |
|||
${activitySettleType} Get From Dictionary ${reps.json()["data"]} activitySettleType #活动订单结算方式 |
|||
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式 |
|||
${交易主体id} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseId #交易主体id |
|||
${交易主体name} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseName #交易主体name |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]} unitSurcharge #代卖费单价 |
|||
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
|||
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${磅单id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id |
|||
${status} Get From Dictionary ${reps.json()["data"]} status |
|||
${unitSurcharge3} Evaluate ${unitSurcharge}+0.001 |
|||
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100 |
|||
Exit For Loop If '${代卖费index}'=='${unitSurcharge3}' |
|||
END |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${netWeight3} Evaluate ${netWeight}+300 |
|||
FOR ${净重index} IN RANGE ${netWeight} 30 |
|||
Exit For Loop If '${净重index}'=='${netWeight3}' |
|||
END |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${paperMillId} |
|||
Set Global Variable ${paperCategoryPrice} |
|||
Set Global Variable ${publicSubsidies} |
|||
Set Global Variable ${activitySettleType} |
|||
Set Global Variable ${proxySellerSettleType} |
|||
Set Global Variable ${settleUtiPrice} |
|||
Set Global Variable ${交易主体id} |
|||
Set Global Variable ${交易主体name} |
|||
Set Global Variable ${unitSurcharge3} |
|||
Set Global Variable ${netWeight3} |
|||
Set Global Variable ${磅单id} |
|||
Set Global Variable ${status} |
|||
|
|||
上传送货单 |
|||
#上传送货单 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "netWeight":"${netWeight3}", \ \ \ \ "settleWeight":null, \ \ \ \ "unitSurcharge":${unitSurcharge3}, \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "activitySettleType":"${activitySettleType}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "remark":null, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "settlePrice":0, \ \ \ \ "contractId":"${contractId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "orderType":"${orderType}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ ], \ \ \ \ "unitPrice":"${paperCategoryPrice}", \ \ \ \ "id":"${磅单id}" \ \ \ \ \ } |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${data.encode('utf-8')} |
|||
log ${reps.json()} |
|||
${weightNoteId} Get From Dictionary ${reps.json()["data"]} weightNoteId #磅单编号 |
|||
Set Global Variable ${weightNoteId} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
Set Global Variable ${datatime} |
|||
|
|||
获取上传送货单后的订单详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #获取代卖费 |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${unitSurcharge} |
|||
|
|||
audit_weightnote |
|||
Create Session ZTBT ${URL} ${header} |
|||
${repsonse} Post On Session ZTBT recycle-service/admin/customer-service/audit/weightnote/${weightNoteId} |
|||
log ${repsonse.json()} |
|||
@ -0,0 +1,61 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
get_operation_list |
|||
#获取运营审核列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
get_order-receipt-audit-details |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
log ${reps.json()} |
|||
${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id |
|||
${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类id |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期 |
|||
${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
保存磅单信息 |
|||
#b保存磅单信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d #获取当前时间 |
|||
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
运营审核驳回 |
|||
#运营审核驳回 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":2, \ \ \ \ "remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
|||
@ -0,0 +1,54 @@ |
|||
*** Settings *** |
|||
Documentation 代卖应付 |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Resource 财务审核驳回.txt |
|||
Resource 运营审核通过.txt |
|||
Resource 台账查询.txt |
|||
|
|||
*** 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 #财务第一次确认结算时间 |
|||
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 |
|||
|
|||
重复执行财务审核驳回何运营审核通过 |
|||
#重复执行财务审核驳回何运营审核通过操作 |
|||
FOR ${index} IN RANGE 5 |
|||
Run Keyword 获取财务审核列表 |
|||
Run Keyword If '${staus}'=='0' 财务驳回 |
|||
Run Keyword get_operation_list |
|||
Run Keyword get_order-receipt-audit-details |
|||
Run Keyword order-receipt-audit-details |
|||
Run Keyword If '${audit_status}'=='0' 运营审核通过 |
|||
Run Keyword 运营审核后详情 |
|||
Run Keyword 台账查询 |
|||
END |
|||
|
|||
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,36 @@ |
|||
*** 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 |
|||
#${receivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePrice #获取应收金额 |
|||
${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收金额 |
|||
#Set Global Variable ${receivablePrice} |
|||
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 |
|||
sleep 1 |
|||
@ -0,0 +1,20 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
台账查询 |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
#Set Global Variable ${台账列表数据} |
|||
#${receivableAdjustMoney1} Get From Dictionary ${reps.json()["data"]["records"][0]} receivableAdjustMoney #获取应收调节费 |
|||
#${receivableAdjustMoney1} Set Variable If '${receivableAdjustMoney}'=='None' Should Not Be Equal As Numbers ${receivableAdjustMoney} ${receivableAdjustMoney1} |
|||
#Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]} #对比应收调节费 |
|||
Should Be Equal As Numbers ${noReceivablePrice} ${reps.json()["data"]["records"][0]["noReceivablePrice"]} #对比未收款金额 |
|||
Should Be Equal As Strings ${paperMillPayAt} ${reps.json()["data"]["records"][0]["paperMillPayAt"]} #对比预计回款日期 |
|||
@ -0,0 +1,30 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library DateTime |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${url} http://api-ops-psc-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
获取财务审核列表 |
|||
#获取财务审核列表 |
|||
Create Session ZTBT ${url} ${header} |
|||
${reps} Get On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/get/list params=pageNum=1&pageSize=10&status=&orderId=&orderItemId=${orderItemId} |
|||
#${auditedTime} Get From Dictionary ${reps.json()["data"]["records"][0]} auditedTime #财务第一次确认结算时间 |
|||
${staus} Get From Dictionary ${reps.json()["data"]["records"][0]} status #获取审核状态 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
#Set Global Variable ${auditedTime} |
|||
Set Global Variable ${staus} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
财务驳回 |
|||
#财务审核驳回 |
|||
Create Session ZTBT ${url} ${header} |
|||
${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":2,"remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')} |
|||
log ${reps.json()} |
|||
sleep 1 |
|||
@ -0,0 +1,72 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
get_operation_list |
|||
#获取运营审核列表 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
get_order-receipt-audit-details |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
log ${reps.json()} |
|||
${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id |
|||
${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期 |
|||
${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
order-receipt-audit-details |
|||
#b保存磅单信息 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
运营审核通过 |
|||
#运营审核通过 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
|||
|
|||
运营审核后详情 |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收款金额 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #获取计划回款日期 |
|||
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["items"][0]} receivableAdjustMoney #获取应收调节费 |
|||
#${noReceivablePrice} Evaluate ${noReceivablePrice}+1 |
|||
Set Global Variable ${noReceivablePrice} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${receivableAdjustMoney} |
|||
@ -0,0 +1,37 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Library urllib3 |
|||
Library DatabaseLibrary |
|||
|
|||
*** Variables *** |
|||
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'} |
|||
${url} http://api-client-ztb-test.qniao.cn |
|||
|
|||
*** Test Cases *** |
|||
userlogin |
|||
[Setup] |
|||
#验证码登录 |
|||
Disable Warnings |
|||
Create Session ZTBT https://api-client-uec-test.qniao.cn ${header} |
|||
${data} Create Dictionary account=18888888888 captcha=888888 accountType=2 |
|||
${account} Set Variable 18888888888 |
|||
#${data} Set Variable {"accountType":2,"account":"${account}","captcha":888888} |
|||
${respones} POST On Session ZTBT uec/authorize/by-captcha json=${data} |
|||
log ${respones.status_code} |
|||
log ${respones.json()} |
|||
${token} Get From Dictionary ${respones.json()["data"]} token |
|||
Set Global Variable ${token} |
|||
Set Global Variable ${account} |
|||
[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} |
|||
@ -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}'=='Ceshi_factory--一次' |
|||
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,2 @@ |
|||
*** Settings *** |
|||
Test Setup |
|||
@ -0,0 +1,21 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
|
|||
*** Test Cases *** |
|||
pwlogin |
|||
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded X-APP-ID=470236309865238555 |
|||
Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header} |
|||
&{data} Create Dictionary username=laiyonglan@qniao.cn password=qn123456 |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/login data=${data} |
|||
log ${reps.json()} |
|||
${gettoken} Set Variable Token 6b08add42d6bcf73abb935b2adf83525 |
|||
Should Be Equal As Strings ${reps.json()["message"]} 登陆成功 |
|||
Set Global Variable ${gettoken} |
|||
|
|||
login-info |
|||
${header} Create Dictionary X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525 |
|||
Create Session login-info http://api-ops-ztb-test.qniao.cn ${header} |
|||
${reps_data} Get On Session login-info recycle-service/admin/employee/get/login-info |
|||
log ${reps_data} |
|||
Should Be Equal As Strings ${reps_data.json()["message"]} successful |
|||
@ -0,0 +1,57 @@ |
|||
*** 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_paper-mill-order-reservation-list |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps_data} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-order-reservation-list params=pageNum=1&pageSize=10&status=&orderId=${orderId} |
|||
log ${reps_data.json()} |
|||
#获取订单编号${orderId}、纸厂id${paperMillId}、订单类型${orderType} |
|||
${orderId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderId #订单编号 |
|||
${paperMillId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillId #纸厂id |
|||
${id} Get From Dictionary ${reps_data.json()["data"]["records"][0]} id #预约id |
|||
${orderType} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderType #订单类型 |
|||
${carNoList} Get From Dictionary ${reps_data.json()["data"]["records"][0]} carNoList #车辆信息列表 |
|||
${paperMillName} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillName #纸厂名称 |
|||
${sellerReservationDate} Get From Dictionary ${reps_data.json()["data"]["records"][0]} sellerReservationDate #送货时间 |
|||
#随机获取车辆信息 |
|||
${carList} Evaluate random.choice(${carNoList}) random |
|||
log to console \nvalue:${carList} |
|||
Should Be Equal As Strings ${reps_data.json()["message"]} successful |
|||
Set Global Variable ${orderId} |
|||
Set Global Variable ${paperMillId} |
|||
Set Global Variable ${id} |
|||
Set Global Variable ${paperMillName} |
|||
Set Global Variable ${sellerReservationDate} |
|||
Set Global Variable ${orderType} |
|||
Set Global Variable ${carList} |
|||
|
|||
get-supplier |
|||
Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId} |
|||
log ${reps.json()} |
|||
#获取供应商id和name |
|||
${data} Get From Dictionary ${reps.json()} data |
|||
${value} Evaluate random.choice(${data}) random |
|||
log to console \nvalue: ${value} |
|||
${supplier_id} Get From Dictionary ${value} id #供应商id |
|||
${millSupplierName} Get From Dictionary ${value} name #供应商名称 |
|||
Set Global Variable ${supplier_id} |
|||
Set Global Variable ${millSupplierName} |
|||
|
|||
Submit-appointment |
|||
#${headers} Create Dictionary Content-Type=application/json X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525 |
|||
#提交预约信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} get current date result_format=%Y-%m-%d |
|||
${data} Set Variable {"attention":"${orderId}","buyerReservationDate":"${datatime}", "id":"${id}","millDeliveryOrderId":"${orderId}","millSupplierId":"${supplier_id}","millSupplierName":"${millSupplierName}","proxySellerSettleType":0,"scrapeOrderId":"${orderId}"} |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/customer-service/update/reservation ${data.encode('utf-8')} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
@ -0,0 +1,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('./16pic_6879381_b.jpg','rb') |
|||
${image} Evaluate open('./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":20000, \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "nonStandardPenalty_car":"", \ \ \ \ "settleWeight":10000, \ \ \ \ "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,80 @@ |
|||
*** 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 #结算重量 |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${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,21 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
台账查询 |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
#Set Global Variable ${台账列表数据} |
|||
Should Be Equal As Numbers ${netWeight} ${reps.json()["data"]["records"][0]["netWeight"]} |
|||
Should Be Equal As Numbers ${unitSurcharge} ${reps.json()["data"]["records"][0]["unitSurcharge"]} |
|||
Should Be Equal As Numbers ${settleWeight} ${reps.json()["data"]["records"][0]["settleWeight"]} |
|||
Should Be Equal As Numbers ${settleUnitPrice} ${reps.json()["data"]["records"][0]["settleUtiPrice"]} |
|||
Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]} |
|||
Should Be Equal As Numbers ${adjustMoney} ${reps.json()["data"]["records"][0]["adjustMoney"]} |
|||
@ -0,0 +1,172 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
获取磅单详情 |
|||
#查看订单列表详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
#${data} Set Variable orderId=${orderId} orderItemId=${orderItemId} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #当前订单下单时的合同id |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #代卖费 |
|||
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类ID |
|||
${unitPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类单价 |
|||
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴 |
|||
${millSupplierId} Get From Dictionary ${reps.json()["data"]} millSupplierId #纸厂供应商ID |
|||
${paperMillSupplierName} Get From Dictionary ${reps.json()["data"]} paperMillSupplierName #纸厂供应商名称 |
|||
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
|||
#${settleUtiPrice} Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
|||
${unitSurcharge} Set Variable If '${unitSurcharge}'=='${None}' 0 ${unitSurcharge} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${磅单id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id |
|||
${status} Get From Dictionary ${reps.json()["data"]} status |
|||
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} receivableAdjustMoney #获取应收调节费 |
|||
${adjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} adjustMoney #获取调节费 |
|||
${receivableAdjustMoney} Set Variable If '${receivableAdjustMoney}'=='${None}' 0 ${receivableAdjustMoney} |
|||
${adjustMoney} Set Variable If '${adjustMoney}'=='${None}' 0 ${adjustMoney} |
|||
${settleUtiPrice} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleUtiPrice #获取结算单价 |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleWeight #获取结算重量 |
|||
${netWeight1} Evaluate ${netWeight}+30 |
|||
FOR ${净重index} IN RANGE ${netWeight} 30 |
|||
Exit For Loop If '${净重index}'=='${netWeight1}' |
|||
END |
|||
${settleWeight1} Evaluate ${settleWeight}+30 |
|||
FOR ${结算重量index} IN RANGE ${settleWeight} 30 |
|||
Exit For Loop If '${结算重量index}'=='${settleWeight1}' |
|||
END |
|||
${unitSurcharge1} Evaluate ${unitSurcharge}+0.001 |
|||
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100 |
|||
Exit For Loop If '${代卖费index}'=='${unitSurcharge1}' |
|||
END |
|||
${settleUtiPrice1} Evaluate ${settleUtiPrice}+0.1 |
|||
FOR ${结算单价index} IN RANGE ${settleUtiPrice} 100 |
|||
Exit For Loop If '${结算单价index}'=='${settleUtiPrice1}' |
|||
END |
|||
${receivableAdjustMoney1} Evaluate ${receivableAdjustMoney}+10 |
|||
FOR ${应收调节费index} IN RANGE ${receivableAdjustMoney} 500 |
|||
Exit For Loop If '${应收调节费index}'=='${receivableAdjustMoney1}' |
|||
END |
|||
${adjustMoney1} Evaluate ${adjustMoney}+10 |
|||
FOR ${应收调节费index} IN RANGE ${adjustMoney} 500 |
|||
Exit For Loop If '${应收调节费index}'=='${adjustMoney1}' |
|||
END |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${unitSurcharge} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${settleUtiPrice1} |
|||
Set Global Variable ${unitPrice} |
|||
Set Global Variable ${publicSubsidies} |
|||
Set Global Variable ${millSupplierId} |
|||
Set Global Variable ${paperMillSupplierName} |
|||
Set Global Variable ${proxySellerSettleType} |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${netWeight1} |
|||
Set Global Variable ${settleWeight1} |
|||
Set Global Variable ${磅单id} |
|||
Set Global Variable ${status} |
|||
Set Global Variable ${unitSurcharge1} |
|||
Set Global Variable ${adjustMoney1} |
|||
Set Global Variable ${receivableAdjustMoney1} |
|||
|
|||
weightnote |
|||
#驳回后重新提交磅单 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "deductedPoint":0, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "settleUtiPriceIncludeTax":2.04012, \ \ \ \ "settleUtiPriceIncludeTaxType":1, \ \ \ \ "receivableAdjustMoney":"${receivableAdjustMoney1}", \ \ \ \ "refundSubsidy":0.002, \ \ \ \ "adjustMoney":"${adjustMoney1}", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "plateNumber":"${carList}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice1}", \ \ \ \ "netWeight":"${netWeight1}", \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge1}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "isSubsidyAndDeductIncludeTax":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleWeight":"${settleWeight1}", \ \ \ \ "deductedWeight":2, \ \ \ \ "orderType":"${orderType}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"freightSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"contrabandPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "id":"${磅单id}" \ \ \ \ } |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${data.encode('utf-8')} |
|||
log ${reps.json()["data"]} |
|||
${weightNoteId} Get From Dictionary ${reps.json()["data"]} weightNoteId |
|||
Set Global Variable ${weightNoteId} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
获取上传磅单后的订单详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${settleUnitPrice} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleUtiPrice #获取结算单价 |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #获取代卖费 |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleWeight #获取结算重量 |
|||
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} receivableAdjustMoney #获取应收调节费 |
|||
${adjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} adjustMoney #获取调节费 |
|||
Set Global Variable ${settleUnitPrice} |
|||
Set Global Variable ${unitSurcharge} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${receivableAdjustMoney} |
|||
Set Global Variable ${adjustMoney} |
|||
|
|||
获取送货单详情 |
|||
#获取订单详情信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId} &orderItemId=${orderItemId} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${paperMillId} Get From Dictionary ${reps.json()["data"]} paperMillId #纸厂id |
|||
${paperCategoryPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类价格 |
|||
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴 |
|||
${activitySettleType} Get From Dictionary ${reps.json()["data"]} activitySettleType #活动订单结算方式 |
|||
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式 |
|||
${交易主体id} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseId #交易主体id |
|||
${交易主体name} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseName #交易主体name |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]} unitSurcharge #代卖费单价 |
|||
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
|||
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${磅单id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id |
|||
${status} Get From Dictionary ${reps.json()["data"]} status |
|||
${unitSurcharge3} Evaluate ${unitSurcharge}+0.001 |
|||
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100 |
|||
Exit For Loop If '${代卖费index}'=='${unitSurcharge3}' |
|||
END |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${netWeight3} Evaluate ${netWeight}+300 |
|||
FOR ${净重index} IN RANGE ${netWeight} 30 |
|||
Exit For Loop If '${净重index}'=='${netWeight3}' |
|||
END |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${paperMillId} |
|||
Set Global Variable ${paperCategoryPrice} |
|||
Set Global Variable ${publicSubsidies} |
|||
Set Global Variable ${activitySettleType} |
|||
Set Global Variable ${proxySellerSettleType} |
|||
Set Global Variable ${settleUtiPrice} |
|||
Set Global Variable ${交易主体id} |
|||
Set Global Variable ${交易主体name} |
|||
Set Global Variable ${unitSurcharge3} |
|||
Set Global Variable ${netWeight3} |
|||
Set Global Variable ${磅单id} |
|||
Set Global Variable ${status} |
|||
|
|||
上传送货单 |
|||
#上传送货单 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "netWeight":"${netWeight3}", \ \ \ \ "settleWeight":null, \ \ \ \ "unitSurcharge":${unitSurcharge3}, \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "activitySettleType":"${activitySettleType}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "remark":null, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "settlePrice":0, \ \ \ \ "contractId":"${contractId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "orderType":"${orderType}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ ], \ \ \ \ "unitPrice":"${paperCategoryPrice}", \ \ \ \ "id":"${磅单id}" \ \ \ \ \ } |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${data.encode('utf-8')} |
|||
log ${reps.json()} |
|||
${weightNoteId} Get From Dictionary ${reps.json()["data"]} weightNoteId #磅单编号 |
|||
Set Global Variable ${weightNoteId} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
Set Global Variable ${datatime} |
|||
|
|||
获取上传送货单后的订单详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #获取代卖费 |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${unitSurcharge} |
|||
|
|||
audit_weightnote |
|||
Create Session ZTBT ${URL} ${header} |
|||
${repsonse} Post On Session ZTBT recycle-service/admin/customer-service/audit/weightnote/${weightNoteId} |
|||
log ${repsonse.json()} |
|||
@ -0,0 +1,61 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
get_operation_list |
|||
#获取运营审核列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
get_order-receipt-audit-details |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
log ${reps.json()} |
|||
${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id |
|||
${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类id |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期 |
|||
${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
保存磅单信息 |
|||
#b保存磅单信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d #获取当前时间 |
|||
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
运营审核驳回 |
|||
#运营审核驳回 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":2, \ \ \ \ "remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
|||
@ -0,0 +1,41 @@ |
|||
*** Settings *** |
|||
Documentation 代卖应付 |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Resource 财务审核驳回.txt |
|||
Resource 运营审核通过.txt |
|||
Resource 台账查询.txt |
|||
|
|||
*** 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 #财务第一次确认结算时间 |
|||
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,36 @@ |
|||
*** 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 |
|||
#${receivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePrice #获取应收金额 |
|||
${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收金额 |
|||
#Set Global Variable ${receivablePrice} |
|||
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 |
|||
sleep 1 |
|||
@ -0,0 +1,20 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
台账查询 |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
#Set Global Variable ${台账列表数据} |
|||
#${receivableAdjustMoney1} Get From Dictionary ${reps.json()["data"]["records"][0]} receivableAdjustMoney #获取应收调节费 |
|||
#${receivableAdjustMoney1} Set Variable If '${receivableAdjustMoney}'=='None' Should Not Be Equal As Numbers ${receivableAdjustMoney} ${receivableAdjustMoney1} |
|||
#Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]} #对比应收调节费 |
|||
Should Be Equal As Numbers ${noReceivablePrice} ${reps.json()["data"]["records"][0]["noReceivablePrice"]} #对比未收款金额 |
|||
Should Be Equal As Strings ${paperMillPayAt} ${reps.json()["data"]["records"][0]["paperMillPayAt"]} #对比预计回款日期 |
|||
@ -0,0 +1,30 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library DateTime |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${url} http://api-ops-psc-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
获取财务审核列表 |
|||
#获取财务审核列表 |
|||
Create Session ZTBT ${url} ${header} |
|||
${reps} Get On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/get/list params=pageNum=1&pageSize=10&status=&orderId=&orderItemId=${orderItemId} |
|||
#${auditedTime} Get From Dictionary ${reps.json()["data"]["records"][0]} auditedTime #财务第一次确认结算时间 |
|||
${staus} Get From Dictionary ${reps.json()["data"]["records"][0]} status #获取审核状态 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
#Set Global Variable ${auditedTime} |
|||
Set Global Variable ${staus} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
财务驳回 |
|||
#财务审核驳回 |
|||
Create Session ZTBT ${url} ${header} |
|||
${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":2,"remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')} |
|||
log ${reps.json()} |
|||
sleep 1 |
|||
@ -0,0 +1,72 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
get_operation_list |
|||
#获取运营审核列表 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
get_order-receipt-audit-details |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
log ${reps.json()} |
|||
${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id |
|||
${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期 |
|||
${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
order-receipt-audit-details |
|||
#b保存磅单信息 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
运营审核通过 |
|||
#运营审核通过 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
|||
|
|||
运营审核后详情 |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收款金额 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #获取计划回款日期 |
|||
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["items"][0]} receivableAdjustMoney #获取应收调节费 |
|||
#${noReceivablePrice} Evaluate ${noReceivablePrice}+1 |
|||
Set Global Variable ${noReceivablePrice} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${receivableAdjustMoney} |
|||
@ -0,0 +1,37 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Library urllib3 |
|||
Library DatabaseLibrary |
|||
|
|||
*** Variables *** |
|||
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'} |
|||
${url} http://api-client-ztb-test.qniao.cn |
|||
|
|||
*** Test Cases *** |
|||
userlogin |
|||
[Setup] |
|||
#验证码登录 |
|||
Disable Warnings |
|||
Create Session ZTBT https://api-client-uec-test.qniao.cn ${header} |
|||
${data} Create Dictionary account=18888888888 captcha=888888 accountType=2 |
|||
${account} Set Variable 18888888888 |
|||
#${data} Set Variable {"accountType":2,"account":"${account}","captcha":888888} |
|||
${respones} POST On Session ZTBT uec/authorize/by-captcha json=${data} |
|||
log ${respones.status_code} |
|||
log ${respones.json()} |
|||
${token} Get From Dictionary ${respones.json()["data"]} token |
|||
Set Global Variable ${token} |
|||
Set Global Variable ${account} |
|||
[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} |
|||
@ -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}'=='Ceshi_factory--两次' |
|||
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,2 @@ |
|||
*** Settings *** |
|||
Test Setup |
|||
@ -0,0 +1,21 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
|
|||
*** Test Cases *** |
|||
pwlogin |
|||
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded X-APP-ID=470236309865238555 |
|||
Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header} |
|||
&{data} Create Dictionary username=laiyonglan@qniao.cn password=qn123456 |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/login data=${data} |
|||
log ${reps.json()} |
|||
${gettoken} Set Variable Token 6b08add42d6bcf73abb935b2adf83525 |
|||
Should Be Equal As Strings ${reps.json()["message"]} 登陆成功 |
|||
Set Global Variable ${gettoken} |
|||
|
|||
login-info |
|||
${header} Create Dictionary X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525 |
|||
Create Session login-info http://api-ops-ztb-test.qniao.cn ${header} |
|||
${reps_data} Get On Session login-info recycle-service/admin/employee/get/login-info |
|||
log ${reps_data} |
|||
Should Be Equal As Strings ${reps_data.json()["message"]} successful |
|||
@ -0,0 +1,57 @@ |
|||
*** 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_paper-mill-order-reservation-list |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps_data} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-order-reservation-list params=pageNum=1&pageSize=10&status=&orderId=${orderId} |
|||
log ${reps_data.json()} |
|||
#获取订单编号${orderId}、纸厂id${paperMillId}、订单类型${orderType} |
|||
${orderId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderId #订单编号 |
|||
${paperMillId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillId #纸厂id |
|||
${id} Get From Dictionary ${reps_data.json()["data"]["records"][0]} id #预约id |
|||
${orderType} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderType #订单类型 |
|||
${carNoList} Get From Dictionary ${reps_data.json()["data"]["records"][0]} carNoList #车辆信息列表 |
|||
${paperMillName} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillName #纸厂名称 |
|||
${sellerReservationDate} Get From Dictionary ${reps_data.json()["data"]["records"][0]} sellerReservationDate #送货时间 |
|||
#随机获取车辆信息 |
|||
${carList} Evaluate random.choice(${carNoList}) random |
|||
log to console \nvalue:${carList} |
|||
Should Be Equal As Strings ${reps_data.json()["message"]} successful |
|||
Set Global Variable ${orderId} |
|||
Set Global Variable ${paperMillId} |
|||
Set Global Variable ${id} |
|||
Set Global Variable ${paperMillName} |
|||
Set Global Variable ${sellerReservationDate} |
|||
Set Global Variable ${orderType} |
|||
Set Global Variable ${carList} |
|||
|
|||
get-supplier |
|||
Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId} |
|||
log ${reps.json()} |
|||
#获取供应商id和name |
|||
${data} Get From Dictionary ${reps.json()} data |
|||
${value} Evaluate random.choice(${data}) random |
|||
log to console \nvalue: ${value} |
|||
${supplier_id} Get From Dictionary ${value} id #供应商id |
|||
${millSupplierName} Get From Dictionary ${value} name #供应商名称 |
|||
Set Global Variable ${supplier_id} |
|||
Set Global Variable ${millSupplierName} |
|||
|
|||
Submit-appointment |
|||
#${headers} Create Dictionary Content-Type=application/json X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525 |
|||
#提交预约信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} get current date result_format=%Y-%m-%d |
|||
${data} Set Variable {"attention":"${orderId}","buyerReservationDate":"${datatime}", "id":"${id}","millDeliveryOrderId":"${orderId}","millSupplierId":"${supplier_id}","millSupplierName":"${millSupplierName}","proxySellerSettleType":0,"scrapeOrderId":"${orderId}"} |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/customer-service/update/reservation ${data.encode('utf-8')} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
@ -0,0 +1,190 @@ |
|||
*** 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 #代卖费单价 |
|||
${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} |
|||
Set Global Variable ${unitSurcharge} |
|||
|
|||
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('./20210803.jpg','rb') |
|||
${image} Evaluate open('./20210803.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":15500, \ \ \ \ "settleWeight":null, \ \ \ \ "unitSurcharge":${unitSurcharge}, \ \ \ \ "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,135 @@ |
|||
*** Settings *** |
|||
Documentation 运营审核-两次付款活动 |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Library DateTime |
|||
Resource 提交磅单.txt |
|||
Resource 运营审核驳回.txt |
|||
Resource 台账查询.txt |
|||
|
|||
*** 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 |
|||
|
|||
重复执行驳回和上传磅单操作 |
|||
#重复执行上传磅单、运营驳回操作 |
|||
FOR ${items} IN RANGE 5 |
|||
Run Keyword get_operation_list |
|||
Run Keyword get_order-receipt-audit-details |
|||
Run Keyword If '${audit_status}'=='0' Run Keyword 运营审核驳回 |
|||
sleep 1 |
|||
Run Keyword 获取送货单详情 |
|||
Run Keyword If '${status}'=='51' 上传送货单 |
|||
Run Keyword audit_weightnote |
|||
Run Keyword 获取上传送货单后的订单详情 |
|||
Run Keyword 台账查询 |
|||
END |
|||
|
|||
get_operation_list3 |
|||
#获取运营审核列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
get_order-receipt-audit-details3 |
|||
#查看运营审核详情 |
|||
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-details3 |
|||
#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 |
|||
|
|||
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,21 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
台账查询 |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
#Set Global Variable ${台账列表数据} |
|||
Should Be Equal As Numbers ${netWeight} ${reps.json()["data"]["records"][0]["netWeight"]} |
|||
Should Be Equal As Numbers ${unitSurcharge} ${reps.json()["data"]["records"][0]["unitSurcharge"]} |
|||
#Should Be Equal As Numbers ${settleWeight} ${reps.json()["data"]["records"][0]["settleWeight"]} |
|||
#Should Be Equal As Numbers ${settleUnitPrice} ${reps.json()["data"]["records"][0]["settleUtiPrice"]} |
|||
#Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]} |
|||
#Should Be Equal As Numbers ${adjustMoney} ${reps.json()["data"]["records"][0]["adjustMoney"]} |
|||
@ -0,0 +1,172 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
获取磅单详情 |
|||
#查看订单列表详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
#${data} Set Variable orderId=${orderId} orderItemId=${orderItemId} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #当前订单下单时的合同id |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #代卖费 |
|||
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类ID |
|||
${unitPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类单价 |
|||
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴 |
|||
${millSupplierId} Get From Dictionary ${reps.json()["data"]} millSupplierId #纸厂供应商ID |
|||
${paperMillSupplierName} Get From Dictionary ${reps.json()["data"]} paperMillSupplierName #纸厂供应商名称 |
|||
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
|||
#${settleUtiPrice} Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
|||
${unitSurcharge} Set Variable If '${unitSurcharge}'=='${None}' 0 ${unitSurcharge} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${磅单id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id |
|||
${status} Get From Dictionary ${reps.json()["data"]} status |
|||
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} receivableAdjustMoney #获取应收调节费 |
|||
${adjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} adjustMoney #获取调节费 |
|||
${receivableAdjustMoney} Set Variable If '${receivableAdjustMoney}'=='${None}' 0 ${receivableAdjustMoney} |
|||
${adjustMoney} Set Variable If '${adjustMoney}'=='${None}' 0 ${adjustMoney} |
|||
${settleUtiPrice} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleUtiPrice #获取结算单价 |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleWeight #获取结算重量 |
|||
${netWeight1} Evaluate ${netWeight}+30 |
|||
FOR ${净重index} IN RANGE ${netWeight} 30 |
|||
Exit For Loop If '${净重index}'=='${netWeight1}' |
|||
END |
|||
${settleWeight1} Evaluate ${settleWeight}+30 |
|||
FOR ${结算重量index} IN RANGE ${settleWeight} 30 |
|||
Exit For Loop If '${结算重量index}'=='${settleWeight1}' |
|||
END |
|||
${unitSurcharge1} Evaluate ${unitSurcharge}+0.001 |
|||
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100 |
|||
Exit For Loop If '${代卖费index}'=='${unitSurcharge1}' |
|||
END |
|||
${settleUtiPrice1} Evaluate ${settleUtiPrice}+0.1 |
|||
FOR ${结算单价index} IN RANGE ${settleUtiPrice} 100 |
|||
Exit For Loop If '${结算单价index}'=='${settleUtiPrice1}' |
|||
END |
|||
${receivableAdjustMoney1} Evaluate ${receivableAdjustMoney}+10 |
|||
FOR ${应收调节费index} IN RANGE ${receivableAdjustMoney} 500 |
|||
Exit For Loop If '${应收调节费index}'=='${receivableAdjustMoney1}' |
|||
END |
|||
${adjustMoney1} Evaluate ${adjustMoney}+10 |
|||
FOR ${应收调节费index} IN RANGE ${adjustMoney} 500 |
|||
Exit For Loop If '${应收调节费index}'=='${adjustMoney1}' |
|||
END |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${unitSurcharge} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${settleUtiPrice1} |
|||
Set Global Variable ${unitPrice} |
|||
Set Global Variable ${publicSubsidies} |
|||
Set Global Variable ${millSupplierId} |
|||
Set Global Variable ${paperMillSupplierName} |
|||
Set Global Variable ${proxySellerSettleType} |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${netWeight1} |
|||
Set Global Variable ${settleWeight1} |
|||
Set Global Variable ${磅单id} |
|||
Set Global Variable ${status} |
|||
Set Global Variable ${unitSurcharge1} |
|||
Set Global Variable ${adjustMoney1} |
|||
Set Global Variable ${receivableAdjustMoney1} |
|||
|
|||
weightnote |
|||
#驳回后重新提交磅单 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "deductedPoint":0, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "settleUtiPriceIncludeTax":2.04012, \ \ \ \ "settleUtiPriceIncludeTaxType":1, \ \ \ \ "receivableAdjustMoney":"${receivableAdjustMoney1}", \ \ \ \ "refundSubsidy":0.002, \ \ \ \ "adjustMoney":"${adjustMoney1}", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "plateNumber":"${carList}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice1}", \ \ \ \ "netWeight":"${netWeight1}", \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge1}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "isSubsidyAndDeductIncludeTax":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleWeight":"${settleWeight1}", \ \ \ \ "deductedWeight":2, \ \ \ \ "orderType":"${orderType}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"freightSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"contrabandPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "id":"${磅单id}" \ \ \ \ } |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${data.encode('utf-8')} |
|||
log ${reps.json()["data"]} |
|||
${weightNoteId} Get From Dictionary ${reps.json()["data"]} weightNoteId |
|||
Set Global Variable ${weightNoteId} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
获取上传磅单后的订单详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${settleUnitPrice} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleUtiPrice #获取结算单价 |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #获取代卖费 |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleWeight #获取结算重量 |
|||
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} receivableAdjustMoney #获取应收调节费 |
|||
${adjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} adjustMoney #获取调节费 |
|||
Set Global Variable ${settleUnitPrice} |
|||
Set Global Variable ${unitSurcharge} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${receivableAdjustMoney} |
|||
Set Global Variable ${adjustMoney} |
|||
|
|||
获取送货单详情 |
|||
#获取订单详情信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId} &orderItemId=${orderItemId} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${paperMillId} Get From Dictionary ${reps.json()["data"]} paperMillId #纸厂id |
|||
${paperCategoryPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类价格 |
|||
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴 |
|||
${activitySettleType} Get From Dictionary ${reps.json()["data"]} activitySettleType #活动订单结算方式 |
|||
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式 |
|||
${交易主体id} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseId #交易主体id |
|||
${交易主体name} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseName #交易主体name |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]} unitSurcharge #代卖费单价 |
|||
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
|||
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${磅单id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id |
|||
${status} Get From Dictionary ${reps.json()["data"]} status |
|||
${unitSurcharge3} Evaluate ${unitSurcharge}+0.001 |
|||
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100 |
|||
Exit For Loop If '${代卖费index}'=='${unitSurcharge3}' |
|||
END |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${netWeight3} Evaluate ${netWeight}+300 |
|||
FOR ${净重index} IN RANGE ${netWeight} 30 |
|||
Exit For Loop If '${净重index}'=='${netWeight3}' |
|||
END |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${paperMillId} |
|||
Set Global Variable ${paperCategoryPrice} |
|||
Set Global Variable ${publicSubsidies} |
|||
Set Global Variable ${activitySettleType} |
|||
Set Global Variable ${proxySellerSettleType} |
|||
Set Global Variable ${settleUtiPrice} |
|||
Set Global Variable ${交易主体id} |
|||
Set Global Variable ${交易主体name} |
|||
Set Global Variable ${unitSurcharge3} |
|||
Set Global Variable ${netWeight3} |
|||
Set Global Variable ${磅单id} |
|||
Set Global Variable ${status} |
|||
|
|||
上传送货单 |
|||
#上传送货单 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "netWeight":"${netWeight3}", \ \ \ \ "settleWeight":null, \ \ \ \ "unitSurcharge":${unitSurcharge3}, \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "activitySettleType":"${activitySettleType}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "remark":null, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "settlePrice":0, \ \ \ \ "contractId":"${contractId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "orderType":"${orderType}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ ], \ \ \ \ "unitPrice":"${paperCategoryPrice}", \ \ \ \ "id":"${磅单id}" \ \ \ \ \ } |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${data.encode('utf-8')} |
|||
log ${reps.json()} |
|||
${weightNoteId} Get From Dictionary ${reps.json()["data"]} weightNoteId #磅单编号 |
|||
Set Global Variable ${weightNoteId} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
Set Global Variable ${datatime} |
|||
|
|||
获取上传送货单后的订单详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #获取代卖费 |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${unitSurcharge} |
|||
|
|||
audit_weightnote |
|||
Create Session ZTBT ${URL} ${header} |
|||
${repsonse} Post On Session ZTBT recycle-service/admin/customer-service/audit/weightnote/${weightNoteId} |
|||
log ${repsonse.json()} |
|||
@ -0,0 +1,61 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
get_operation_list |
|||
#获取运营审核列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
get_order-receipt-audit-details |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
log ${reps.json()} |
|||
${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id |
|||
${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类id |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期 |
|||
${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
保存磅单信息 |
|||
#b保存磅单信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d #获取当前时间 |
|||
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
运营审核驳回 |
|||
#运营审核驳回 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":2, \ \ \ \ "remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
|||
@ -0,0 +1,41 @@ |
|||
*** Settings *** |
|||
Documentation 代卖应付 |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Resource 财务审核驳回.txt |
|||
Resource 运营审核通过.txt |
|||
Resource 台账查询.txt |
|||
|
|||
*** 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 #财务第一次确认结算时间 |
|||
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,36 @@ |
|||
*** 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 |
|||
#${receivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePrice #获取应收金额 |
|||
${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收金额 |
|||
#Set Global Variable ${receivablePrice} |
|||
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 |
|||
sleep 5 |
|||
@ -0,0 +1,20 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
台账查询 |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
#Set Global Variable ${台账列表数据} |
|||
#${receivableAdjustMoney1} Get From Dictionary ${reps.json()["data"]["records"][0]} receivableAdjustMoney #获取应收调节费 |
|||
#${receivableAdjustMoney1} Set Variable If '${receivableAdjustMoney}'=='None' Should Not Be Equal As Numbers ${receivableAdjustMoney} ${receivableAdjustMoney1} |
|||
#Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]} #对比应收调节费 |
|||
Should Be Equal As Numbers ${noReceivablePrice} ${reps.json()["data"]["records"][0]["noReceivablePrice"]} #对比未收款金额 |
|||
Should Be Equal As Strings ${paperMillPayAt} ${reps.json()["data"]["records"][0]["paperMillPayAt"]} #对比预计回款日期 |
|||
@ -0,0 +1,30 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library DateTime |
|||
Library RequestsLibrary |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${url} http://api-ops-psc-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
获取财务审核列表 |
|||
#获取财务审核列表 |
|||
Create Session ZTBT ${url} ${header} |
|||
${reps} Get On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/get/list params=pageNum=1&pageSize=10&status=&orderId=&orderItemId=${orderItemId} |
|||
#${auditedTime} Get From Dictionary ${reps.json()["data"]["records"][0]} auditedTime #财务第一次确认结算时间 |
|||
${staus} Get From Dictionary ${reps.json()["data"]["records"][0]} status #获取审核状态 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
#Set Global Variable ${auditedTime} |
|||
Set Global Variable ${staus} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
财务驳回 |
|||
#财务审核驳回 |
|||
Create Session ZTBT ${url} ${header} |
|||
${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":2,"remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')} |
|||
log ${reps.json()} |
|||
sleep 1 |
|||
@ -0,0 +1,72 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL1} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
get_operation_list |
|||
#获取运营审核列表 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
get_order-receipt-audit-details |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
log ${reps.json()} |
|||
${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id |
|||
${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期 |
|||
${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
order-receipt-audit-details |
|||
#b保存磅单信息 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
运营审核通过 |
|||
#运营审核通过 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
|||
|
|||
运营审核后详情 |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收款金额 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #获取计划回款日期 |
|||
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["items"][0]} receivableAdjustMoney #获取应收调节费 |
|||
#${noReceivablePrice} Evaluate ${noReceivablePrice}+1 |
|||
Set Global Variable ${noReceivablePrice} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${receivableAdjustMoney} |
|||
@ -0,0 +1,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":16200, \ \ \ \ "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,81 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library Collections |
|||
Library DateTime |
|||
Resource 更新磅单.txt |
|||
Resource 运营审核驳回.txt |
|||
Resource 台账查询.txt |
|||
|
|||
*** 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 #净重 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量 |
|||
${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} #纸厂账期 |
|||
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} |
|||
Set Global Variable ${settleWeight} |
|||
|
|||
order-receipt-audit-details |
|||
#b保存磅单信息 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":null, \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "receivablePrice":5550, \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "settleUnitPriceIncludeTax":1.337449, \ \ \ \ "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 2 |
|||
@ -0,0 +1,36 @@ |
|||
*** Settings *** |
|||
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} |
|||
log ${reps.json()} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
get_order-log-detail |
|||
#财务审核驳回操作记录 |
|||
Create Session ZTBT ${URL1} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId}&operationStatus=3 |
|||
|
|||
paper-mill-order-receipt-proof-request_audit |
|||
#财务审核确认通过 |
|||
Create Session ZTBT ${url} ${header} |
|||
${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":1,"remark":"${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 2 |
|||
@ -0,0 +1,34 @@ |
|||
*** 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 #获取应收金额 |
|||
#${receivablePrice} Get From Dictionary ${reps.json()["data"]["records"][0]} receivablePrice |
|||
${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,11 @@ |
|||
*** Settings *** |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
|
|||
*** Keywords *** |
|||
台账查询 |
|||
#获取台账列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} |
|||
${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 |
|||
#Set Global Variable ${台账列表数据} |
|||
@ -0,0 +1,84 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
获取磅单详情 |
|||
#查看订单详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId} |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #当前订单下单时的合同id |
|||
${unitSurcharge} Get From Dictionary ${reps.json()["data"]} unitSurcharge #代卖费 |
|||
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类ID |
|||
${unitPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类单价 |
|||
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴 |
|||
${millSupplierId} Get From Dictionary ${reps.json()["data"]} millSupplierId #纸厂供应商ID |
|||
${paperMillSupplierName} Get From Dictionary ${reps.json()["data"]} paperMillSupplierName #纸厂供应商名称 |
|||
${surcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} surcharge #代卖费总额 |
|||
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id |
|||
${paymentType} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} paymentType #支付类型 |
|||
${activityNoteStatus} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} activityNoteStatus #活动状态 |
|||
${交易主体id} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseId #交易主体id |
|||
${交易主体name} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseName #交易主体name |
|||
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies} |
|||
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价 |
|||
${unitSurcharge} Set Variable If '${unitSurcharge}'=='${None}' 0 ${unitSurcharge} |
|||
${id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id |
|||
${status} Get From Dictionary ${reps.json()["data"]} status |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleWeight #获取结算重量 |
|||
${netWeight1} Evaluate ${netWeight}+100 |
|||
FOR ${净重index} IN RANGE ${netWeight} 30 |
|||
Exit For Loop If '${净重index}'=='${netWeight1}' |
|||
END |
|||
${settleWeight1} Evaluate ${settleWeight}+100 |
|||
FOR ${结算重量index} IN RANGE ${settleWeight} 30 |
|||
Exit For Loop If '${结算重量index}'=='${settleWeight1}' |
|||
END |
|||
${unitSurcharge1} Evaluate ${unitSurcharge}+0.01 |
|||
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100 |
|||
Exit For Loop If '${代卖费index}'=='${unitSurcharge1}' |
|||
END |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${unitSurcharge} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${settleUtiPrice} |
|||
Set Global Variable ${unitPrice} |
|||
Set Global Variable ${publicSubsidies} |
|||
Set Global Variable ${millSupplierId} |
|||
Set Global Variable ${paperMillSupplierName} |
|||
Set Global Variable ${proxySellerSettleType} |
|||
Set Global Variable ${contractId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${paymentType} |
|||
Set Global Variable ${activityNoteStatus} |
|||
Set Global Variable ${交易主体name} |
|||
Set Global Variable ${交易主体id} |
|||
Set Global Variable ${netWeight1} |
|||
Set Global Variable ${settleWeight1} |
|||
Set Global Variable ${id} |
|||
Set Global Variable ${status} |
|||
Set Global Variable ${unitSurcharge1} |
|||
|
|||
weightnote |
|||
#驳回后重新提交磅单 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "id":"${weightNoteId}", \ \ \ \ "orderId":"${orderId}", \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "type":null, \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "settleWeight":13500, \ \ \ \ "deductedPoint":7.5, \ \ \ \ "unitSurcharge":"${unitSurcharge}", \ \ \ \ "surcharge":"${surcharge}", \ \ \ \ "adjustMoney":"20", \ \ \ \ "remark":"${datatime}", \ \ \ \ "imageUrls":null, \ \ \ \ "transactionMainEnterpriseid":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "settlePrice":22585.5, \ \ \ \ "activitySettleType":"${activitySettleType}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "remarkImgs":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "otherAmountList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"freightSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.002, \ \ \ \ \ \ \ \ \ \ \ \ "title":"contrabandPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":2, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":20, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":2, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":10, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "refundSubsidy":0.003, \ \ \ \ "receivableAdjustMoney":"20", \ \ \ \ "settleUtiPriceIncludeTax":1.337448648648649, \ \ \ \ "settleUtiPriceIncludeTaxType":"${settleUtiPriceIncludeTaxType}", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "deductedWeight":1.5, \ \ \ \ "orderType":"${orderType}" } |
|||
log ${data} |
|||
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${data.encode('utf-8')} |
|||
log ${reps.json()["data"]} |
|||
${weightNoteId} Get From Dictionary ${reps.json()["data"]} weightNoteId |
|||
Set Global Variable ${weightNoteId} |
|||
Should Be Equal As Strings ${reps.json()["message"]} successful |
|||
|
|||
audit_weightnote |
|||
Create Session ZTBT ${URL} ${header} |
|||
${repsonse} Post On Session ZTBT recycle-service/admin/customer-service/audit/weightnote/${weightNoteId} |
|||
log ${repsonse.json()} |
|||
@ -0,0 +1,53 @@ |
|||
*** Settings *** |
|||
Library RequestsLibrary |
|||
Library DateTime |
|||
Library Collections |
|||
|
|||
*** Variables *** |
|||
${URL} http://api-ops-ztb-test.qniao.cn |
|||
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} |
|||
|
|||
*** Keywords *** |
|||
get_operation_list |
|||
#获取运营审核列表 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId} |
|||
${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId |
|||
Set Global Variable ${audit_status} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
get_order-receipt-audit-details |
|||
#查看运营审核详情 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} |
|||
log ${reps.json()} |
|||
${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id |
|||
${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称 |
|||
${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id |
|||
${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重 |
|||
${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期 |
|||
${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号 |
|||
${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量 |
|||
${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} |
|||
${surcharge1} Evaluate ${unitSurcharge}*${netWeight} |
|||
${surcharge2} Evaluate ${unitSurcharge}*${settleWeight} |
|||
${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额 |
|||
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期 |
|||
${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId |
|||
Set Global Variable ${auditRequestItemId} |
|||
Set Global Variable ${categoryName} |
|||
Set Global Variable ${netWeight} |
|||
Set Global Variable ${paperMillPayAt} |
|||
Set Global Variable ${plateNumber} |
|||
Set Global Variable ${settleWeight} |
|||
Set Global Variable ${paperCategoryId} |
|||
Set Global Variable ${surcharge} |
|||
Set Global Variable ${auditRequestId} |
|||
|
|||
运营审核驳回 |
|||
#运营审核驳回 |
|||
Create Session ZTBT ${URL} ${header} |
|||
${datatime} Get Current Date result_format=%Y-%m-%d |
|||
${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":2, \ \ \ \ "remark":"${datatime}" } |
|||
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')} |
|||
318
log.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
3376
output.xml
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
407
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