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.
172 lines
15 KiB
172 lines
15 KiB
*** Settings ***
|
|
Library RequestsLibrary
|
|
Library DateTime
|
|
Library Collections
|
|
|
|
*** Variables ***
|
|
${URL} http://api-ops-ztb-test.qniao.cn
|
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
|
|
|
|
*** Keywords ***
|
|
获取磅单详情
|
|
#查看订单列表详情
|
|
Create Session ZTBT ${URL} ${header}
|
|
#${data} Set Variable orderId=${orderId} orderItemId=${orderItemId}
|
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId}
|
|
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #当前订单下单时的合同id
|
|
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #代卖费
|
|
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式
|
|
${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类ID
|
|
${unitPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类单价
|
|
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴
|
|
${millSupplierId} Get From Dictionary ${reps.json()["data"]} millSupplierId #纸厂供应商ID
|
|
${paperMillSupplierName} Get From Dictionary ${reps.json()["data"]} paperMillSupplierName #纸厂供应商名称
|
|
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies}
|
|
#${settleUtiPrice} Evaluate ${unitPrice}+${publicSubsidies} #结算单价
|
|
${unitSurcharge} Set Variable If '${unitSurcharge}'=='${None}' 0 ${unitSurcharge}
|
|
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id
|
|
${磅单id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id
|
|
${status} Get From Dictionary ${reps.json()["data"]} status
|
|
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} receivableAdjustMoney #获取应收调节费
|
|
${adjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} adjustMoney #获取调节费
|
|
${receivableAdjustMoney} Set Variable If '${receivableAdjustMoney}'=='${None}' 0 ${receivableAdjustMoney}
|
|
${adjustMoney} Set Variable If '${adjustMoney}'=='${None}' 0 ${adjustMoney}
|
|
${settleUtiPrice} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleUtiPrice #获取结算单价
|
|
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重
|
|
${settleWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleWeight #获取结算重量
|
|
${netWeight1} Evaluate ${netWeight}+30
|
|
FOR ${净重index} IN RANGE ${netWeight} 30
|
|
Exit For Loop If '${净重index}'=='${netWeight1}'
|
|
END
|
|
${settleWeight1} Evaluate ${settleWeight}+30
|
|
FOR ${结算重量index} IN RANGE ${settleWeight} 30
|
|
Exit For Loop If '${结算重量index}'=='${settleWeight1}'
|
|
END
|
|
${unitSurcharge1} Evaluate ${unitSurcharge}+0.001
|
|
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100
|
|
Exit For Loop If '${代卖费index}'=='${unitSurcharge1}'
|
|
END
|
|
${settleUtiPrice1} Evaluate ${settleUtiPrice}+0.1
|
|
FOR ${结算单价index} IN RANGE ${settleUtiPrice} 100
|
|
Exit For Loop If '${结算单价index}'=='${settleUtiPrice1}'
|
|
END
|
|
${receivableAdjustMoney1} Evaluate ${receivableAdjustMoney}+10
|
|
FOR ${应收调节费index} IN RANGE ${receivableAdjustMoney} 500
|
|
Exit For Loop If '${应收调节费index}'=='${receivableAdjustMoney1}'
|
|
END
|
|
${adjustMoney1} Evaluate ${adjustMoney}+10
|
|
FOR ${应收调节费index} IN RANGE ${adjustMoney} 500
|
|
Exit For Loop If '${应收调节费index}'=='${adjustMoney1}'
|
|
END
|
|
Set Global Variable ${contractId}
|
|
Set Global Variable ${unitSurcharge}
|
|
Set Global Variable ${paperCategoryId}
|
|
Set Global Variable ${settleUtiPrice1}
|
|
Set Global Variable ${unitPrice}
|
|
Set Global Variable ${publicSubsidies}
|
|
Set Global Variable ${millSupplierId}
|
|
Set Global Variable ${paperMillSupplierName}
|
|
Set Global Variable ${proxySellerSettleType}
|
|
Set Global Variable ${contractId}
|
|
Set Global Variable ${netWeight1}
|
|
Set Global Variable ${settleWeight1}
|
|
Set Global Variable ${磅单id}
|
|
Set Global Variable ${status}
|
|
Set Global Variable ${unitSurcharge1}
|
|
Set Global Variable ${adjustMoney1}
|
|
Set Global Variable ${receivableAdjustMoney1}
|
|
|
|
weightnote
|
|
#驳回后重新提交磅单
|
|
Create Session ZTBT ${URL} ${header}
|
|
${datatime} Get Current Date result_format=%Y-%m-%d
|
|
${data} Set Variable { \ \ \ \ "deductedPoint":0, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "settleUtiPriceIncludeTax":2.04012, \ \ \ \ "settleUtiPriceIncludeTaxType":1, \ \ \ \ "receivableAdjustMoney":"${receivableAdjustMoney1}", \ \ \ \ "refundSubsidy":0.002, \ \ \ \ "adjustMoney":"${adjustMoney1}", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "plateNumber":"${carList}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice1}", \ \ \ \ "netWeight":"${netWeight1}", \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge1}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "isSubsidyAndDeductIncludeTax":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleWeight":"${settleWeight1}", \ \ \ \ "deductedWeight":2, \ \ \ \ "orderType":"${orderType}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"freightSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"contrabandPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "id":"${磅单id}" \ \ \ \ }
|
|
log ${data}
|
|
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${data.encode('utf-8')}
|
|
log ${reps.json()["data"]}
|
|
${weightNoteId} Get From Dictionary ${reps.json()["data"]} weightNoteId
|
|
Set Global Variable ${weightNoteId}
|
|
Should Be Equal As Strings ${reps.json()["message"]} successful
|
|
|
|
获取上传磅单后的订单详情
|
|
Create Session ZTBT ${URL} ${header}
|
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId}
|
|
${settleUnitPrice} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleUtiPrice #获取结算单价
|
|
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #获取代卖费
|
|
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重
|
|
${settleWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} settleWeight #获取结算重量
|
|
${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} receivableAdjustMoney #获取应收调节费
|
|
${adjustMoney} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} adjustMoney #获取调节费
|
|
Set Global Variable ${settleUnitPrice}
|
|
Set Global Variable ${unitSurcharge}
|
|
Set Global Variable ${netWeight}
|
|
Set Global Variable ${settleWeight}
|
|
Set Global Variable ${receivableAdjustMoney}
|
|
Set Global Variable ${adjustMoney}
|
|
|
|
获取送货单详情
|
|
#获取订单详情信息
|
|
Create Session ZTBT ${URL} ${header}
|
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId} &orderItemId=${orderItemId}
|
|
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id
|
|
${paperMillId} Get From Dictionary ${reps.json()["data"]} paperMillId #纸厂id
|
|
${paperCategoryPrice} Get From Dictionary ${reps.json()["data"]} paperCategoryPrice #品类价格
|
|
${publicSubsidies} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} publicSubsidies #公开补贴
|
|
${activitySettleType} Get From Dictionary ${reps.json()["data"]} activitySettleType #活动订单结算方式
|
|
${proxySellerSettleType} Get From Dictionary ${reps.json()["data"]} proxySellerSettleType #代卖费结算方式
|
|
${交易主体id} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseId #交易主体id
|
|
${交易主体name} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseName #交易主体name
|
|
${unitSurcharge} Get From Dictionary ${reps.json()["data"]} unitSurcharge #代卖费单价
|
|
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies}
|
|
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价
|
|
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id
|
|
${磅单id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id
|
|
${status} Get From Dictionary ${reps.json()["data"]} status
|
|
${unitSurcharge3} Evaluate ${unitSurcharge}+0.001
|
|
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100
|
|
Exit For Loop If '${代卖费index}'=='${unitSurcharge3}'
|
|
END
|
|
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重
|
|
${netWeight3} Evaluate ${netWeight}+300
|
|
FOR ${净重index} IN RANGE ${netWeight} 30
|
|
Exit For Loop If '${净重index}'=='${netWeight3}'
|
|
END
|
|
Set Global Variable ${contractId}
|
|
Set Global Variable ${paperMillId}
|
|
Set Global Variable ${paperCategoryPrice}
|
|
Set Global Variable ${publicSubsidies}
|
|
Set Global Variable ${activitySettleType}
|
|
Set Global Variable ${proxySellerSettleType}
|
|
Set Global Variable ${settleUtiPrice}
|
|
Set Global Variable ${交易主体id}
|
|
Set Global Variable ${交易主体name}
|
|
Set Global Variable ${unitSurcharge3}
|
|
Set Global Variable ${netWeight3}
|
|
Set Global Variable ${磅单id}
|
|
Set Global Variable ${status}
|
|
|
|
上传送货单
|
|
#上传送货单
|
|
Create Session ZTBT ${URL} ${header}
|
|
${datatime} Get Current Date result_format=%Y-%m-%d
|
|
${data} Set Variable { \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "netWeight":"${netWeight3}", \ \ \ \ "settleWeight":null, \ \ \ \ "unitSurcharge":${unitSurcharge3}, \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "activitySettleType":"${activitySettleType}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "remark":null, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "settlePrice":0, \ \ \ \ "contractId":"${contractId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "orderType":"${orderType}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "otherAmountList":[ \ \ \ \ \ ], \ \ \ \ "unitPrice":"${paperCategoryPrice}", \ \ \ \ "id":"${磅单id}" \ \ \ \ \ }
|
|
log ${data}
|
|
${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/update/weightnote ${data.encode('utf-8')}
|
|
log ${reps.json()}
|
|
${weightNoteId} Get From Dictionary ${reps.json()["data"]} weightNoteId #磅单编号
|
|
Set Global Variable ${weightNoteId}
|
|
Should Be Equal As Strings ${reps.json()["message"]} successful
|
|
Set Global Variable ${datatime}
|
|
|
|
获取上传送货单后的订单详情
|
|
Create Session ZTBT ${URL} ${header}
|
|
${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId}
|
|
${netWeight} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} netWeight #获取净重
|
|
${unitSurcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} unitSurcharge #获取代卖费
|
|
Set Global Variable ${netWeight}
|
|
Set Global Variable ${unitSurcharge}
|
|
|
|
audit_weightnote
|
|
Create Session ZTBT ${URL} ${header}
|
|
${repsonse} Post On Session ZTBT recycle-service/admin/customer-service/audit/weightnote/${weightNoteId}
|
|
log ${repsonse.json()}
|