纸通宝工厂版
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.
 
 

37 lines
3.1 KiB

*** Settings ***
Library Collections
Library RequestsLibrary
*** Test Cases ***
ReceiptWeigh
#厂内收货--刷卡过磅
#刷卡过磅--过毛重
Create Session ztbf ${ztbClient} ${client_header}
${weight} Set Variable 2410
${weighData} Set Variable {"cardNo":"${ReceiptcardNo}","weight":${weight}}
${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${weighData.encode('utf-8')}
${ReceiptOrderId} Get From Dictionary ${reps.json()['data']} id #订单id
Set Global Variable ${ReceiptOrderId}
Should Be Equal As Strings ${reps.json()["message"]} 毛重称重成功,${weight}公斤,请下地磅
#定价详情
${reps} GET On Session ztbf ztb-factory/factory/wechat-applet/get/order-detail/${ReceiptOrderId}
${plateNumber} Get From Dictionary ${reps.json()['data']} plateNumber #车牌号
${isWithoutTare} Get From Dictionary ${reps.json()['data']} isWithoutTare #是否无皮过磅,0否1是
${proportionOfProduct} Get From Dictionary ${reps.json()['data']} proportionOfProduct
${plateNumber} Set Variable If '${plateNumber}'=='${None}' null ${plateNumber}
#确定定价
${unitPrice} Set Variable 1.88
${submitData} Set Variable { \ \ \ \ "id":"${ReceiptOrderId}", \ \ \ \ "productInfoDtoList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "productId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "productName":"${categoryName}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":"2.1", \ \ \ \ \ \ \ \ \ \ \ \ "proportionOfProduct":"${proportionOfProduct}", \ \ \ \ \ \ \ \ \ \ \ \ "konePrice":"指导价格:${defaultUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "highestUnitPrice":"${highestUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "lowestUnitPrice":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "plateNumber":${plateNumber}, \ \ \ \ "factoryCustomerId":"${ReceiptCustomerId}", \ \ \ \ "deductType":1, \ \ \ \ "inspectionRemark":"确定定价", \ \ \ \ "isWithoutTare":"${isWithoutTare}" }
${reps} POST On Session ztbf ztb-factory/factory/submit/order-price ${submitData.encode('utf-8')}
#刷卡过磅--过皮重
${weightTare} Set Variable 2000
${weighData} Set Variable {"cardNo":"${ReceiptcardNo}","weight":${weightTare}}
${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${weighData.encode('utf-8')}
${ReceiptOrderId} Get From Dictionary ${reps.json()['data']} id #订单id
Should Be Equal As Strings ${reps.json()["message"]} 皮重称重成功,${weightTare}公斤,正在打印磅单
#过磅审核
${auditData} Set Variable {"id":"${ReceiptOrderId}"}
${reps} POST On Session ztbf ztb-factory/factory/audit-pass/order ${auditData.encode('utf-8')}
#支付订单--千鸟代付
${paymentData} Set Variable {"settleType":3,"ids":["${ReceiptOrderId}"]}
${reps} POST On Session ztbf ztb-factory/wechat-applet/merge-receiving-pay-order/pay ${paymentData.encode('utf-8')}