|
|
@ -7,7 +7,7 @@ OutboundDeviceOrder |
|
|
#出货--刷卡单 |
|
|
#出货--刷卡单 |
|
|
#第一次刷卡过磅--皮重 |
|
|
#第一次刷卡过磅--皮重 |
|
|
Create Session ztbf ${ztbClient} ${client_header} |
|
|
Create Session ztbf ${ztbClient} ${client_header} |
|
|
${OutFirstWeight} Set Variable 2000 |
|
|
|
|
|
|
|
|
${OutFirstWeight} Evaluate random.randint(500,3000) random |
|
|
${OutFirstWeightData} Set Variable { \ \ \ \ "cardNo":"${OutCarNo}", \ \ \ \ "weight":"${OutFirstWeight}" } |
|
|
${OutFirstWeightData} Set Variable { \ \ \ \ "cardNo":"${OutCarNo}", \ \ \ \ "weight":"${OutFirstWeight}" } |
|
|
${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${OutFirstWeightData.encode('utf-8')} |
|
|
${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${OutFirstWeightData.encode('utf-8')} |
|
|
${OutWeightId} Get From Dictionary ${reps.json()['data']} id #刷卡过磅id |
|
|
${OutWeightId} Get From Dictionary ${reps.json()['data']} id #刷卡过磅id |
|
|
@ -17,7 +17,7 @@ OutboundDeviceOrder |
|
|
${reps} POST On Session ztbf /ztb-factory/binding/order-image ${OutFirstBinding.encode('utf-8')} |
|
|
${reps} POST On Session ztbf /ztb-factory/binding/order-image ${OutFirstBinding.encode('utf-8')} |
|
|
sleep 0.5 |
|
|
sleep 0.5 |
|
|
#第二次刷卡过磅--毛重 |
|
|
#第二次刷卡过磅--毛重 |
|
|
${OutSecondWeight} Set Variable 4520 |
|
|
|
|
|
|
|
|
${OutSecondWeight} Evaluate random.randint(3000,5000) random |
|
|
${OutSecondWeightData} Set Variable { \ \ \ \ "cardNo":"${OutCarNo}", \ \ \ \ "weight":"${OutSecondWeight}" } |
|
|
${OutSecondWeightData} Set Variable { \ \ \ \ "cardNo":"${OutCarNo}", \ \ \ \ "weight":"${OutSecondWeight}" } |
|
|
${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${OutSecondWeightData.encode('utf-8')} |
|
|
${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${OutSecondWeightData.encode('utf-8')} |
|
|
Should Be Equal As Strings ${reps.json()['message']} 第二次过磅成功,${OutSecondWeight}公斤,请下地磅 |
|
|
Should Be Equal As Strings ${reps.json()['message']} 第二次过磅成功,${OutSecondWeight}公斤,请下地磅 |
|
|
@ -39,8 +39,9 @@ OutboundDeviceOrder |
|
|
Exit For Loop If '${weightNoteId}'=='${OutWeightId}' #判断订单编号是否相等 |
|
|
Exit For Loop If '${weightNoteId}'=='${OutWeightId}' #判断订单编号是否相等 |
|
|
END |
|
|
END |
|
|
#确认出货 |
|
|
#确认出货 |
|
|
${unitPrice} Set Variable 2.35 #出货品类单价 |
|
|
|
|
|
${plateNumber} Set Variable 川F66666 #出货车牌号 |
|
|
|
|
|
|
|
|
${unitPrice} Evaluate round(random.uniform(${defaultUnitPrice},${highestUnitPrice}),2) random #出货品类单价 |
|
|
|
|
|
${Number} Evaluate random.randint(00000,99999) random |
|
|
|
|
|
${plateNumber} Set Variable 川F${Number} #出货车牌号 |
|
|
${estimatedAmount} Evaluate ${unitPrice}*${NetWeight} #预估金额(元) |
|
|
${estimatedAmount} Evaluate ${unitPrice}*${NetWeight} #预估金额(元) |
|
|
${defaultUnitPrice} Set Variable ${defaultUnitPrice}*1000 #指导价格 |
|
|
${defaultUnitPrice} Set Variable ${defaultUnitPrice}*1000 #指导价格 |
|
|
${OutboundOrderData} Set Variable { \ \ \ \ "id":"${OutId}", \ \ \ \ "factoryId":"${factoryId}", \ \ \ \ "operaterId":null, \ \ \ \ "operaterName":null, \ \ \ \ "weightNoteId":"${weightNoteId}", \ \ \ \ "deliveryChannelType":1, \ \ \ \ "consigneeId":null, \ \ \ \ "consigneeName":"${ChannelName}", \ \ \ \ "productId":null, \ \ \ \ "productName":null, \ \ \ \ "packageQuantity":null, \ \ \ \ "status":"${status}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "driverName":null, \ \ \ \ "auditorName":null, \ \ \ \ "auditorId":null, \ \ \ \ "createTime":"${createTime}", \ \ \ \ "updadeTime":null, \ \ \ \ "agencySellOrderItemId":null, \ \ \ \ "unitPrice":null, \ \ \ \ "totalEstimatedAmount":0, \ \ \ \ "orderNumber":"${orderNumber}", \ \ \ \ "remark":null, \ \ \ \ "isHandworkOrder":0, \ \ \ \ "salesGuy":null, \ \ \ \ "receiptAddress":null, \ \ \ \ "roleName":null, \ \ \ \ "totalWeight":"${OutFirstWeight}", \ \ \ \ "netWeight":"${NetWeight}", \ \ \ \ "emptyWeight":"${OutSecondWeight}", \ \ \ \ "factoryDeliveryChannelId":"${ChannelId}", \ \ \ \ "estimatedAmount":"${estimatedAmount}", \ \ \ \ "outboundDeliveryOrderProductItemList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "productId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "productName":"${categoryName}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "productCategoryId":"${productcategoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "konePrice":"指导价格:${defaultUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "highestUnitPrice":"${highestUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "lowestUnitPrice":0, \ \ \ \ \ \ \ \ \ \ \ \ "settleWeight":null, \ \ \ \ \ \ \ \ \ \ \ \ "deductPercent":null, \ \ \ \ \ \ \ \ \ \ \ \ "estimatedAmount":"${estimatedAmount}", \ \ \ \ \ \ \ \ \ \ \ \ "proportionOfProduct":100 \ \ \ \ \ \ \ \ } \ \ \ \ ] } |
|
|
${OutboundOrderData} Set Variable { \ \ \ \ "id":"${OutId}", \ \ \ \ "factoryId":"${factoryId}", \ \ \ \ "operaterId":null, \ \ \ \ "operaterName":null, \ \ \ \ "weightNoteId":"${weightNoteId}", \ \ \ \ "deliveryChannelType":1, \ \ \ \ "consigneeId":null, \ \ \ \ "consigneeName":"${ChannelName}", \ \ \ \ "productId":null, \ \ \ \ "productName":null, \ \ \ \ "packageQuantity":null, \ \ \ \ "status":"${status}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "driverName":null, \ \ \ \ "auditorName":null, \ \ \ \ "auditorId":null, \ \ \ \ "createTime":"${createTime}", \ \ \ \ "updadeTime":null, \ \ \ \ "agencySellOrderItemId":null, \ \ \ \ "unitPrice":null, \ \ \ \ "totalEstimatedAmount":0, \ \ \ \ "orderNumber":"${orderNumber}", \ \ \ \ "remark":null, \ \ \ \ "isHandworkOrder":0, \ \ \ \ "salesGuy":null, \ \ \ \ "receiptAddress":null, \ \ \ \ "roleName":null, \ \ \ \ "totalWeight":"${OutFirstWeight}", \ \ \ \ "netWeight":"${NetWeight}", \ \ \ \ "emptyWeight":"${OutSecondWeight}", \ \ \ \ "factoryDeliveryChannelId":"${ChannelId}", \ \ \ \ "estimatedAmount":"${estimatedAmount}", \ \ \ \ "outboundDeliveryOrderProductItemList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "productId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "productName":"${categoryName}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "productCategoryId":"${productcategoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "konePrice":"指导价格:${defaultUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "highestUnitPrice":"${highestUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "lowestUnitPrice":0, \ \ \ \ \ \ \ \ \ \ \ \ "settleWeight":null, \ \ \ \ \ \ \ \ \ \ \ \ "deductPercent":null, \ \ \ \ \ \ \ \ \ \ \ \ "estimatedAmount":"${estimatedAmount}", \ \ \ \ \ \ \ \ \ \ \ \ "proportionOfProduct":100 \ \ \ \ \ \ \ \ } \ \ \ \ ] } |
|
|
@ -57,8 +58,8 @@ OutboundDeviceOrder |
|
|
Exit For Loop If '${id}'=='${OutId}' |
|
|
Exit For Loop If '${id}'=='${OutId}' |
|
|
END |
|
|
END |
|
|
#确认付款 |
|
|
#确认付款 |
|
|
${paperMillNetWeight} Set Variable 10 #纸厂净重(吨) |
|
|
|
|
|
${deductPercent} Set Variable 2 #扣点(%) |
|
|
|
|
|
|
|
|
${paperMillNetWeight} Evaluate random.randint(10000,20000) random #纸厂净重(吨) |
|
|
|
|
|
${deductPercent} Evaluate round(random.randint(2,10),2) random #扣点(%) |
|
|
${settleWeight} Evaluate ${paperMillNetWeight}-${paperMillNetWeight}*${deductPercent}/1000 #结算重量(吨) |
|
|
${settleWeight} Evaluate ${paperMillNetWeight}-${paperMillNetWeight}*${deductPercent}/1000 #结算重量(吨) |
|
|
${OutPayData} Set Variable { \ \ \ \ "id":"${OutId}", \ \ \ \ "categoryId":"${categoryId}", \ \ \ \ "outboundDeliveryOrderProductItemList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "settlementProductId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "id":"${productItemId}", \ \ \ \ \ \ \ \ \ \ \ \ "paperMillNetWeight":"${paperMillNetWeight}", \ \ \ \ \ \ \ \ \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ \ \ \ \ \ \ \ \ "deductPercent":"${deductPercent}", \ \ \ \ \ \ \ \ \ \ \ \ "settleUnitPrice":"${unitPrice}" \ \ \ \ \ \ \ \ } \ \ \ \ ] } |
|
|
${OutPayData} Set Variable { \ \ \ \ "id":"${OutId}", \ \ \ \ "categoryId":"${categoryId}", \ \ \ \ "outboundDeliveryOrderProductItemList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "settlementProductId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "id":"${productItemId}", \ \ \ \ \ \ \ \ \ \ \ \ "paperMillNetWeight":"${paperMillNetWeight}", \ \ \ \ \ \ \ \ \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ \ \ \ \ \ \ \ \ "deductPercent":"${deductPercent}", \ \ \ \ \ \ \ \ \ \ \ \ "settleUnitPrice":"${unitPrice}" \ \ \ \ \ \ \ \ } \ \ \ \ ] } |
|
|
${reps} POST On Session ztbf ztb-factory/confirm/outbound-delivery-order-receipt ${OutPayData.encode('utf-8')} |
|
|
${reps} POST On Session ztbf ztb-factory/confirm/outbound-delivery-order-receipt ${OutPayData.encode('utf-8')} |