diff --git a/1-Client(Test)/1-APPlogin(Test).robot b/1-Client(Test)/1-APPlogin(Test).robot index bf848b7..ffe5195 100644 --- a/1-Client(Test)/1-APPlogin(Test).robot +++ b/1-Client(Test)/1-APPlogin(Test).robot @@ -15,12 +15,14 @@ userlogin Disable Warnings Create Session ZTBT https://api-client-uec-test.qniao.cn ${header} ${data} Create Dictionary account=18888888888 captcha=888888 accountType=2 - #${data} Set Variable {"accountType":2,"password":null,"account":"13168550964","captcha":"${text_code}"} + ${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 @@ -43,3 +45,4 @@ getuserinfo ${userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id Set Global Variable ${realName} Set Global Variable ${userId} + Should Be Equal As Strings ${account} ${reps.json()["data"]["mobile"]} diff --git a/1-Client(Test)/2.1-CreateRegularorder.robot b/1-Client(Test)/2.1-CreateRegularorder.robot index 17bf40c..1acda22 100644 --- a/1-Client(Test)/2.1-CreateRegularorder.robot +++ b/1-Client(Test)/2.1-CreateRegularorder.robot @@ -21,7 +21,7 @@ get_paper-mill-city FOR ${items} IN @{data} ${cityName} Get From Dictionary ${items} cityName #城市name ${cityId} Get From Dictionary ${items} cityId #城市id - Exit For Loop If '${cityName}'=='茂名市' + Exit For Loop If '${cityName}'=='大同市' END Set Global Variable ${cityId} @@ -40,7 +40,7 @@ get-factorylist ${locProvinceName} Get From Dictionary ${item} locProvinceName #纸厂所在省 ${locCityName} Get From Dictionary ${item} locCityName #纸厂所在市 ${locDistrictName} Get From Dictionary ${item} locDistrictName #纸厂所在区 - Exit For Loop If '${name}'=='高州市金墩纸业有限公司' + Exit For Loop If '${name}'=='Ceshi_factory' END ${value} Evaluate random.choice(${paperCategoryList}) random log to console \nvalue: ${value} @@ -141,31 +141,3 @@ Repeat Repeat Keyword 10 get-factorylist *** Keywords *** -get-factorylist - #获取代卖列表 - #${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${gettoken} - Create Session factorylist http://api-client-ztb-test.qniao.cn ${header} - ${reps} Get On Session factorylist recycle-service/get/paper-mill-paper-category-price-list params=cityId=&enableSalesAgent=1&pageNum=1&pageSize=10&listType=0 - Should Be Equal As Strings ${reps.json()["message"]} successful - ${records} Get From Dictionary ${reps.json()["data"]} records #获取代卖纸厂列表 - FOR ${item} IN @{records} - ${name} Get From Dictionary ${item} name #获取纸厂name - ${paperCategoryList} Get From Dictionary ${item} paperCategoryList #获取纸厂品类列表 - ${cumulativeWeight} Get From Dictionary ${item} cumulativeWeight #累计已代卖吨数 - ${paperMillId} Get From Dictionary ${item} paperMillId #获取纸厂id - ${locProvinceName} Get From Dictionary ${item} locProvinceName #纸厂所在省 - ${locCityName} Get From Dictionary ${item} locCityName #纸厂所在市 - ${locDistrictName} Get From Dictionary ${item} locDistrictName #纸厂所在区 - Exit For Loop If '${name}'=='格森纸业有限公司' - END - ${value} Evaluate random.choice(${paperCategoryList}) random - log to console \nvalue: ${value} - ${categoryid} Get From Dictionary ${value} categoryId #纸厂品类id - ${categoryName} Get From Dictionary ${value} categoryName #纸厂品类name - ${unitPrice} Get From Dictionary ${value} unitPrice #纸厂品类价格 - ${paperMillAddress} Catenate ${locProvinceName} ${locCityName} ${locDistrictName} - Set Global Variable ${categoryid} - Set Global Variable ${unitPrice} - Set Global Variable ${paperMillId} - Set Global Variable ${paperMillAddress} - Set Global Variable ${categoryName} diff --git a/1-Client(Test)/2.2createActiveorder-1.robot b/1-Client(Test)/2.2createActiveorder-1.robot index 4190ff9..9f585e2 100644 --- a/1-Client(Test)/2.2createActiveorder-1.robot +++ b/1-Client(Test)/2.2createActiveorder-1.robot @@ -18,7 +18,7 @@ proxy-sell-activity_list ${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}'=='谷木--一次' + Exit For Loop If '${activityName}'=='Ceshi_factory--一次' END ${Category_value} Evaluate random.choice(${paperCategoryList}) random #获取纸品列表 log to console \nvalue: ${Category_value} diff --git a/1-Client(Test)/2.3createActiveorder-2.robot b/1-Client(Test)/2.3createActiveorder-2.robot index 788f2ef..6956ad3 100644 --- a/1-Client(Test)/2.3createActiveorder-2.robot +++ b/1-Client(Test)/2.3createActiveorder-2.robot @@ -18,7 +18,7 @@ proxy-sell-activity_list ${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}'=='格森--两次活动' + Exit For Loop If '${activityName}'=='Ceshi_factory--两次' END ${Category_value} Evaluate random.choice(${paperCategoryList}) random #获取纸品 log to console \nvalue: ${Category_value} diff --git a/111.xls b/111.xls new file mode 100644 index 0000000..6bef55d Binary files /dev/null and b/111.xls differ diff --git a/1635824097672.xlsx b/1635824097672.xlsx deleted file mode 100644 index f4a6b9a..0000000 Binary files a/1635824097672.xlsx and /dev/null differ diff --git a/1637047948939.xlsx b/1637047948939.xlsx deleted file mode 100644 index d9d5330..0000000 Binary files a/1637047948939.xlsx and /dev/null differ diff --git a/1637048116722.xlsx b/1637048116722.xlsx deleted file mode 100644 index 6dd2be4..0000000 Binary files a/1637048116722.xlsx and /dev/null differ diff --git a/1637048161685.xlsx b/1637048161685.xlsx deleted file mode 100644 index 5e308ef..0000000 Binary files a/1637048161685.xlsx and /dev/null differ diff --git a/2-Background_system(Test)/2.1-Consignment management/2.1-RegularUpload-weightnote.robot b/2-Background_system(Test)/2.1-Consignment management/2.1-RegularUpload-weightnote.robot index 24b110b..903beb8 100644 --- a/2-Background_system(Test)/2.1-Consignment management/2.1-RegularUpload-weightnote.robot +++ b/2-Background_system(Test)/2.1-Consignment management/2.1-RegularUpload-weightnote.robot @@ -191,7 +191,7 @@ 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":2000, \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "isSubsidyAndDeductIncludeTax":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleWeight":1800, \ \ \ \ "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 \ \ \ \ \ \ \ \ } \ \ \ \ ] } + ${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"]} diff --git a/2-Background_system(Test)/2.1-Consignment management/3.1-Operation_audit.robot b/2-Background_system(Test)/2.1-Consignment management/3.1-Operation_audit.robot index 325b6af..c3f414c 100644 --- a/2-Background_system(Test)/2.1-Consignment management/3.1-Operation_audit.robot +++ b/2-Background_system(Test)/2.1-Consignment management/3.1-Operation_audit.robot @@ -79,7 +79,7 @@ get_order-log-detail2 重复执行驳回上传磅单 #重复执行上传磅单、运营驳回操作 - FOR ${items} IN RANGE 3 + FOR ${items} IN RANGE 10 Run Keyword get_operation_list Run Keyword get_order-receipt-audit-details Run Keyword If '${audit_status}'=='0' Run Keyword 运营审核驳回 @@ -87,6 +87,8 @@ get_order-log-detail2 Run Keyword 获取磅单详情 Run Keyword If '${status}'=='51' weightnote Run Keyword audit_weightnote + Run Keyword 获取上传磅单后的订单详情 + Run Keyword 台账查询 END get_operation_list1 diff --git a/2-Background_system(Test)/2.1-Consignment management/3.3-Operation_audit.robot b/2-Background_system(Test)/2.1-Consignment management/3.3-Operation_audit.robot index e608507..3849b6f 100644 --- a/2-Background_system(Test)/2.1-Consignment management/3.3-Operation_audit.robot +++ b/2-Background_system(Test)/2.1-Consignment management/3.3-Operation_audit.robot @@ -74,7 +74,7 @@ get_order-log-detail2 重复执行驳回和上传磅单操作 #重复执行上传磅单、运营驳回操作 - FOR ${items} IN RANGE 10 + FOR ${items} IN RANGE 50 Run Keyword get_operation_list Run Keyword get_order-receipt-audit-details Run Keyword If '${audit_status}'=='0' Run Keyword 运营审核驳回 diff --git a/2-Background_system(Test)/2.1-Consignment management/台账查询.txt b/2-Background_system(Test)/2.1-Consignment management/台账查询.txt index 72f288e..2071449 100644 --- a/2-Background_system(Test)/2.1-Consignment management/台账查询.txt +++ b/2-Background_system(Test)/2.1-Consignment management/台账查询.txt @@ -14,3 +14,8 @@ ${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}' ${台账列表数据} 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"]} diff --git a/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt b/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt index f895981..6545de7 100644 --- a/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt +++ b/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt @@ -22,18 +22,23 @@ ${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}' ${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} #结算单价 + #${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}+100 + ${netWeight1} Evaluate ${netWeight}+30 FOR ${净重index} IN RANGE ${netWeight} 30 Exit For Loop If '${净重index}'=='${netWeight1}' END - ${settleWeight1} Evaluate ${settleWeight}+100 + ${settleWeight1} Evaluate ${settleWeight}+30 FOR ${结算重量index} IN RANGE ${settleWeight} 30 Exit For Loop If '${结算重量index}'=='${settleWeight1}' END @@ -41,10 +46,22 @@ ${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}' 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 ${settleUtiPrice} + Set Global Variable ${settleUtiPrice1} Set Global Variable ${unitPrice} Set Global Variable ${publicSubsidies} Set Global Variable ${millSupplierId} @@ -56,12 +73,14 @@ ${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}' 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":"100", \ \ \ \ "refundSubsidy":0.002, \ \ \ \ "adjustMoney":"0", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "plateNumber":"${carList}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "netWeight":"${netWeight1}", \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge1}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "isSubsidyAndDeductIncludeTax":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleWeight":"${settleWeight1}", \ \ \ \ "deductedWeight":2, \ \ \ \ "orderType":"${orderType}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"freightSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"contrabandPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "id":"${磅单id}" \ \ \ \ } + ${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"]} @@ -69,6 +88,22 @@ weightnote 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} @@ -92,7 +127,7 @@ weightnote Exit For Loop If '${代卖费index}'=='${unitSurcharge3}' END ${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重 - ${netWeight3} Evaluate ${netWeight}+100 + ${netWeight3} Evaluate ${netWeight}+300 FOR ${净重index} IN RANGE ${netWeight} 30 Exit For Loop If '${净重index}'=='${netWeight3}' END @@ -126,8 +161,10 @@ weightnote 获取上传送货单后的订单详情 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 + ${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} diff --git a/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot b/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot index 02502e1..6ed7927 100644 --- a/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot +++ b/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot @@ -51,4 +51,4 @@ 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 3 + sleep 1 diff --git a/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot b/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot index add8ab7..0f75fdf 100644 --- a/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot +++ b/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot @@ -20,8 +20,10 @@ get_order-receipt-audit-details #代卖应收详情 Create Session ZTBT ${URL} ${header} ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} - ${receivablePriceIncludeTax} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePriceIncludeTax #获取应收金额 - ${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #未回款金额 + ${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} @@ -31,4 +33,4 @@ update_payment-order-status ${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 3 + sleep 5 diff --git a/2-Background_system(Test)/4-Consignment_management/2.3-ActiveUpload-weightnote.robot b/2-Background_system(Test)/4-Consignment_management/2.3-ActiveUpload-weightnote.robot index 78d4e81..2e3ff9c 100644 --- a/2-Background_system(Test)/4-Consignment_management/2.3-ActiveUpload-weightnote.robot +++ b/2-Background_system(Test)/4-Consignment_management/2.3-ActiveUpload-weightnote.robot @@ -187,7 +187,7 @@ 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}" } + ${data} Set Variable { \ \ \ \ "id":"${weightNoteId}", \ \ \ \ "orderId":"${orderId}", \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "type":null, \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "settleWeight":14200, \ \ \ \ "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"]} diff --git a/2-Background_system(Test)/4-Consignment_management/5.3-sales_receivable.robot b/2-Background_system(Test)/4-Consignment_management/5.3-sales_receivable.robot index f876a69..1061a2f 100644 --- a/2-Background_system(Test)/4-Consignment_management/5.3-sales_receivable.robot +++ b/2-Background_system(Test)/4-Consignment_management/5.3-sales_receivable.robot @@ -21,7 +21,8 @@ get_order-receipt-audit-details Create Session ZTBT ${URL} ${header} ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId} ${receivablePriceIncludeTax} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePriceIncludeTax #获取应收金额 - ${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #未回款金额 + #${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} diff --git a/2-Background_system(Test)/6-Parameter/2-parameter.robot b/2-Background_system(Test)/6-Parameter/2-parameter.robot index 27244eb..1d25c64 100644 --- a/2-Background_system(Test)/6-Parameter/2-parameter.robot +++ b/2-Background_system(Test)/6-Parameter/2-parameter.robot @@ -1,5 +1,5 @@ *** Settings *** -Suite Setup 计算公式 +Suite Setup Library RequestsLibrary Library Collections Resource Sys_keyword.txt @@ -11,8 +11,9 @@ ${URL} http://api-ops-ztb-test.qniao.cn *** Test Cases *** get_parameter #获取台账列表 + Run Keyword 计算公式 Create Session ZTBT ${URL} ${header} ${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId} ${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据 Set Global Variable ${台账列表数据} - Should Be Equal As Numbers ${扣点(%)}= ${reps.json()["data"]["record"][0]["deductedPoint"]} + Should Be Equal As Numbers ${netWeight} ${reps.json()["data"]["records"][0]["netWeight"]} diff --git a/2-Background_system(Test)/6-Parameter/Sys_keyword.txt b/2-Background_system(Test)/6-Parameter/Sys_keyword.txt index a1fe120..eed0d89 100644 --- a/2-Background_system(Test)/6-Parameter/Sys_keyword.txt +++ b/2-Background_system(Test)/6-Parameter/Sys_keyword.txt @@ -6,21 +6,21 @@ ${净重} Set Variable ${netWeight} ${结算单价} Evaluate ${unitPrice}+${publicSubsidies} ${扣点(%)}= Evaluate (${netWeight}-${settleWeight})/${netWeight} - ${纸厂补贴和扣款} Evaluate ${运费补贴}+${其他补贴}+${违禁物品扣款}+${装车不规范扣款}+${其他扣款} + #${纸厂补贴和扣款} Evaluate ${运费补贴}+${其他补贴}+${违禁物品扣款}+${装车不规范扣款}+${其他扣款} ${扣点前代卖费} Evaluate ${unitSurcharge}*${netWeight} ${扣点后代卖费} Evaluate ${unitSurcharge}*${settleWeight} ${代卖费总额} Set Variable If '${proxySellerSettleType} '=='0' ${扣点前代卖费} ${扣点后代卖费} #0:扣点前,1:扣点后 - ${一次应付} Evaluate ${结算单价}*${settleWeight}+${纸厂补贴和扣款}-${代卖费总额}+${返还补贴}+${调节费} - ${两次首笔应付} Evaluate ${结算单价}*${netWeight}-${代卖费总额} + #${一次应付} Evaluate ${结算单价}*${settleWeight}+${纸厂补贴和扣款}-${代卖费总额}+${返还补贴}+${调节费} + #${两次首笔应付} Evaluate ${结算单价}*${netWeight}-${代卖费总额} #${两次尾款应付} - ${应付金额(元)} Set Variable If '${firstPayPercent}'=='100%' ${一次应付} ${两次首笔应付} #100%:一笔结算,70%、85%:两笔结算 - ${含税结算单价} Set Variable If '${isSubsidyAndDeductIncludeTax} '=='0' (${结算单价}+${纸厂补贴和扣款}/${settleWeight})*(1+${taxRefundRate} ) ${结算单价}*(1+${taxRefundRate}) #0:不含税,1:含税 - ${第一笔金额} Evaluate ${结算单价}*${settleWeight}+${纸厂补贴和扣款} + #${应付金额(元)} Set Variable If '${firstPayPercent}'=='100%' ${一次应付} ${两次首笔应付} #100%:一笔结算,70%、85%:两笔结算 + #${含税结算单价} Set Variable If '${isSubsidyAndDeductIncludeTax} '=='0' (${结算单价}+${纸厂补贴和扣款}/${settleWeight})*(1+${taxRefundRate} ) ${结算单价}*(1+${taxRefundRate}) #0:不含税,1:含税 + #${第一笔金额} Evaluate ${结算单价}*${settleWeight}+${纸厂补贴和扣款} #${第二笔金额} Evaluate #${总金额} Evaluate ${第一笔金额}+${第二笔金额} #${金额} Set Variable If '${settlementType}'==0 ${第一笔金额} ${总金额} - ${垫资费总额} Evaluate ${垫资费}*${settleWeight} - ${代收费总额} Evaluate ${代收费}*${settleWeight} - ${返还补贴总额} Evaluate ${返还补贴}*${settleWeight} - ${采购单价} Evaluate ${应付金额(元)}/${settleWeight} - Set Global Variable ${扣点(%)}= + #${垫资费总额} Evaluate ${垫资费}*${settleWeight} + #${代收费总额} Evaluate ${代收费}*${settleWeight} + #${返还补贴总额} Evaluate ${返还补贴}*${settleWeight} + #${采购单价} Evaluate ${应付金额(元)}/${settleWeight} + #Set Global Variable ${扣点(%)}= diff --git a/001.robot b/样例/001.robot similarity index 75% rename from 001.robot rename to 样例/001.robot index c56cd9d..c7fe177 100644 --- a/001.robot +++ b/样例/001.robot @@ -5,6 +5,9 @@ Library Collections Library DateTime Library String Library pabot.PabotLib +Library ExcelLibrary +Library urllib3 +Resource 形参.txt *** Variables *** ${num} [1,2,3] @@ -66,10 +69,26 @@ for循环 ${a} Set Variable ${index} END ${c} Set Variable If '${a}'=='51' 待上传磅单 - '${a}'=='52' 待运营审核 - '${a}'=='53' 待财务审核 - '${a}'=='54' 待回款 - '${a}'=='55' 已完成 + '${a}'=='52' 待运营审核 + '${a}'=='53' 待财务审核 + '${a}'=='54' 待回款 + '${a}'=='55' 已完成 + +数据驱动 + Open Excel E:\\lyl\\Robot Framework\\Test\\111.xls + ${rowcount} Get Row Count 信息 + FOR ${row} IN RANGE 1 ${rowcount} #遍历从第二行开始的数据 + ${phonenum} Read Cell Data By Coordinates 信息 0 ${row} + ${captcha} Read Cell Data By Coordinates 信息 1 ${row} + #${phoneint} Convert To Integer ${phonenum} #转换为整数 + #${apach} Convert To Integer ${apach} + Exit For Loop If '${phonenum}'=='18888888888' + END + Set Global Variable ${phonenum} + Set Global Variable ${captcha} + +login + 参数实例化 ${phonenum} ${captcha} *** Keywords *** list diff --git a/样例/__init__.robot b/样例/__init__.robot new file mode 100644 index 0000000..e69de29 diff --git a/样例/形参.txt b/样例/形参.txt new file mode 100644 index 0000000..3bf25a9 --- /dev/null +++ b/样例/形参.txt @@ -0,0 +1,23 @@ +*** Settings *** +Library Collections +Library ExcelLibrary +Library urllib3 +Library RequestsLibrary + +*** Variables *** +${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'} + +*** Keywords *** +参数实例化 + [Arguments] ${phonenum} ${captcha} + #验证码登录 + Disable Warnings + Create Session ZTBT https://api-client-uec-test.qniao.cn ${header} + ${data} Create Dictionary account=${phonenum} captcha=${captcha} accountType=2 + #${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} + [Teardown]