纸通宝交易版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

72 lines
5.1 KiB

*** 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}