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.
54 lines
4.8 KiB
54 lines
4.8 KiB
*** Settings ***
|
|
Library RequestsLibrary
|
|
Library Collections
|
|
|
|
*** Test Cases ***
|
|
选择收货方
|
|
${header} Create Dictionary Content-Type=application/json X-APP-ID=503258978847953926 Authorization=QNT iHP4V/g6O5DXHixyNrf7tq/TvfrIdTfTGdH2F9klxyus0IM7YplqP6ckxwAnbYMwW8kjOtWm8KDrBFfLPEPpTA== X-FACTORY-ID=615896891544178688
|
|
Create Session ZTB http://api-client-ztb-test.qniao.cn ${header}
|
|
${reps} Get On Session ZTB /ztb-factory/factorydeliverychannel/get/self-factory-delivery-channel-list? params=pageNum=1&pageSize=20
|
|
${Name of consignee} Get From Dictionary ${reps.json()["data"]["records"][0]} name
|
|
Set Global Variable ${Name of consignee}
|
|
Should Be Equal As Strings ${reps.json()["message"]} successful
|
|
|
|
创建出货单
|
|
${header} Create Dictionary Content-Type=application/json X-APP-ID=503258978847953926 Authorization=QNT iHP4V/g6O5DXHixyNrf7tq/TvfrIdTfTGdH2F9klxyus0IM7YplqP6ckxwAnbYMwW8kjOtWm8KDrBFfLPEPpTA== X-FACTORY-ID=615896891544178688
|
|
Create Session ZTB http://api-client-ztb-test.qniao.cn ${header}
|
|
${data} Set Variable {"productId":"629736087564193792","productName":"牛奶盒","konePrice":"指导价格:5000","unitPrice":"5000","plateNumber":"京A88888","deliveryChannelType":1,"factoryDeliveryChannelId":"628650922460975104","consigneeName":"${Name of consignee}","netWeight":"20000","settleWeight":"20000","estimatedAmount":100000,"weightNoteImageUrls":["https://qncloudtest.oss-cn-shenzhen.aliyuncs.com/common/19345550560503914.jpg","https://qncloudtest.oss-cn-shenzhen.aliyuncs.com/common/19345550363230371.jpg","https://qncloudtest.oss-cn-shenzhen.aliyuncs.com/common/19345551438903633.jpg"]}
|
|
log ${data}
|
|
${reps} Post On Session ZTB /ztb-factory/save/outbound-delivery-order ${data.encode('utf-8')}
|
|
log ${reps}
|
|
Should Be Equal As Strings ${reps.json()["message"]} successful
|
|
|
|
OrderID
|
|
${header} Create Dictionary Content-Type=application/json X-APP-ID=503258978847953926 Authorization=QNT iHP4V/g6O5DXHixyNrf7tq/TvfrIdTfTGdH2F9klxyus0IM7YplqP6ckxwAnbYMwW8kjOtWm8KDrBFfLPEPpTA== X-FACTORY-ID=615896891544178688
|
|
Create Session ZTB http://api-client-ztb-test.qniao.cn ${header}
|
|
${reps} Get On Session ZTB /ztb-factory/get/outbound-delivery-order-list? params=pageNum=1&pageSize=15
|
|
log ${reps}
|
|
${OrderID} Get From Dictionary ${reps.json()["data"]["records"][0]} id
|
|
Set Global Variable ${OrderID}
|
|
|
|
审核
|
|
${header} Create Dictionary Content-Type=application/json X-APP-ID=503258978847953926 Authorization=QNT iHP4V/g6O5DXHixyNrf7tq/TvfrIdTfTGdH2F9klxyus0IM7YplqP6ckxwAnbYMwW8kjOtWm8KDrBFfLPEPpTA== X-FACTORY-ID=615896891544178688
|
|
Create Session ZTB http://api-client-ztb-test.qniao.cn ${header}
|
|
${data} Set Variable {"id":"${OrderID}","auditStatus":1}
|
|
${reps} post On Session ZTB /ztb-factory/audit/outbount-delivery-order ${data.encode('utf-8')}
|
|
Should Be Equal As Strings ${reps.json()["message"]} successful
|
|
|
|
确认收款
|
|
${header} Create Dictionary Content-Type=application/json X-APP-ID=503258978847953926 Authorization=QNT iHP4V/g6O5DXHixyNrf7tq/TvfrIdTfTGdH2F9klxyus0IM7YplqP6ckxwAnbYMwW8kjOtWm8KDrBFfLPEPpTA== X-FACTORY-ID=615896891544178688
|
|
Create Session ZTB http://api-client-ztb-test.qniao.cn ${header}
|
|
${data} Set Variable {"id":"${OrderID}","categoryId":"629736087564193792","otherFee":0,"subsidy":0,"proxyPaySurcharge":666,"freight":0,"deductPercent":"10.00","unitPrice":5000,"factoryId":"615896891544178688","settleUnitPrice":4.444,"settlePrice":79992,"netWeight":20000,"settleWeight":18000,"weightNoteImageUrls":["https://qncloudtest.oss-cn-shenzhen.aliyuncs.com/common/19347141146174653.jpg","https://qncloudtest.oss-cn-shenzhen.aliyuncs.com/common/19347141136136270.jpg","https://qncloudtest.oss-cn-shenzhen.aliyuncs.com/common/19347141138102713.jpg"]}
|
|
log ${data}
|
|
${reps} Post On Session ZTB /ztb-factory/confirm/outbound-delivery-order-receipt ${data.encode('utf-8')}
|
|
log ${reps}
|
|
Should Be Equal As Strings ${reps.json()["message"]} successful
|
|
|
|
Close_order
|
|
${header} Create Dictionary Content-Type=application/json X-APP-ID=503258978847953926 Authorization=QNT iHP4V/g6O5DXHixyNrf7tq/TvfrIdTfTGdH2F9klxyus0IM7YplqP6ckxwAnbYMwW8kjOtWm8KDrBFfLPEPpTA== X-FACTORY-ID=615896891544178688
|
|
Create Session ZTB http://api-client-ztb-test.qniao.cn ${header}
|
|
${data} Set Variable {"id":"${OrderID}","auditStatus":0}
|
|
log ${data}
|
|
${reps} Post On Session ZTB /ztb-factory/audit/outbount-delivery-order ${data.encode('utf-8')}
|
|
log ${reps}
|
|
Should Be Equal As Strings ${reps.json()["message"]} successful
|