diff --git a/000-Data/3-Infomation.robot b/000-Data/3-Infomation.robot index 005ab08..6fe6620 100644 --- a/000-Data/3-Infomation.robot +++ b/000-Data/3-Infomation.robot @@ -35,6 +35,19 @@ getInformation Set Global Variable ${name} Set Global Variable ${CustomerId} Set Global Variable ${customerSettleType} + #获取厂内收货供应商列表 + Create Session ztbf ${ztbClient} ${client_header} + ${reps} GET On Session ztbf ztb-factory/factory/get/customer-list params=name=&pageNum=1&pageSize=1500 + ${ReceiptCustomerList} Get From Dictionary ${reps.json()['data']} records #供应商列表 + FOR ${ReceiptCustomerInfo} IN @{ReceiptCustomerList} + ${ReceiptName} Get From Dictionary ${ReceiptCustomerInfo} name #供应商姓名 + ${ReceiptcardNo} Get From Dictionary ${ReceiptCustomerInfo} cardNo #供应商卡ID + ${ReceiptCustomerId} Get From Dictionary ${ReceiptCustomerInfo} id #供应商唯一标识 + Exit For Loop If '${ReceiptCustomerId}'=='136' #判断小可爱供应商id + END + Set Global Variable ${ReceiptName} + Set Global Variable ${ReceiptcardNo} + Set Global Variable ${ReceiptCustomerId} #获取厂外收货供应商列表 Create Session ztbf ${ztbClient} ${client_header} ${reps} GET On Session ztbf ztb-factory/factory/get/customer-list params=name=&pageNum=1&pageSize=1500 @@ -43,7 +56,7 @@ getInformation ${Offsitename} Get From Dictionary ${CustomerInfo} name #供应商姓名 ${OffsitecardNo} Get From Dictionary ${CustomerInfo} cardNo #供应商卡ID ${OffsiteCustomerId} Get From Dictionary ${CustomerInfo} id #供应商唯一标识 - Exit For Loop If '${OffsiteCustomerId}'=='133' + Exit For Loop If '${OffsiteCustomerId}'=='133' #判断卢雪庵供应商id END Set Global Variable ${Offsitename} Set Global Variable ${OffsitecardNo} @@ -66,6 +79,18 @@ getInformation ${enterpriseMemberName} Get From Dictionary ${MemberInfo} enterpriseMemberName #企业员工name Set Global Variable ${enterpriseMemberId} Set Global Variable ${enterpriseMemberName} + #获取出货员工 + ${reps} GET On Session ztbf recycle-user-center/get/self-department-member-list params=enterpriseId=null&isPassFromBackstage=1 + ${OutMemberList} Get From Dictionary ${reps.json()['data']} records #获取员工列表 + FOR ${OutMemberInfo} IN @{OutMemberList} + ${OutCarNo} Get From Dictionary ${OutMemberInfo} cardNo #出货员工卡ID + ${OutMemberId} Get From Dictionary ${OutMemberInfo} enterpriseMemberId #出货员工id + ${OutMemberName} Get From Dictionary ${OutMemberInfo} enterpriseMemberName #出货员工name + Exit For Loop If '${OutMemberId}'=='738823017987182592' #判断南瓜员工id + END + Set Global Variable ${OutCarNo} + Set Global Variable ${OutMemberId} + Set Global Variable ${OutMemberName} #上传图片 ${filepath} Evaluate open('./21042217001449712.png','rb') ${image} Evaluate open('./21042217001449712.png','rb') @@ -75,3 +100,12 @@ getInformation ${reps} POST On Session order recycle-user-center/file-uploading/upload/image data=${type} files=${file_data} ${Image} Get From Dictionary ${reps.json()} data #获取图片阿里云地址 Set Global Variable ${Image} + #上传出货磅单图片 + ${OutFile} Evaluate open('./common_26091119022578881.jpg','rb') + ${OutImage} Evaluate open('./common_26091119022578881.jpg','rb') + ${File} Create Dictionary file=${OutFile} image=${OutImage} + ${type} Create Dictionary type=image + Create Session order ${ztbClient} ${Header} + ${reps} POST On Session order recycle-user-center/file-uploading/upload/image data=${type} files=${File} + ${OutboundImage} Get From Dictionary ${reps.json()} data #获取图片阿里云地址 + Set Global Variable ${OutboundImage} diff --git a/001-FactoryReceiptManual/Client/FactoryReceipt.robot b/001-FactoryReceiptManual/Client/FactoryReceipt.robot new file mode 100644 index 0000000..a6d58ae --- /dev/null +++ b/001-FactoryReceiptManual/Client/FactoryReceipt.robot @@ -0,0 +1,22 @@ +*** Settings *** +Library Collections +Library RequestsLibrary + +*** Test Cases *** +ReceiptOrder + #创建厂内收货订单--手工单 + Create Session ztbf ${ztbClient} ${client_header} + ${unitPrice} Set Variable 1.8 + ${netWeight} Set Variable 11000 + ${settleWeight} Set Variable 11000 + ${settlePrice} Evaluate ${unitPrice}*${settleWeight} + ${data} Set Variable { \ \ \ \ "deductType":1, \ \ \ \ "isWithoutTare":0, \ \ \ \ "status":null, \ \ \ \ "factoryCustomerId":"${CustomerId}", \ \ \ \ "factoryCustomerName":"${name}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "plateNumber":"55555", \ \ \ \ "productInfoList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "productId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "productName":"${categoryName}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "konePrice":"指导价格:${defaultUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "highestUnitPrice":"${highestUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "lowestUnitPrice":0, \ \ \ \ \ \ \ \ \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ \ \ \ \ \ \ \ \ "settlePrice":"${settlePrice}" \ \ \ \ \ \ \ \ } \ \ \ \ ] } + ${reps} POST On Session ztbf ztb-factory/save/scrap-paper-onside-receipt-order ${data.encode('utf-8')} + ${OrderId} Get From Dictionary ${reps.json()} data + Set Global Variable ${OrderId} + #审核过磅单 + ${auditData} Set Variable {"id":"${OrderId}"} + ${reps} POST On Session ztbf ztb-factory/factory/audit-pass/order ${auditData.encode('utf-8')} + #支付订单:现金、银行卡支付 + ${paymentData} Set Variable {"settleType":2,"ids":["${OrderId}"]} + ${reps} POST On Session ztbf ztb-factory/wechat-applet/merge-receiving-pay-order/pay ${paymentData.encode('utf-8')} diff --git a/002-FactoryReceiptSwipe/1-Client/FactoryReceipt.robot b/002-FactoryReceiptSwipe/1-Client/FactoryReceipt.robot new file mode 100644 index 0000000..f3814ee --- /dev/null +++ b/002-FactoryReceiptSwipe/1-Client/FactoryReceipt.robot @@ -0,0 +1,37 @@ +*** 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')} diff --git a/002-FactoryReceiptSwipe/2-FactoryBackstage/PaymentOperation.robot b/002-FactoryReceiptSwipe/2-FactoryBackstage/PaymentOperation.robot new file mode 100644 index 0000000..593135d --- /dev/null +++ b/002-FactoryReceiptSwipe/2-FactoryBackstage/PaymentOperation.robot @@ -0,0 +1,34 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library DateTime + +*** Test Cases *** +PaymentReview + #千鸟代付审核列表 + Create Session ztbf ${opsztb} ${ops_header} + ${reps} GET On Session ztbf ztb-factory/admin/get/agency-payment-order-audit-request-list params=status=&orderId=${ReceiptOrderId}&pageNum=1&pageSize=10 + ${AuditId} Get From Dictionary ${reps.json()['data']['records'][0]} id #代付审核id + #代付审核通过 + ${data} Set Variable { \ \ \ \ "id":"${AuditId}", \ \ \ \ "remark":"", \ \ \ \ "status":1 } + ${reps} POST On Session ztbf ztb-factory/admin/audit/agency-payment-order-audit-request ${data.encode('utf-8')} + +PaymentPayable + #代付应付 + Create Session ztbf ${opspsc} ${ops_header} + ${reps} GET On Session ztbf payment-settlement-center/admin/get/agency-payment-order-payable-list params=status=&pageNum=1&pageSize=10&orderId=${ReceiptOrderId} + ${PayId} Get From Dictionary ${reps.json()['data']['records'][0]} id #代付应付Id + #代付应付通过 + ${PayData} Set Variable { \ \ \ \ "id":"${PayId}", \ \ \ \ "isMergePayment":0, \ \ \ \ "auditStatus":1 } + ${reps} POST On Session ztbf payment-settlement-center/admin/audit/agency-payment-order-payable/${PayId} ${PayData.encode('utf-8')} + +PaymentReceivable + #代付应收 + Create Session ztbf ${opspsc} ${ops_header} + ${reps} GET On Session ztbf /payment-settlement-center/admin/get/agency-payment-order-receivable-list params=status=0&orderId=${ReceiptOrderId}&pageNum=1&pageSize=10 + ${ReceiveId} Get From Dictionary ${reps.json()['data']['records'][0]} id #代付应收id + ${receivablePrice} Get From Dictionary ${reps.json()['data']['records'][0]} receivablePrice #代付应收金额 + #确认收款 + ${Time} get current date result_format=%Y-%m-%d + ${ReceiveData} Set Variable { \ \ \ \ "id":"${ReceiveId}", \ \ \ \ "realReceivedPrice":"${receivablePrice}", \ \ \ \ "realReceivedTime":"${Time}" } + ${reps} POST On Session ztbf payment-settlement-center/admin/comfirm-receive/agency-payment-order-receivable-list ${ReceiveData.encode('utf-8')} diff --git a/003-FactoryOffsite/Client/FactoryOffsite.robot b/003-FactoryOffsite/Client/FactoryOffsite.robot new file mode 100644 index 0000000..b2d123a --- /dev/null +++ b/003-FactoryOffsite/Client/FactoryOffsite.robot @@ -0,0 +1,59 @@ +*** Settings *** +Library String +Library urllib3 +Library Collections +Library RequestsLibrary + +*** Test Cases *** +OffsiteOrder + #创建厂外收货订单 + Create Session ztbf ${ztbClient} ${client_header} + ${unitPrice} Set Variable 1.66 #单价(公斤) + ${plateNumber} Set Variable 粤M33333 #车牌号 + ${equipmentRemark} Set Variable NP-003 #设备 + ${ReceiptData} Set Variable { \ \ \ \ "productCategoryInfos":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "productId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "productCategoryName":"${categoryName}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "konePrice":"指导价格:${defaultUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "highestUnitPrice":"${highestUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "lowestUnitPrice":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "predictDeliveryToFactoryTime":null, \ \ \ \ "factoryCustomerId":"${OffsiteCustomerId}", \ \ \ \ "factoryCustomerName":"${Offsitename}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "driverId":"${enterpriseMemberId}", \ \ \ \ "driverName":"${enterpriseMemberName}" } + ${reps} POST On Session ztbf ztb-factory/create/scrap-paper-offsite-receipt-order ${ReceiptData.encode('utf-8')} + #外出收货订单列表 + ${reps} GET On Session ztbf ztb-factory/get/scrap-paper-offsite-receipt-order-list params=orderStatus=0&orderType=2&pageNum=1&pageSize=15 + ${OrderList} Get From Dictionary ${reps.json()['data']} records #订单列表 + FOR ${items} IN @{OrderList} + ${driverId} Get From Dictionary ${items} driverId #司机id + ${OffsiteOrderId} Get From Dictionary ${items} orderId #订单编号 + Exit For Loop If '${driverId}'=='${enterpriseMemberId}' + END + #外出收货订单详情 + ${reps} GET On Session ztbf ztb-factory/get/scrap-paper-offsite-receipt-order-detail params=id=${OffsiteOrderId} + ${scrapPaperPurchaseOrderId} Get From Dictionary ${reps.json()['data']['productCategoryInfos'][0]} scrapPaperPurchaseOrderId #收货订单id + #提交订单 + ${offsiteTareWeight} Set Variable 500 #皮重(公斤) + ${offsiteGrossWeight} Set Variable 1000 #毛重(公斤) + ${netWeight} Evaluate ${offsiteGrossWeight}-${offsiteTareWeight} + ${ReceiptWeight} Set Variable { \ \ \ \ "scrapPaperReceiptId":"${OffsiteOrderId}", \ \ \ \ "offsiteGrossWeight":"${offsiteGrossWeight}", \ \ \ \ "offsiteTareWeight":"${offsiteTareWeight}", \ \ \ \ "weightNoteList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "grossWeight":null, \ \ \ \ \ \ \ \ \ \ \ \ "tareWeight":null, \ \ \ \ \ \ \ \ \ \ \ \ "weightNoteImage":null, \ \ \ \ \ \ \ \ \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ \ \ \ \ \ \ \ \ "scrapPaperPurchaseOrderId":"${scrapPaperPurchaseOrderId}" \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "orderImageList":[ \ \ \ \ \ \ \ \ "${Image}", \ \ \ \ \ \ \ \ "${Image}", \ \ \ \ \ \ \ \ "${Image}" \ \ \ \ ] } + ${reps} POST On Session ztbf ztb-factory/submit/scrap-paper-offsite-receipt-weight-note ${ReceiptWeight.encode('utf-8')} + #确认定价 + ${OrderPrice} Set Variable { \ \ \ \ "scrapPaperReceiptId":"${OffsiteOrderId}", \ \ \ \ "productCategorySettleInfoDtoList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "productId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "scrapPaperPurchaseOrderId":"${scrapPaperPurchaseOrderId}", \ \ \ \ \ \ \ \ \ \ \ \ "deductWeight":null, \ \ \ \ \ \ \ \ \ \ \ \ "deductPercent":null, \ \ \ \ \ \ \ \ \ \ \ \ "settleUnitPrice":"${unitPrice}" \ \ \ \ \ \ \ \ } \ \ \ \ ] } + ${reps} POST On Session ztbf ztb-factory/submit/scrap-paper-offsite-receipt-order-price ${OrderPrice.encode('utf-8')} + #刷卡过毛重 + ${weight} Set Variable ${offsiteGrossWeight} + ${weighData} Set Variable {"cardNo":"${OffsitecardNo}","weight":${weight}} + ${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${weighData.encode('utf-8')} + ${orderId} Get From Dictionary ${reps.json()['data']} id #订单id + Set Global Variable ${orderId} + Should Be Equal As Strings ${reps.json()["message"]} 毛重称重成功,${weight}公斤,请下地磅 + #过磅审核通过 + ${ReceiptData} Set Variable {"scrapPaperReceiptId":"${OffsiteOrderId}"} + ${reps} POST On Session ztbf ztb-factory/renew/scrap-paper-offsite-receipt-order-price ${ReceiptData.encode('utf-8')} + #非代付 + #获取客户所有未支付订单 + ${reps} GET On Session ztbf ztb-factory/get/scrap-paper-offsite-receipt-order-list params=factoryCustomerId=${OffsiteCustomerId}&statusList=4%2C%2042&pageSize=100 + ${orderList} Get From Dictionary ${reps.json()['data']} records #客户所有订单列表 + ${List} Create List + FOR ${items} IN @{orderList} + ${orderId} Get From Dictionary ${items} orderId #客户订单id + Append To List ${List} ${orderId} + END + ${str} Convert To String ${List} + ${List} Replace String ${str} ' " + #支付订单 + ${paymentData} Set Variable { \ \ \ \ "settleType":2, \ \ \ \ "ids":${List}} + ${reps} POST On Session ztbf ztb-factory/wechat-applet/merge-receiving-pay-order/pay ${paymentData.encode('utf-8')} diff --git a/001-Client/3-FactoryOutbound.robot b/004-FactoryOutOrderManual/Client/FactoryOutbound.robot similarity index 100% rename from 001-Client/3-FactoryOutbound.robot rename to 004-FactoryOutOrderManual/Client/FactoryOutbound.robot diff --git a/005-FactoryOutSwipe/Client/FactoryOutbound.robot b/005-FactoryOutSwipe/Client/FactoryOutbound.robot new file mode 100644 index 0000000..7c07a5d --- /dev/null +++ b/005-FactoryOutSwipe/Client/FactoryOutbound.robot @@ -0,0 +1,64 @@ +*** Settings *** +Library Collections +Library RequestsLibrary + +*** Test Cases *** +OutboundDeviceOrder + #出货--刷卡单 + #第一次刷卡过磅--皮重 + Create Session ztbf ${ztbClient} ${client_header} + ${OutFirstWeight} Set Variable 2000 + ${OutFirstWeightData} Set Variable { \ \ \ \ "cardNo":"${OutCarNo}", \ \ \ \ "weight":"${OutFirstWeight}" } + ${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${OutFirstWeightData.encode('utf-8')} + ${OutWeightId} Get From Dictionary ${reps.json()['data']} id #刷卡过磅id + Should Be Equal As Strings ${reps.json()['message']} 第一次过磅成功,${OutFirstWeight}公斤,请下地磅 + #绑定磅单图片 + ${OutFirstBinding} Set Variable { \ \ \ \ "orderId":"${OutWeightId}", \ \ \ \ "imageUrl":"${OutboundImage}", \ \ \ \ "index":"1" } + ${reps} POST On Session ztbf /ztb-factory/binding/order-image ${OutFirstBinding.encode('utf-8')} + sleep 0.5 + #第二次刷卡过磅--毛重 + ${OutSecondWeight} Set Variable 4520 + ${OutSecondWeightData} Set Variable { \ \ \ \ "cardNo":"${OutCarNo}", \ \ \ \ "weight":"${OutSecondWeight}" } + ${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${OutSecondWeightData.encode('utf-8')} + Should Be Equal As Strings ${reps.json()['message']} 第二次过磅成功,${OutSecondWeight}公斤,请下地磅 + #绑定磅单图片 + ${OutSecondBinding} Set Variable { \ \ \ \ "orderId":"${OutWeightId}", \ \ \ \ "imageUrl":"${OutboundImage}", \ \ \ \ "index":"1" } + ${reps} POST On Session ztbf /ztb-factory/binding/order-image ${OutSecondBinding.encode('utf-8')} + sleep 0.5 + #出货列表 + ${reps} GET On Session ztbf ztb-factory/get/outbound-delivery-order-list params=pageNum=1&pageSize=15 + ${OutList} Get From Dictionary ${reps.json()['data']} records #出货列表 + FOR ${OutInfo} IN @{OutList} + ${OutId} Get From Dictionary ${OutInfo} id #出货id + ${status} Get From Dictionary ${OutInfo} status #出货订单状态 + ${factoryId} Get From Dictionary ${OutInfo} factoryId #出货工厂id + ${createTime} Get From Dictionary ${OutInfo} createTime #出货订单创建时间 + ${orderNumber} Get From Dictionary ${OutInfo} orderNumber #出货订单 + ${weightNoteId} Get From Dictionary ${OutInfo} weightNoteId #出货磅单id + ${NetWeight} Get From Dictionary ${OutInfo} outboundDeliveryNetWeight #出货总净重(公斤) + Exit For Loop If '${weightNoteId}'=='${OutWeightId}' #判断订单编号是否相等 + END + #确认出货 + ${unitPrice} Set Variable 2.35 #出货品类单价 + ${plateNumber} Set Variable 川F66666 #出货车牌号 + ${estimatedAmount} Evaluate ${unitPrice}*${NetWeight} #预估金额(元) + ${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 \ \ \ \ \ \ \ \ } \ \ \ \ ] } + ${reps} POST On Session ztbf ztb-factory/relevancy/weight-note/and/outbound-delivery-order ${OutboundOrderData.encode('utf-8')} + #出货审核通过 + ${OutAuditData} Set Variable {"id":"${OutId}","auditStatus":1} + ${reps} POST On Session ztbf ztb-factory/audit/outbount-delivery-order ${OutAuditData.encode('utf-8')} + #待付款列表 + ${reps} GET On Session ztbf ztb-factory/get/outbound-delivery-order-list params=pageNum=1&pageSize=15&status=1 + ${deliveryList} Get From Dictionary ${reps.json()['data']} records + FOR ${items} IN @{deliveryList} + ${id} Get From Dictionary ${items} id #订单编号 + ${productItemId} Get From Dictionary ${items['productItemList'][0]} id #订单项编号 + Exit For Loop If '${id}'=='${OutId}' + END + #确认付款 + ${paperMillNetWeight} Set Variable 10 #纸厂净重(吨) + ${deductPercent} Set Variable 2 #扣点(%) + ${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}" \ \ \ \ \ \ \ \ } \ \ \ \ ] } + ${reps} POST On Session ztbf ztb-factory/confirm/outbound-delivery-order-receipt ${OutPayData.encode('utf-8')} diff --git a/001-Client/1-FactoryReceipt.robot b/Factory/Client/1-FactoryReceipt.robot similarity index 68% rename from 001-Client/1-FactoryReceipt.robot rename to Factory/Client/1-FactoryReceipt.robot index b830ca6..dc7f38f 100644 --- a/001-Client/1-FactoryReceipt.robot +++ b/Factory/Client/1-FactoryReceipt.robot @@ -23,44 +23,35 @@ ReceiptOrder ReceiptWeigh #厂内收货--刷卡过磅 - #获取客户列表 - Create Session ztbf ${ztbClient} ${client_header} - ${reps} GET On Session ztbf ztb-factory/factory/get/customer-list params=name=&pageNum=1&pageSize=1500 - ${customerList} Get From Dictionary ${reps.json()['data']} records #客户列表 - FOR ${CustomerInfo} IN @{customerList} - ${name} Get From Dictionary ${CustomerInfo} name #客户姓名 - ${cardNo} Get From Dictionary ${CustomerInfo} cardNo #客户卡ID - ${CustomerId} Get From Dictionary ${CustomerInfo} id #客户唯一标识 - Exit For Loop If '${CustomerId}'=='136' - END #刷卡过磅--过毛重 + Create Session ztbf ${ztbClient} ${client_header} ${weight} Set Variable 2410 - ${weighData} Set Variable {"cardNo":"${cardNo}","weight":${weight}} + ${weighData} Set Variable {"cardNo":"${ReceiptcardNo}","weight":${weight}} ${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${weighData.encode('utf-8')} - ${orderId} Get From Dictionary ${reps.json()['data']} id #订单id - Set Global Variable ${orderId} + ${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/${orderId} + ${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":"${orderId}", \ \ \ \ "productInfoDtoList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "productId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "productName":"${categoryName}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":"2.1", \ \ \ \ \ \ \ \ \ \ \ \ "proportionOfProduct":"${proportionOfProduct}", \ \ \ \ \ \ \ \ \ \ \ \ "konePrice":"指导价格:${defaultUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "highestUnitPrice":"${highestUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "lowestUnitPrice":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "plateNumber":${plateNumber}, \ \ \ \ "factoryCustomerId":"${CustomerId}", \ \ \ \ "deductType":1, \ \ \ \ "inspectionRemark":"确定定价", \ \ \ \ "isWithoutTare":"${isWithoutTare}" } + ${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":"${cardNo}","weight":${weightTare}} + ${weighData} Set Variable {"cardNo":"${ReceiptcardNo}","weight":${weightTare}} ${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${weighData.encode('utf-8')} - ${orderId} Get From Dictionary ${reps.json()['data']} id #订单id + ${ReceiptOrderId} Get From Dictionary ${reps.json()['data']} id #订单id Should Be Equal As Strings ${reps.json()["message"]} 皮重称重成功,${weightTare}公斤,正在打印磅单 #过磅审核 - ${auditData} Set Variable {"id":"${OrderId}"} + ${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":["${OrderId}"]} + ${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')} Print_weight_order diff --git a/001-Client/2-FactoryOffsite.robot b/Factory/Client/2-FactoryOffsite.robot similarity index 100% rename from 001-Client/2-FactoryOffsite.robot rename to Factory/Client/2-FactoryOffsite.robot diff --git a/Factory/Client/3-FactoryOutbound.robot b/Factory/Client/3-FactoryOutbound.robot new file mode 100644 index 0000000..5cd47fe --- /dev/null +++ b/Factory/Client/3-FactoryOutbound.robot @@ -0,0 +1,100 @@ +*** Settings *** +Library Collections +Library RequestsLibrary + +*** Test Cases *** +OutboundOrder + #出货--手工单 + Create Session ztbf ${ztbClient} ${client_header} + ${netWeight} Set Variable 5000 #净重(公斤) + ${unitPrice} Set Variable 2.02 #单价(元/公斤) + ${konePrice} Evaluate ${defaultUnitPrice}*1000 #指导价格 + ${plateNumber} Set Variable 沪H22222 #车牌号 + ${estimatedAmount} Evaluate ${netWeight}*${unitPrice} + ${OutData} Set Variable { \ \ \ \ "isHandworkOrder":1, \ \ \ \ "estimatedAmount":"${estimatedAmount}", \ \ \ \ "deliveryChannelType":1, \ \ \ \ "factoryDeliveryChannelId":"${ChannelId}", \ \ \ \ "consigneeName":"${ChannelName}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "outboundDeliveryOrderProductItemList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "productId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "productName":"${categoryName}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "productCategoryId":"${productcategoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "konePrice":"指导价格:${konePrice}", \ \ \ \ \ \ \ \ \ \ \ \ "highestUnitPrice":"${highestUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "lowestUnitPrice":0, \ \ \ \ \ \ \ \ \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ \ \ \ \ \ \ \ \ "settleWeight":null, \ \ \ \ \ \ \ \ \ \ \ \ "deductPercent":null, \ \ \ \ \ \ \ \ \ \ \ \ "estimatedAmount":"${estimatedAmount}" \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "weightNoteImageUrls":[ \ \ \ \ \ ] } + ${reps} POST On Session ztbf ztb-factory/save/outbound-delivery-order ${OutData.encode('utf-8')} + #待审核列表 + ${reps} GET On Session ztbf ztb-factory/get/outbound-delivery-order-list params=pageNum=1&pageSize=15&status=0 + ${weightNoteList} Get From Dictionary ${reps.json()['data']} records #待审核列表 + FOR ${items} IN @{weightNoteList} + ${OrderId} Get From Dictionary ${items} id #出货订单id + ${productId} Get From Dictionary ${items} productId #纸品id + Exit For Loop If '${productId}'=='${categoryId}' + END + #磅单审核通过 + ${auditData} Set Variable {"id":"${OrderId}","auditStatus":1} + ${reps} POST On Session ztbf ztb-factory/audit/outbount-delivery-order ${auditData.encode('utf-8')} + #待付款列表 + ${reps} GET On Session ztbf ztb-factory/get/outbound-delivery-order-list params=pageNum=1&pageSize=15&status=1 + ${deliveryList} Get From Dictionary ${reps.json()['data']} records + FOR ${items} IN @{deliveryList} + ${id} Get From Dictionary ${items} id #订单编号 + ${productItemId} Get From Dictionary ${items['productItemList'][0]} id #订单项编号 + Exit For Loop If '${id}'=='${OrderId}' + END + #确认付款 + ${paperMillNetWeight} Set Variable 13 #纸厂净重(吨) + ${deductPercent} Set Variable 2.1 #扣点(%) + ${settleWeight} Evaluate ${paperMillNetWeight}-${paperMillNetWeight}*${deductPercent}/1000 #结算重量(吨) + ${PayData} Set Variable { \ \ \ \ "id":"${OrderId}", \ \ \ \ "categoryId":"${categoryId}", \ \ \ \ "otherFee":0, \ \ \ \ "subsidy":0, \ \ \ \ "proxyPaySurcharge":0, \ \ \ \ "freight":0, \ \ \ \ "outboundDeliveryOrderProductItemList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "settlementProductId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "id":"${productItemId}", \ \ \ \ \ \ \ \ \ \ \ \ "paperMillNetWeight":"${paperMillNetWeight}", \ \ \ \ \ \ \ \ \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ \ \ \ \ \ \ \ \ "deductPercent":"${deductPercent}", \ \ \ \ \ \ \ \ \ \ \ \ "settleUnitPrice":"${unitPrice}" \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "factoryId":"${factoryId}" } + ${reps} POST On Session ztbf ztb-factory/confirm/outbound-delivery-order-receipt ${PayData.encode('utf-8')} + +OutboundDeviceOrder + #出货--刷卡单 + #第一次刷卡过磅--皮重 + Create Session ztbf ${ztbClient} ${client_header} + ${OutFirstWeight} Set Variable 2000 + ${OutFirstWeightData} Set Variable { \ \ \ \ "cardNo":"${OutCarNo}", \ \ \ \ "weight":"${OutFirstWeight}" } + ${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${OutFirstWeightData.encode('utf-8')} + ${OutWeightId} Get From Dictionary ${reps.json()['data']} id #刷卡过磅id + Should Be Equal As Strings ${reps.json()['message']} 第一次过磅成功,${OutFirstWeight}公斤,请下地磅 + #绑定磅单图片 + ${OutFirstBinding} Set Variable { \ \ \ \ "orderId":"${OutWeightId}", \ \ \ \ "imageUrl":"${OutboundImage}", \ \ \ \ "index":"1" } + ${reps} POST On Session ztbf /ztb-factory/binding/order-image ${OutFirstBinding.encode('utf-8')} + sleep 0.5 + #第二次刷卡过磅--毛重 + ${OutSecondWeight} Set Variable 4520 + ${OutSecondWeightData} Set Variable { \ \ \ \ "cardNo":"${OutCarNo}", \ \ \ \ "weight":"${OutSecondWeight}" } + ${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${OutSecondWeightData.encode('utf-8')} + Should Be Equal As Strings ${reps.json()['message']} 第二次过磅成功,${OutSecondWeight}公斤,请下地磅 + #绑定磅单图片 + ${OutSecondBinding} Set Variable { \ \ \ \ "orderId":"${OutWeightId}", \ \ \ \ "imageUrl":"${OutboundImage}", \ \ \ \ "index":"1" } + ${reps} POST On Session ztbf /ztb-factory/binding/order-image ${OutSecondBinding.encode('utf-8')} + sleep 0.5 + #出货列表 + ${reps} GET On Session ztbf ztb-factory/get/outbound-delivery-order-list params=pageNum=1&pageSize=15 + ${OutList} Get From Dictionary ${reps.json()['data']} records #出货列表 + FOR ${OutInfo} IN @{OutList} + ${OutId} Get From Dictionary ${OutInfo} id #出货id + ${status} Get From Dictionary ${OutInfo} status #出货订单状态 + ${factoryId} Get From Dictionary ${OutInfo} factoryId #出货工厂id + ${createTime} Get From Dictionary ${OutInfo} createTime #出货订单创建时间 + ${orderNumber} Get From Dictionary ${OutInfo} orderNumber #出货订单 + ${weightNoteId} Get From Dictionary ${OutInfo} weightNoteId #出货磅单id + ${NetWeight} Get From Dictionary ${OutInfo} outboundDeliveryNetWeight #出货总净重(公斤) + Exit For Loop If '${weightNoteId}'=='${OutWeightId}' #判断订单编号是否相等 + END + #确认出货 + ${unitPrice} Set Variable 2.35 #出货品类单价 + ${plateNumber} Set Variable 川F66666 #出货车牌号 + ${estimatedAmount} Evaluate ${unitPrice}*${NetWeight} #预估金额(元) + ${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 \ \ \ \ \ \ \ \ } \ \ \ \ ] } + ${reps} POST On Session ztbf ztb-factory/relevancy/weight-note/and/outbound-delivery-order ${OutboundOrderData.encode('utf-8')} + #出货审核通过 + ${OutAuditData} Set Variable {"id":"${OutId}","auditStatus":1} + ${reps} POST On Session ztbf ztb-factory/audit/outbount-delivery-order ${OutAuditData.encode('utf-8')} + #待付款列表 + ${reps} GET On Session ztbf ztb-factory/get/outbound-delivery-order-list params=pageNum=1&pageSize=15&status=1 + ${deliveryList} Get From Dictionary ${reps.json()['data']} records + FOR ${items} IN @{deliveryList} + ${id} Get From Dictionary ${items} id #订单编号 + ${productItemId} Get From Dictionary ${items['productItemList'][0]} id #订单项编号 + Exit For Loop If '${id}'=='${OutId}' + END + #确认付款 + ${paperMillNetWeight} Set Variable 10 #纸厂净重(吨) + ${deductPercent} Set Variable 2 #扣点(%) + ${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}" \ \ \ \ \ \ \ \ } \ \ \ \ ] } + ${reps} POST On Session ztbf ztb-factory/confirm/outbound-delivery-order-receipt ${OutPayData.encode('utf-8')} diff --git a/002-FactoryBackstage/1-PaymentOperation.robot b/Factory/FactoryBackstage/1-PaymentOperation.robot similarity index 93% rename from 002-FactoryBackstage/1-PaymentOperation.robot rename to Factory/FactoryBackstage/1-PaymentOperation.robot index 988d3aa..593135d 100644 --- a/002-FactoryBackstage/1-PaymentOperation.robot +++ b/Factory/FactoryBackstage/1-PaymentOperation.robot @@ -7,7 +7,7 @@ Library DateTime PaymentReview #千鸟代付审核列表 Create Session ztbf ${opsztb} ${ops_header} - ${reps} GET On Session ztbf ztb-factory/admin/get/agency-payment-order-audit-request-list params=status=&orderId=${orderId}&pageNum=1&pageSize=10 + ${reps} GET On Session ztbf ztb-factory/admin/get/agency-payment-order-audit-request-list params=status=&orderId=${ReceiptOrderId}&pageNum=1&pageSize=10 ${AuditId} Get From Dictionary ${reps.json()['data']['records'][0]} id #代付审核id #代付审核通过 ${data} Set Variable { \ \ \ \ "id":"${AuditId}", \ \ \ \ "remark":"", \ \ \ \ "status":1 } @@ -16,7 +16,7 @@ PaymentReview PaymentPayable #代付应付 Create Session ztbf ${opspsc} ${ops_header} - ${reps} GET On Session ztbf payment-settlement-center/admin/get/agency-payment-order-payable-list params=status=&pageNum=1&pageSize=10&orderId=${orderId} + ${reps} GET On Session ztbf payment-settlement-center/admin/get/agency-payment-order-payable-list params=status=&pageNum=1&pageSize=10&orderId=${ReceiptOrderId} ${PayId} Get From Dictionary ${reps.json()['data']['records'][0]} id #代付应付Id #代付应付通过 ${PayData} Set Variable { \ \ \ \ "id":"${PayId}", \ \ \ \ "isMergePayment":0, \ \ \ \ "auditStatus":1 } @@ -25,7 +25,7 @@ PaymentPayable PaymentReceivable #代付应收 Create Session ztbf ${opspsc} ${ops_header} - ${reps} GET On Session ztbf /payment-settlement-center/admin/get/agency-payment-order-receivable-list params=status=0&orderId=${orderId}&pageNum=1&pageSize=10 + ${reps} GET On Session ztbf /payment-settlement-center/admin/get/agency-payment-order-receivable-list params=status=0&orderId=${ReceiptOrderId}&pageNum=1&pageSize=10 ${ReceiveId} Get From Dictionary ${reps.json()['data']['records'][0]} id #代付应收id ${receivablePrice} Get From Dictionary ${reps.json()['data']['records'][0]} receivablePrice #代付应收金额 #确认收款 diff --git a/Login/__init__.robot b/Test/Login/__init__.robot similarity index 100% rename from Login/__init__.robot rename to Test/Login/__init__.robot diff --git a/Login/factory.robot b/Test/Login/factory.robot similarity index 100% rename from Login/factory.robot rename to Test/Login/factory.robot diff --git a/Login/关键字.robot b/Test/Login/关键字.robot similarity index 100% rename from Login/关键字.robot rename to Test/Login/关键字.robot diff --git a/ZTB小程序/出货.robot b/Test/ZTB小程序/出货.robot similarity index 100% rename from ZTB小程序/出货.robot rename to Test/ZTB小程序/出货.robot diff --git a/ZTB小程序/厂内收货.robot b/Test/ZTB小程序/厂内收货.robot similarity index 100% rename from ZTB小程序/厂内收货.robot rename to Test/ZTB小程序/厂内收货.robot diff --git a/ZTB小程序/厂外收货.robot b/Test/ZTB小程序/厂外收货.robot similarity index 100% rename from ZTB小程序/厂外收货.robot rename to Test/ZTB小程序/厂外收货.robot diff --git a/ZTB小程序/常规代卖.robot b/Test/ZTB小程序/常规代卖.robot similarity index 100% rename from ZTB小程序/常规代卖.robot rename to Test/ZTB小程序/常规代卖.robot diff --git a/ZTB小程序/登录.robot b/Test/ZTB小程序/登录.robot similarity index 100% rename from ZTB小程序/登录.robot rename to Test/ZTB小程序/登录.robot diff --git a/__init__.txt b/Test/__init__.txt similarity index 100% rename from __init__.txt rename to Test/__init__.txt diff --git a/log.html b/Test/log.html similarity index 100% rename from log.html rename to Test/log.html diff --git a/output.xml b/Test/output.xml similarity index 100% rename from output.xml rename to Test/output.xml diff --git a/report.html b/Test/report.html similarity index 100% rename from report.html rename to Test/report.html diff --git a/ztb-factory.sh b/Test/ztb-factory.sh old mode 100755 new mode 100644 similarity index 100% rename from ztb-factory.sh rename to Test/ztb-factory.sh diff --git a/系统设置/员工管理.robot b/Test/系统设置/员工管理.robot similarity index 100% rename from 系统设置/员工管理.robot rename to Test/系统设置/员工管理.robot diff --git a/common_26091119022578881.jpg b/common_26091119022578881.jpg new file mode 100644 index 0000000..678a9bd Binary files /dev/null and b/common_26091119022578881.jpg differ