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