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

70 lines
4.6 KiB

*** Settings ***
Library DateTime
Library Collections
Library RequestsLibrary
*** Variables ***
${header} {'X-APP-ID':'470236309865238555','Authorization':'Token 6b08add42d6bcf73abb935b2adf83525','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 #纸品品类名称
${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 #结算重量
Set Global Variable ${auditRequestItemId}
Set Global Variable ${categoryName}
Set Global Variable ${netWeight}
Set Global Variable ${paperMillPayAt}
Set Global Variable ${plateNumber}
Set Global Variable ${settleWeight}
order-receipt-audit-details
#b保存磅单信息
Create Session ZTBT ${URL} ${header}
${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":${netWeight}, \ \ \ \ "paperCategoryId":null, \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "receivablePrice":29186.7, \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":${settleWeight}, \ \ \ \ "isInvoice":${hasInvoice}, \ \ \ \ "fundSourceId":${id}, \ \ \ \ "transactionMainEnterpriseName":"${交易主体}", \ \ \ \ "invoicePoint":${taxRefundRate}, \ \ \ \ "publicSubsidies":${publicSubsidies}, \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":${settleUtiPrice}, \ \ \ \ "settleUnitPriceIncludeTax":2.281517, \ \ \ \ "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":"2021年8月10号" }
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
Should Be Equal As Strings ${reps.json()["message"]} successful