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.
135 lines
9.0 KiB
135 lines
9.0 KiB
*** Settings ***
|
|
Documentation 运营审核-两次付款活动
|
|
Library RequestsLibrary
|
|
Library Collections
|
|
Library DateTime
|
|
Resource 提交磅单.txt
|
|
Resource 运营审核驳回.txt
|
|
Resource 台账查询.txt
|
|
|
|
*** Variables ***
|
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','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}
|
|
${datatime} Get Current Date result_format=%Y-%m-%d
|
|
${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"]} 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 #结算重量
|
|
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
|
|
${settleWeight} Set Variable If '${settleWeight}'=='None' 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}
|
|
Set Global Variable ${paperCategoryId}
|
|
Set Global Variable ${datatime}
|
|
|
|
order-receipt-audit-details
|
|
#b保存磅单信息
|
|
Create Session ZTBT ${URL} ${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
|
|
|
|
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
|
|
|
|
重复执行驳回和上传磅单操作
|
|
#重复执行上传磅单、运营驳回操作
|
|
FOR ${items} IN RANGE 5
|
|
Run Keyword get_operation_list
|
|
Run Keyword get_order-receipt-audit-details
|
|
Run Keyword If '${audit_status}'=='0' Run Keyword 运营审核驳回
|
|
sleep 1
|
|
Run Keyword 获取送货单详情
|
|
Run Keyword If '${status}'=='51' 上传送货单
|
|
Run Keyword audit_weightnote
|
|
Run Keyword 获取上传送货单后的订单详情
|
|
Run Keyword 台账查询
|
|
END
|
|
|
|
get_operation_list3
|
|
#获取运营审核列表
|
|
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=&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-details3
|
|
#查看运营审核详情
|
|
Create Session ZTBT ${URL} ${header}
|
|
${datatime} Get Current Date result_format=%Y-%m-%d
|
|
${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"]} 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 #结算重量
|
|
${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
|
|
${settleWeight} Set Variable If '${settleWeight}'=='None' 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}
|
|
Set Global Variable ${paperCategoryId}
|
|
Set Global Variable ${datatime}
|
|
|
|
order-receipt-audit-details3
|
|
#b保存磅单信息
|
|
Create Session ZTBT ${URL} ${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
|
|
|
|
operation_audit
|
|
#运营审核确认通过
|
|
Create Session ZTBT ${URL} ${header}
|
|
${data} Set Variable { \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" }
|
|
${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
|
|
Should Be Equal As Strings ${reps.json()["message"]} successful
|
|
sleep 1
|