纸通宝新交易版
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.
 
 

19 lines
1.4 KiB

*** Settings ***
Library RequestsLibrary
Library Collections
Library urllib3
*** Test Cases ***
papermill_applyFactoring
#纸厂端发起保理
Create Session factoring ${ztbclient} ${ztbsc_papermill_header}
${reps} GET On Session factoring ztb-supply-chain-service/user/list/paper-mill/scrap-paper-supply-payment-order params=status=1&supplyChainInstanceId=${supplyChainInstanceId}&pageNum=1&pageSize=10
${supplyPaymentOrderId} Get From Dictionary ${reps.json()['data']['records'][0]} id #纸厂付款id
${paymentDueDate} Get From Dictionary ${reps.json()['data']['records'][0]} paymentDueDate #计划付款日期
#获取保理服务费
${reps} GET On Session factoring ztb-supply-chain-service/user/calculate/debt-service-fee params=paymentOrderId=${supplyPaymentOrderId}&repayDate=${paymentDueDate}
${serviceFee} Get From Dictionary ${reps.json()['data']} serviceFee #发起保理服务费
#发起保理
${FactoringData} Set Variable { \ \ \ \ "factoringPaymentDueDate":"${paymentDueDate}", \ \ \ \ "factoringServiceFee":${serviceFee}, \ \ \ \ "supplyPaymentOrderId":"${supplyPaymentOrderId}" }
${reps} POST On Session factoring ztb-supply-chain-service/user/apply/paper-mill/factoring ${FactoringData.encode('utf-8')}
Should Be Equal As Strings ${reps.json()['message']} successful