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.
84 lines
8.0 KiB
84 lines
8.0 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}
|
|
${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"]} 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 #纸厂供应商名称
|
|
${surcharge} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} surcharge #代卖费总额
|
|
${contractId} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} contractId #合同id
|
|
${paymentType} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} paymentType #支付类型
|
|
${activityNoteStatus} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} activityNoteStatus #活动状态
|
|
${交易主体id} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseId #交易主体id
|
|
${交易主体name} Get From Dictionary ${reps.json()["data"]} transactionMainEnterpriseName #交易主体name
|
|
${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies}
|
|
${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价
|
|
${unitSurcharge} Set Variable If '${unitSurcharge}'=='${None}' 0 ${unitSurcharge}
|
|
${id} Get From Dictionary ${reps.json()["data"]["orderItems"][0]["weightnoteInfo"]} id #获取磅单id
|
|
${status} Get From Dictionary ${reps.json()["data"]} status
|
|
${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}+100
|
|
FOR ${净重index} IN RANGE ${netWeight} 30
|
|
Exit For Loop If '${净重index}'=='${netWeight1}'
|
|
END
|
|
${settleWeight1} Evaluate ${settleWeight}+100
|
|
FOR ${结算重量index} IN RANGE ${settleWeight} 30
|
|
Exit For Loop If '${结算重量index}'=='${settleWeight1}'
|
|
END
|
|
${unitSurcharge1} Evaluate ${unitSurcharge}+0.01
|
|
FOR ${代卖费index} IN RANGE ${unitSurcharge} 100
|
|
Exit For Loop If '${代卖费index}'=='${unitSurcharge1}'
|
|
END
|
|
Set Global Variable ${contractId}
|
|
Set Global Variable ${unitSurcharge}
|
|
Set Global Variable ${paperCategoryId}
|
|
Set Global Variable ${settleUtiPrice}
|
|
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 ${surcharge}
|
|
Set Global Variable ${paymentType}
|
|
Set Global Variable ${activityNoteStatus}
|
|
Set Global Variable ${交易主体name}
|
|
Set Global Variable ${交易主体id}
|
|
Set Global Variable ${netWeight1}
|
|
Set Global Variable ${settleWeight1}
|
|
Set Global Variable ${id}
|
|
Set Global Variable ${status}
|
|
Set Global Variable ${unitSurcharge1}
|
|
|
|
weightnote
|
|
#驳回后重新提交磅单
|
|
Create Session ZTBT ${URL} ${header}
|
|
${datatime} Get Current Date result_format=%Y-%m-%d
|
|
${data} Set Variable { \ \ \ \ "id":"${weightNoteId}", \ \ \ \ "orderId":"${orderId}", \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "type":null, \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "settleWeight":13500, \ \ \ \ "deductedPoint":7.5, \ \ \ \ "unitSurcharge":"${unitSurcharge}", \ \ \ \ "surcharge":"${surcharge}", \ \ \ \ "adjustMoney":"20", \ \ \ \ "remark":"${datatime}", \ \ \ \ "imageUrls":null, \ \ \ \ "transactionMainEnterpriseid":"${交易主体id}", \ \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "settlePrice":22585.5, \ \ \ \ "activitySettleType":"${activitySettleType}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "remarkImgs":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "otherAmountList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"freightSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherSubsidies", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":1 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.002, \ \ \ \ \ \ \ \ \ \ \ \ "title":"contrabandPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":2, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":20, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":2, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":10, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "refundSubsidy":0.003, \ \ \ \ "receivableAdjustMoney":"20", \ \ \ \ "settleUtiPriceIncludeTax":1.337448648648649, \ \ \ \ "settleUtiPriceIncludeTaxType":"${settleUtiPriceIncludeTaxType}", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "deductedWeight":1.5, \ \ \ \ "orderType":"${orderType}" }
|
|
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
|
|
|
|
audit_weightnote
|
|
Create Session ZTBT ${URL} ${header}
|
|
${repsonse} Post On Session ZTBT recycle-service/admin/customer-service/audit/weightnote/${weightNoteId}
|
|
log ${repsonse.json()}
|