Verify that you have JavaScript enabled in your browser.
+
Make sure you are using a modern enough browser. If using Internet Explorer, version 11 is required.
+
Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/000-Regularorder/1-Client(Test)/output.xml b/000-Regularorder/1-Client(Test)/output.xml
new file mode 100644
index 0000000..f0ff275
--- /dev/null
+++ b/000-Regularorder/1-Client(Test)/output.xml
@@ -0,0 +1,335 @@
+
+
+
+
+
+ZTBT
+${url}
+${headers}
+Create Session: create a HTTP session to a server
+Variable '${headers}' not found.
+
+
+
+${repsponse}
+ZTBT
+recycle-service/proxy-sell-activity/list
+params=pageNum=1&pageSize=15
+Sends a GET request on a previously created HTTP Session.
+
+
+
+${records}
+${repsponse.json()["data"]}
+records
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${item}
+@{records}
+
+${item}
+
+${activityName}
+${item}
+activityName
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${paperCategoryList}
+${item}
+paperCategoryList
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${paperMillId}
+${item}
+paperMillId
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${activityId}
+${item}
+activityId
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+'${activityName}'=='无账期活动一次'
+Stops executing the enclosing for loop if the ``condition`` is true.
+
+
+
+
+
+
+
+${Category_value}
+random.choice(${paperCategoryList})
+random
+Evaluates the given expression in Python and returns the result.
+
+
+
+\nvalue: ${Category_value}
+Logs the given message to the console.
+
+
+
+${categoryId}
+${Category_value}
+categoryId
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${categoryName}
+${Category_value}
+categoryName
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${unitPrice}
+${Category_value}
+unitPrice
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${paperMillId}
+Makes a variable available globally in all tests and suites.
+
+
+
+${activityId}
+Makes a variable available globally in all tests and suites.
+
+
+
+${categoryId}
+Makes a variable available globally in all tests and suites.
+
+
+
+${categoryName}
+Makes a variable available globally in all tests and suites.
+
+
+
+${unitPrice}
+Makes a variable available globally in all tests and suites.
+
+
+Variable '${headers}' not found.
+
+
+
+get-carinfo
+${url}
+${headers}
+Create Session: create a HTTP session to a server
+Variable '${headers}' not found.
+
+
+
+${reps}
+get-carinfo
+recycle-service/proxy-sell/get/his-car-info
+Sends a GET request on a previously created HTTP Session.
+
+
+
+${reps.json()}
+Logs the given message with the given level.
+
+
+
+${carNumber}
+${reps.json()["data"]}
+records
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${plateNumber_value}
+random.sample(${carNumber},1)
+random
+Evaluates the given expression in Python and returns the result.
+
+
+
+\nvalue:${plateNumber_value}
+Logs the given message to the console.
+
+
+
+${plateNumber1}
+${plateNumber_value[0]}
+plateNumber
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${plateNumber1}
+Makes a variable available globally in all tests and suites.
+
+
+Variable '${headers}' not found.
+
+
+
+ZTBT
+${url}
+${headers}
+Create Session: create a HTTP session to a server
+Variable '${headers}' not found.
+
+
+
+${reps}
+ZTBT
+recycle-service/get/paper-mill-paper-category-price-details/${paperMillId}
+Sends a GET request on a previously created HTTP Session.
+
+
+
+${reps.json()}
+Logs the given message with the given level.
+
+
+Variable '${headers}' not found.
+
+
+
+ZTBT
+${url}
+${headers}
+Create Session: create a HTTP session to a server
+Variable '${headers}' not found.
+
+
+
+${reps}
+ZTBT
+recycle-service/proxy-sell/get/relation
+Sends a GET request on a previously created HTTP Session.
+
+
+
+${bizUserId}
+${reps.json()["data"]}
+bizUserId
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${cusormerId}
+${reps.json()["data"]}
+cusormerId
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${customerName}
+${reps.json()["data"]}
+customerName
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${bizUserId}
+Makes a variable available globally in all tests and suites.
+
+
+
+${cusormerId}
+Makes a variable available globally in all tests and suites.
+
+
+
+${customerName}
+Makes a variable available globally in all tests and suites.
+
+
+Variable '${headers}' not found.
+
+
+
+ZTBT
+${url}
+${headers}
+Create Session: create a HTTP session to a server
+Variable '${headers}' not found.
+
+
+
+${datatime}
+result_format=%Y-%m-%d
+Returns current local or UTC time with an optional increment.
+
+
+
+${order_data}
+{ \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "totalEstimatedWeight":30000, \ \ \ \ "activityId":"${activityId}", \ \ \ \ "customerName":"${customerName}", \ \ \ \ "deliveryTime":"${datatime}", \ \ \ \ "carInfos":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "plateNumber":"${plateNumber1}" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
+Returns the given values which can then be assigned to a variables.
+
+
+
+${reps}
+ZTBT
+recycle-service/proxy-sell/create/order
+${order_data.encode('utf-8')}
+Sends a POST request on a previously created HTTP Session.
+
+
+
+${reps.json()}
+Logs the given message with the given level.
+
+
+
+${orderId}
+${reps.json()["data"]}
+orderId
+Returns a value from the given ``dictionary`` based on the given ``key``.
+
+
+
+${reps.json()["message"]}
+successful
+Fails if objects are unequal after converting them to strings.
+
+
+
+${orderId}
+Makes a variable available globally in all tests and suites.
+
+
+
+${datatime}
+Makes a variable available globally in all tests and suites.
+
+
+Variable '${headers}' not found.
+
+
+
+
+
+All Tests
+
+
+
+
+2.2createActiveorder-1
+
+
+
+Error in file '/root/ztb-trading-rf-api/ztb-trading-rf-api/1-Client(Test)/2.2createActiveorder-1.robot' on line 8: Setting variable '${headers}' failed: Variable '${gettoken}' not found.
+
+
diff --git a/000-Regularorder/1-Client(Test)/report.html b/000-Regularorder/1-Client(Test)/report.html
new file mode 100644
index 0000000..cf9d1a3
--- /dev/null
+++ b/000-Regularorder/1-Client(Test)/report.html
@@ -0,0 +1,2461 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Opening Robot Framework report failed
+
+
Verify that you have JavaScript enabled in your browser.
+
Make sure you are using a modern enough browser. If using Internet Explorer, version 11 is required.
+
Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/000-Regularorder/2-Background_system(Test)/1-WebLogin/weblogin.robot b/000-Regularorder/2-Background_system(Test)/1-WebLogin/weblogin.robot
new file mode 100644
index 0000000..f08ffc4
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/1-WebLogin/weblogin.robot
@@ -0,0 +1,21 @@
+*** Settings ***
+Library RequestsLibrary
+
+*** Test Cases ***
+pwlogin
+ ${header} Create Dictionary Content-Type=application/x-www-form-urlencoded X-APP-ID=470236309865238555
+ Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header}
+ &{data} Create Dictionary username=laiyonglan@qniao.cn password=qn123456
+ log ${data}
+ ${reps} Post On Session ZTBT recycle-service/admin/login data=${data}
+ log ${reps.json()}
+ ${gettoken} Set Variable Token 6b08add42d6bcf73abb935b2adf83525
+ Should Be Equal As Strings ${reps.json()["message"]} 登陆成功
+ Set Global Variable ${gettoken}
+
+login-info
+ ${header} Create Dictionary X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525
+ Create Session login-info http://api-ops-ztb-test.qniao.cn ${header}
+ ${reps_data} Get On Session login-info recycle-service/admin/employee/get/login-info
+ log ${reps_data}
+ Should Be Equal As Strings ${reps_data.json()["message"]} successful
diff --git a/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot
new file mode 100644
index 0000000..60ad6a2
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot
@@ -0,0 +1,57 @@
+*** Settings ***
+Documentation 预约送货
+Library RequestsLibrary
+Library Collections
+Library DateTime
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_paper-mill-order-reservation-list
+ Create Session ZTBT ${URL} ${header}
+ ${reps_data} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-order-reservation-list params=pageNum=1&pageSize=10&status=&orderId=${orderId}
+ log ${reps_data.json()}
+ #获取订单编号${orderId}、纸厂id${paperMillId}、订单类型${orderType}
+ ${orderId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderId #订单编号
+ ${paperMillId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillId #纸厂id
+ ${id} Get From Dictionary ${reps_data.json()["data"]["records"][0]} id #预约id
+ ${orderType} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderType #订单类型
+ ${carNoList} Get From Dictionary ${reps_data.json()["data"]["records"][0]} carNoList #车辆信息列表
+ ${paperMillName} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillName #纸厂名称
+ ${sellerReservationDate} Get From Dictionary ${reps_data.json()["data"]["records"][0]} sellerReservationDate #送货时间
+ #随机获取车辆信息
+ ${carList} Evaluate random.choice(${carNoList}) random
+ log to console \nvalue:${carList}
+ Should Be Equal As Strings ${reps_data.json()["message"]} successful
+ Set Global Variable ${orderId}
+ Set Global Variable ${paperMillId}
+ Set Global Variable ${id}
+ Set Global Variable ${paperMillName}
+ Set Global Variable ${sellerReservationDate}
+ Set Global Variable ${orderType}
+ Set Global Variable ${carList}
+
+get-supplier
+ Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId}
+ log ${reps.json()}
+ #获取供应商id和name
+ ${data} Get From Dictionary ${reps.json()} data
+ ${value} Evaluate random.choice(${data}) random
+ log to console \nvalue: ${value}
+ ${supplier_id} Get From Dictionary ${value} id #供应商id
+ ${millSupplierName} Get From Dictionary ${value} name #供应商名称
+ Set Global Variable ${supplier_id}
+ Set Global Variable ${millSupplierName}
+
+Submit-appointment
+ #${headers} Create Dictionary Content-Type=application/json X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525
+ #提交预约信息
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} get current date result_format=%Y-%m-%d
+ ${data} Set Variable {"attention":"${orderId}","buyerReservationDate":"${datatime}", "id":"${id}","millDeliveryOrderId":"${orderId}","millSupplierId":"${supplier_id}","millSupplierName":"${millSupplierName}","proxySellerSettleType":0,"scrapeOrderId":"${orderId}"}
+ log ${data}
+ ${reps} Post On Session ZTBT recycle-service/admin/customer-service/update/reservation ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
diff --git a/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/2.1-RegularUpload-weightnote.robot b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/2.1-RegularUpload-weightnote.robot
new file mode 100644
index 0000000..05b4007
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/2.1-RegularUpload-weightnote.robot
@@ -0,0 +1,211 @@
+*** Settings ***
+Documentation 上传磅单-常规
+Test Timeout
+Library Collections
+Library RequestsLibrary
+Library DateTime
+Library requests
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get-order-item-list
+ #查找预约的订单项列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order-item-list params=orderType=${orderType} &pageNum=1&pageSize=10&status=51&orderId=${orderId}
+ log ${reps.json()}
+ ${orderItemId} Get From Dictionary ${reps.json()["data"]["records"][0]} orderItemId #订单项编号
+ ${bizOwnerName} Get From Dictionary ${reps.json()["data"]["records"][0]} bizOwnerName #业务归属人name
+ ${bizOwnerId} Get From Dictionary ${reps.json()["data"]["records"][0]} bizOwnerId #业务归属人id
+ Set Global Variable ${orderItemId}
+ Should Be Equal ${reps.json()["data"]["records"][0]["orderId"]} ${orderId}
+
+get-order-item-details
+ #查看订单列表详情
+ 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"]} 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
+ #${activitySettleType} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} activitySettleType #活动结算方式(0:70%,1:85%,2:全额)
+ log ${contractId}
+ 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 ${activitySettleType}
+
+get-Transaction subject
+ #获取交易主体
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/transaction-main-enterprise/list
+ ${交易数据} Get From Dictionary ${reps.json()} data
+ #随机获取交易主体
+ ${交易信息} Evaluate random.choice(${交易数据}) random
+ log to console \nvalue:${交易信息}
+ ${交易主体id} Get From Dictionary ${交易信息} id #交易主体id
+ ${交易主体name} Get From Dictionary ${交易信息} name #交易主体name
+ Set Global Variable ${交易主体id}
+ Set Global Variable ${交易主体name}
+
+get-Warehouse
+ #获取所属仓库
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/transaction-main-enterprise/get/warehouse-name
+ ${仓库} Get From Dictionary ${reps.json()} data
+ #随机获取仓库
+ ${所属仓库} Evaluate random.choice(${仓库}) random
+ log to console \nvalue:${所属仓库}
+ Set Global Variable ${所属仓库}
+
+get-Source of funds
+ #获取资金来源
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/fund-source/get/list
+ log ${reps.json()}
+ ${data} Get From Dictionary ${reps.json()} data
+ FOR ${item} IN @{data}
+ log ${item}
+ ${isDefault} Get From Dictionary ${item} isDefault #获取启用状态
+ ${name} Get From Dictionary ${item} name #获取name
+ ${id} Get From Dictionary ${item} id #获取id
+ Exit For Loop If '${isDefault}'=='1'
+ END
+ Set Global Variable ${name}
+ Set Global Variable ${id}
+
+get-contract-list
+ #获取订单纸厂的所有合同信息
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT /recycle-service/admin/contract/get/selectable-contract-list params=orderItemId=${orderItemId}
+ log ${reps.json()}
+
+get-supplier
+ #获取纸厂供应商
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId}
+ log ${reps.json()}
+
+get-category price
+ #获取下单品类,上传磅单时的价格
+ Create Session ZTBT ${URL} ${header}
+ ${dataTime} Get Current Date result_format=%Y-%m-%d
+ ${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get-category-price-by-date params=orderItemId=${orderItemId}&weightDay=${dataTime}
+ log ${reps.json()}
+ ${price} Get From Dictionary ${reps.json()["data"][0]} price #下单品类价格
+ ${publicSubsidies} Get From Dictionary ${reps.json()["data"][0]} publicSubsidies #下单品类公开补贴
+ Set Global Variable ${price}
+ Set Global Variable ${publicSubsidies}
+ Set Global Variable ${dataTime}
+
+get_paper-mill-category
+ #获取当前纸厂的所有纸品品类
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-category/${paperMillId} params=id=${paperMillId}
+ log ${reps.json()}
+
+get_contract_by_id
+ #获取下单时绑定的合同
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/contract/get/detail-by-id params=id=${contractId}
+ log ${reps.json()}
+ #获取垫资费、企业ID、应收金额结算规则、含税结算单价结算规则
+ ${advanceFund} Get From Dictionary ${reps.json()["data"]} advanceFund #垫资费
+ ${buyerEnterpriseId} Get From Dictionary ${reps.json()["data"]} buyerEnterpriseId #企业id
+ ${settleRules} Get From Dictionary ${reps.json()["data"]} settleRules #应收金额结算规则
+ ${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则
+ ${taxRefundRate} Get From Dictionary ${reps.json()["data"]} taxRefundRate #税点
+ ${proxyPaySurcharge} Get From Dictionary ${reps.json()["data"]} proxyPaySurcharge #代收费
+ ${hasInvoice} Get From Dictionary ${reps.json()["data"]} hasInvoice #是否开票
+ ${accountPeriodType} Get From Dictionary ${reps.json()["data"]} accountPeriodType #账期类型
+ ${isSubsidyAndDeductIncludeTax} Get From Dictionary ${reps.json()["data"]} isSubsidyAndDeductIncludeTax #纸厂补贴是否含税
+ ${receivableSettlementRules} Get From Dictionary ${reps.json()["data"]} settleRules #应收金额结算规则
+ ${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则
+ ${advanceFund} Set Variable If '${advanceFund}'=='${None}' 0 ${advanceFund}
+ ${proxyPaySurcharge} Set Variable If '${proxyPaySurcharge}'=='${None}' 0 ${proxyPaySurcharge}
+ ${taxRefundRate} Set Variable If '${taxRefundRate}'=='${None}' 0 ${taxRefundRate}
+ Set Global Variable ${advanceFund}
+ Set Global Variable ${buyerEnterpriseId}
+ Set Global Variable ${taxRefundRate}
+ Set Global Variable ${proxyPaySurcharge}
+ Set Global Variable ${hasInvoice}
+ Set Global Variable ${accountPeriodType}
+ Set Global Variable ${settleRules}
+ Set Global Variable ${settlePriceIncludeTaxSettleRules}
+ Set Global Variable ${isSubsidyAndDeductIncludeTax}
+ Set Global Variable ${receivableSettlementRules}
+ Set Global Variable ${settlePriceIncludeTaxSettleRules}
+
+Upload_pictures
+ #上传图片
+ #${dict} Create Dictionary Content-Type=image/jpeg filename=20210803.jpg
+ #Create Session ZTBT ${URL} ${dict}
+ ${filepath} Evaluate open('./21042217001449712.png','rb')
+ ${image} Evaluate open('./21042217001449712.png','rb')
+ ${file} Create Dictionary filepath=${filepath} image=${image}
+ Create Session ZTBT ${URL}
+ log ${file}
+ ${result} Post On Session ZTBT recycle-user-center/upload/image files=${file}
+ ${pictures} Get From Dictionary ${result.json()} data
+ log ${result.content}
+ Set Global Variable ${pictures}
+
+get_repeat_proxy-order
+ #获取重复订单信息
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/repeat/proxy-order params=orderItemId=${orderItemId}&plateNumber=${carList}&settleWeight=17550&weighingDate=${datatime}&orderType=${orderType}&settlePrice= 41953.05
+ ${records} Get From Dictionary ${reps.json()["data"]} records #获取重复订单列表
+ ${orderItemId_list} Create List
+ #sleep 0.5
+ FOR ${items} IN @{records}
+ ${orderItemId} Get From Dictionary ${items} orderItemId #重复订单项编号
+ Append To List ${orderItemId_list} '''${orderItemId}'''
+ END
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ Set Global Variable ${orderItemId_list}
+
+repeat_proxy-order
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "remark":"${datatime}", \ \ \ \ "repeatOrderItem":${orderItemId_list} }
+ ${reps} Post On Session ZTBT recycle-service/admin/customer-service/confirm/repeat/proxy-order ${data.encode('utf-8')}
+
+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":"100", \ \ \ \ "refundSubsidy":0.002, \ \ \ \ "adjustMoney":"0", \ \ \ \ "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":"${settleUtiPrice}", \ \ \ \ "netWeight":300, \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "isSubsidyAndDeductIncludeTax":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "settleWeight":230, \ \ \ \ "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 \ \ \ \ \ \ \ \ } \ \ \ \ ] }
+ log ${data}
+ ${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/save/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()}
+
+get_proxy-order
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId}
+ log ${reps.json()}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
diff --git a/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/3.1-Operation_audit.robot b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/3.1-Operation_audit.robot
new file mode 100644
index 0000000..d3b9d91
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/3.1-Operation_audit.robot
@@ -0,0 +1,144 @@
+*** Settings ***
+Documentation 运营审核-常规
+Test Timeout
+Library DateTime
+Library Collections
+Library RequestsLibrary
+Resource 提交磅单.txt
+Resource 运营审核驳回.txt
+Resource 台账查询.txt
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_operation_list
+ #获取运营审核列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0
+ log ${reps.json()}
+
+get_paper-mill-order-by-orderItemId
+ #根据订单编号获取运营审核单
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=${orderItemId}
+ log ${reps.json()}
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId #获取审核id
+ ${weightNoteId} Get From Dictionary ${reps.json()["data"]["records"][0]} weightNoteId #获取磅单id
+ Set Global Variable ${auditRequestId}
+ Set Global Variable ${weightNoteId}
+
+get_order-log-detail
+ #获取订单日志
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId}
+ log ${reps.json()}
+
+get_order-receipt-audit-details
+ #查看运营审核详情
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${surcharge1} Evaluate ${unitSurcharge}*${netWeight}
+ ${surcharge2} Evaluate ${unitSurcharge}*${settleWeight}
+ ${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ ${audit_status} Get From Dictionary ${reps.json()["data"]} status
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${surcharge}
+ Set Global Variable ${audit_status}
+
+order-receipt-audit-details
+ #b保存磅单信息
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d #获取当前时间
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+get_order-log-detail2
+ #运营审核驳回操作日志
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId} &operationStatus=2
+ log ${reps.json()}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+重复执行驳回上传磅单
+ #重复执行上传磅单、运营驳回操作
+ FOR ${items} IN RANGE 2
+ Run Keyword get_operation_list
+ Run Keyword get_order-receipt-audit-details
+ Run Keyword If '${audit_status}'=='0' Run Keyword 运营审核驳回
+ sleep 1
+ Run Keyword 获取磅单详情
+ Run Keyword If '${status}'=='51' weightnote
+ Run Keyword audit_weightnote
+ Run Keyword 获取上传磅单后的订单详情
+ Run Keyword 台账查询
+ END
+
+get_operation_list1
+ #获取运营审核列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId}
+ ${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Set Global Variable ${audit_status}
+ Set Global Variable ${auditRequestId}
+
+get_order-receipt-audit-details1
+ #查看运营审核详情
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight}
+ ${surcharge1} Evaluate ${unitSurcharge}*${netWeight}
+ ${surcharge2} Evaluate ${unitSurcharge}*${settleWeight}
+ ${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${surcharge}
+ Set Global Variable ${auditRequestId}
+
+order-receipt-audit-details1
+ #b保存磅单信息
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d #获取当前时间
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+operation_audit
+ #运营审核确认通过
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
diff --git a/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/__init__.robot b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/__init__.robot
new file mode 100644
index 0000000..e69de29
diff --git a/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt
new file mode 100644
index 0000000..2071449
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt
@@ -0,0 +1,21 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+
+*** 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/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId}
+ ${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据
+ #Set Global Variable ${台账列表数据}
+ Should Be Equal As Numbers ${netWeight} ${reps.json()["data"]["records"][0]["netWeight"]}
+ Should Be Equal As Numbers ${unitSurcharge} ${reps.json()["data"]["records"][0]["unitSurcharge"]}
+ Should Be Equal As Numbers ${settleWeight} ${reps.json()["data"]["records"][0]["settleWeight"]}
+ Should Be Equal As Numbers ${settleUnitPrice} ${reps.json()["data"]["records"][0]["settleUtiPrice"]}
+ Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]}
+ Should Be Equal As Numbers ${adjustMoney} ${reps.json()["data"]["records"][0]["adjustMoney"]}
diff --git a/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt
new file mode 100644
index 0000000..6545de7
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt
@@ -0,0 +1,172 @@
+*** 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()}
diff --git a/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt
new file mode 100644
index 0000000..2098597
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt
@@ -0,0 +1,61 @@
+*** 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 ***
+get_operation_list
+ #获取运营审核列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId}
+ ${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Set Global Variable ${audit_status}
+ Set Global Variable ${auditRequestId}
+
+get_order-receipt-audit-details
+ #查看运营审核详情
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight}
+ ${surcharge1} Evaluate ${unitSurcharge}*${netWeight}
+ ${surcharge2} Evaluate ${unitSurcharge}*${settleWeight}
+ ${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${surcharge}
+ Set Global Variable ${auditRequestId}
+
+保存磅单信息
+ #b保存磅单信息
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d #获取当前时间
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+运营审核驳回
+ #运营审核驳回
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":2, \ \ \ \ "remark":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
diff --git a/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot b/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot
new file mode 100644
index 0000000..6ed7927
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot
@@ -0,0 +1,54 @@
+*** Settings ***
+Documentation 代卖应付
+Library RequestsLibrary
+Library Collections
+Resource 财务审核驳回.txt
+Resource 运营审核通过.txt
+Resource 台账查询.txt
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${url} http://api-ops-psc-test.qniao.cn
+${URL1} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_list
+ #获取财务审核列表
+ Create Session ZTBT ${url} ${header}
+ ${reps} Get On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/get/list params=pageNum=1&pageSize=10&status=&orderId=&orderItemId=${orderItemId}
+ ${auditedTime} Get From Dictionary ${reps.json()["data"]["records"][0]} auditedTime #财务第一次确认结算时间
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ #Set Global Variable ${auditedTime}
+
+get_order-log-detail
+ #财务审核驳回操作记录
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId}&operationStatus=3
+
+重复执行财务审核驳回何运营审核通过
+ #重复执行财务审核驳回何运营审核通过操作
+ FOR ${index} IN RANGE 5
+ Run Keyword 获取财务审核列表
+ Run Keyword If '${staus}'=='0' 财务驳回
+ Run Keyword get_operation_list
+ Run Keyword get_order-receipt-audit-details
+ Run Keyword order-receipt-audit-details
+ Run Keyword If '${audit_status}'=='0' 运营审核通过
+ Run Keyword 运营审核后详情
+ Run Keyword 台账查询
+ END
+
+paper-mill-order-receipt-proof-request_audit
+ #财务审核确认通过
+ Create Session ZTBT ${url} ${header}
+ ${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":1,"remark":"${datatime}" }
+ ${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')}
+ log ${reps.json()}
+ sleep 1
+
+paper-mill-order-receipt-proof-request_settle
+ #确认结算
+ Create Session ZTBT ${url} ${header}
+ ${data} Set Variable { \ \ \ \ "id":"${auditRequestId}", \ \ \ \ "adminId":null }
+ ${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/settle ${data.encode('utf-8')}
+ sleep 1
diff --git a/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot b/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot
new file mode 100644
index 0000000..3ebbe95
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot
@@ -0,0 +1,36 @@
+*** Settings ***
+Documentation 代卖应收
+Library RequestsLibrary
+Library Collections
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_paper-payment-order-list
+ #通过订单编号获取代卖应收列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-payment-order-list params=pageNum=1&pageSize=10&orderId=${orderId}
+ ${paymentOrderId} Get From Dictionary ${reps.json()["data"]["records"][0]} id #回款单号
+ log ${reps.json()}
+ Set Global Variable ${paymentOrderId}
+
+get_order-receipt-audit-details
+ #代卖应收详情
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ ${receivablePriceIncludeTax} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePriceIncludeTax
+ #${receivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePrice #获取应收金额
+ ${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收金额
+ #Set Global Variable ${receivablePrice}
+ Set Global Variable ${receivablePriceIncludeTax}
+ Set Global Variable ${noReceivablePrice}
+
+update_payment-order-status
+ #确认回款操作
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ \ \ \ "paymentOrderId":"${paymentOrderId}", \ \ \ \ "receivablePrice":"${receivablePriceIncludeTax}", \ \ \ \ "paidPrice":"${receivablePriceIncludeTax}", \ \ \ \ "noReceiveblePrice":"${noReceivablePrice}", \ \ \ \ "bankFlowNo":null, \ \ \ \ "paymentAdjustmentFee":null, \ \ \ \ "returnPayDate":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/update/payment-order-status ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ sleep 1
diff --git a/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt b/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt
new file mode 100644
index 0000000..64abf98
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt
@@ -0,0 +1,20 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+
+*** Variables ***
+${URL1} http://api-ops-ztb-test.qniao.cn
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+
+*** Keywords ***
+台账查询
+ #获取台账列表
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId}
+ ${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据
+ #Set Global Variable ${台账列表数据}
+ #${receivableAdjustMoney1} Get From Dictionary ${reps.json()["data"]["records"][0]} receivableAdjustMoney #获取应收调节费
+ #${receivableAdjustMoney1} Set Variable If '${receivableAdjustMoney}'=='None' Should Not Be Equal As Numbers ${receivableAdjustMoney} ${receivableAdjustMoney1}
+ #Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]} #对比应收调节费
+ Should Be Equal As Numbers ${noReceivablePrice} ${reps.json()["data"]["records"][0]["noReceivablePrice"]} #对比未收款金额
+ Should Be Equal As Strings ${paperMillPayAt} ${reps.json()["data"]["records"][0]["paperMillPayAt"]} #对比预计回款日期
diff --git a/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt b/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt
new file mode 100644
index 0000000..d9f1ba8
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt
@@ -0,0 +1,30 @@
+*** Settings ***
+Library Collections
+Library DateTime
+Library RequestsLibrary
+
+*** Variables ***
+${URL1} http://api-ops-ztb-test.qniao.cn
+${url} http://api-ops-psc-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 payment-settlement-center/admin/paper-mill-order-receipt-proof-request/get/list params=pageNum=1&pageSize=10&status=&orderId=&orderItemId=${orderItemId}
+ #${auditedTime} Get From Dictionary ${reps.json()["data"]["records"][0]} auditedTime #财务第一次确认结算时间
+ ${staus} Get From Dictionary ${reps.json()["data"]["records"][0]} status #获取审核状态
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ #Set Global Variable ${auditedTime}
+ Set Global Variable ${staus}
+ Set Global Variable ${auditRequestId}
+
+财务驳回
+ #财务审核驳回
+ Create Session ZTBT ${url} ${header}
+ ${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":2,"remark":"${datatime}" }
+ ${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')}
+ log ${reps.json()}
+ sleep 1
diff --git a/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt b/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt
new file mode 100644
index 0000000..74be8e4
--- /dev/null
+++ b/000-Regularorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt
@@ -0,0 +1,72 @@
+*** Settings ***
+Library RequestsLibrary
+Library DateTime
+Library Collections
+
+*** Variables ***
+${URL1} http://api-ops-ztb-test.qniao.cn
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+
+*** Keywords ***
+get_operation_list
+ #获取运营审核列表
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId}
+ ${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Set Global Variable ${audit_status}
+ Set Global Variable ${auditRequestId}
+
+get_order-receipt-audit-details
+ #查看运营审核详情
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight}
+ ${surcharge1} Evaluate ${unitSurcharge}*${netWeight}
+ ${surcharge2} Evaluate ${unitSurcharge}*${settleWeight}
+ ${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${surcharge}
+ Set Global Variable ${auditRequestId}
+
+order-receipt-audit-details
+ #b保存磅单信息
+ Create Session ZTBT ${URL1} ${header}
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+运营审核通过
+ #运营审核通过
+ Create Session ZTBT ${URL1} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
+
+运营审核后详情
+ #查看运营审核详情
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ ${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收款金额
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #获取计划回款日期
+ ${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["items"][0]} receivableAdjustMoney #获取应收调节费
+ #${noReceivablePrice} Evaluate ${noReceivablePrice}+1
+ Set Global Variable ${noReceivablePrice}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${receivableAdjustMoney}
diff --git a/001-Activeorder/1-Client(Test)/1-APPlogin(Test).robot b/001-Activeorder/1-Client(Test)/1-APPlogin(Test).robot
new file mode 100644
index 0000000..5e7cc34
--- /dev/null
+++ b/001-Activeorder/1-Client(Test)/1-APPlogin(Test).robot
@@ -0,0 +1,37 @@
+*** Settings ***
+Library RequestsLibrary
+Library Collections
+Library urllib3
+Library DatabaseLibrary
+
+*** Variables ***
+${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'}
+${url} http://api-client-ztb-test.qniao.cn
+
+*** Test Cases ***
+userlogin
+ [Setup]
+ #验证码登录
+ Disable Warnings
+ Create Session ZTBT https://api-client-uec-test.qniao.cn ${header}
+ ${data} Create Dictionary account=18888888888 captcha=888888 accountType=2
+ ${account} Set Variable 18888888888
+ #${data} Set Variable {"accountType":2,"account":"${account}","captcha":888888}
+ ${respones} POST On Session ZTBT uec/authorize/by-captcha json=${data}
+ log ${respones.status_code}
+ log ${respones.json()}
+ ${token} Get From Dictionary ${respones.json()["data"]} token
+ Set Global Variable ${token}
+ Set Global Variable ${account}
+ [Teardown]
+
+login-token
+ #${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528
+ Create Session ZTBT ${url} ${header}
+ ${token1} Create Dictionary loginToken=${token}
+ ${reps} Post On Session ZTBT recycle-user-center/authorize/get/product-line-token/by/login-token json=${token1}
+ ${gettoken} Get From Dictionary ${reps.json()["data"]} token #获取token
+ ${userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id
+ log ${reps.json()["data"]["token"]}
+ Set Global Variable ${gettoken}
+ Set Global Variable ${userId}
diff --git a/001-Activeorder/1-Client(Test)/2.2createActiveorder-1.robot b/001-Activeorder/1-Client(Test)/2.2createActiveorder-1.robot
new file mode 100644
index 0000000..9f585e2
--- /dev/null
+++ b/001-Activeorder/1-Client(Test)/2.2createActiveorder-1.robot
@@ -0,0 +1,75 @@
+*** Settings ***
+Library DateTime
+Library Collections
+Library RequestsLibrary
+
+*** Variables ***
+${url} http://api-client-ztb-test.qniao.cn
+${headers} {'content-type':'application/json','X-APP-ID':'470236309865238528','Authorization':'QNT ${gettoken}'}
+
+*** Test Cases ***
+proxy-sell-activity_list
+ #获取活动代卖列表
+ Create Session ZTBT ${url} ${headers}
+ ${repsponse} Get On Session ZTBT recycle-service/proxy-sell-activity/list params=pageNum=1&pageSize=15
+ ${records} Get From Dictionary ${repsponse.json()["data"]} records #获取代卖活动列表
+ FOR ${item} IN @{records}
+ ${activityName} Get From Dictionary ${item} activityName #获取活动名称
+ ${paperCategoryList} Get From Dictionary ${item} paperCategoryList #获取纸厂品类
+ ${paperMillId} Get From Dictionary ${item} paperMillId #获取纸厂id
+ ${activityId} Get From Dictionary ${item} activityId #获取活动id
+ Exit For Loop If '${activityName}'=='Ceshi_factory--一次'
+ END
+ ${Category_value} Evaluate random.choice(${paperCategoryList}) random #获取纸品列表
+ log to console \nvalue: ${Category_value}
+ ${categoryId} Get From Dictionary ${Category_value} categoryId #获取纸品id
+ ${categoryName} Get From Dictionary ${Category_value} categoryName #获取纸品名称
+ ${unitPrice} Get From Dictionary ${Category_value} unitPrice #获取纸品价格
+ Set Global Variable ${paperMillId}
+ Set Global Variable ${activityId}
+ Set Global Variable ${categoryId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${unitPrice}
+
+get-carinfo
+ #获取使用过的车辆信息
+ #${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${gettoken}
+ Create Session get-carinfo ${url} ${headers}
+ ${reps} Get On Session get-carinfo recycle-service/proxy-sell/get/his-car-info
+ log ${reps.json()}
+ ${carNumber} Get From Dictionary ${reps.json()["data"]} records #车辆列表
+ ${plateNumber_value} Evaluate random.sample(${carNumber},1) random
+ log to console \nvalue:${plateNumber_value}
+ ${plateNumber1} Get From Dictionary ${plateNumber_value[0]} plateNumber #车辆信息1
+ #${plateNumber2} Get From Dictionary ${plateNumber_value[1]} plateNumber #车辆信息2
+ Set Global Variable ${plateNumber1}
+ #Set Global Variable ${plateNumber2}
+
+get_paper-mill-paper-category-price-details
+ #获取纸厂详情
+ Create Session ZTBT ${url} ${headers}
+ ${reps} Get On Session ZTBT recycle-service/get/paper-mill-paper-category-price-details/${paperMillId}
+ log ${reps.json()}
+
+get_relation
+ #创建用户和业务归属人关系
+ Create Session ZTBT ${url} ${headers}
+ ${reps} Get On Session ZTBT recycle-service/proxy-sell/get/relation
+ ${bizUserId} Get From Dictionary ${reps.json()["data"]} bizUserId #业务归属人id
+ ${cusormerId} Get From Dictionary ${reps.json()["data"]} cusormerId #用户id
+ ${customerName} Get From Dictionary ${reps.json()["data"]} customerName #用户名称
+ Set Global Variable ${bizUserId}
+ Set Global Variable ${cusormerId}
+ Set Global Variable ${customerName}
+
+create_order
+ #创建代卖活动订单-1次付款
+ Create Session ZTBT ${url} ${headers}
+ ${datatime} get current date result_format=%Y-%m-%d
+ ${order_data} Set Variable { \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "totalEstimatedWeight":30000, \ \ \ \ "activityId":"${activityId}", \ \ \ \ "customerName":"${customerName}", \ \ \ \ "deliveryTime":"${datatime}", \ \ \ \ "carInfos":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "plateNumber":"${plateNumber1}" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
+ ${reps} Post On Session ZTBT recycle-service/proxy-sell/create/order ${order_data.encode('utf-8')}
+ log ${reps.json()}
+ ${orderId} Get From Dictionary ${reps.json()["data"]} orderId #获取订单编号
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ Set Global Variable ${orderId}
+ Set Global Variable ${datatime}
diff --git a/001-Activeorder/1-Client(Test)/__init__.robot b/001-Activeorder/1-Client(Test)/__init__.robot
new file mode 100644
index 0000000..4d46599
--- /dev/null
+++ b/001-Activeorder/1-Client(Test)/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Test Setup
diff --git a/001-Activeorder/2-Background_system(Test)/1-WebLogin/weblogin.robot b/001-Activeorder/2-Background_system(Test)/1-WebLogin/weblogin.robot
new file mode 100644
index 0000000..f08ffc4
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/1-WebLogin/weblogin.robot
@@ -0,0 +1,21 @@
+*** Settings ***
+Library RequestsLibrary
+
+*** Test Cases ***
+pwlogin
+ ${header} Create Dictionary Content-Type=application/x-www-form-urlencoded X-APP-ID=470236309865238555
+ Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header}
+ &{data} Create Dictionary username=laiyonglan@qniao.cn password=qn123456
+ log ${data}
+ ${reps} Post On Session ZTBT recycle-service/admin/login data=${data}
+ log ${reps.json()}
+ ${gettoken} Set Variable Token 6b08add42d6bcf73abb935b2adf83525
+ Should Be Equal As Strings ${reps.json()["message"]} 登陆成功
+ Set Global Variable ${gettoken}
+
+login-info
+ ${header} Create Dictionary X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525
+ Create Session login-info http://api-ops-ztb-test.qniao.cn ${header}
+ ${reps_data} Get On Session login-info recycle-service/admin/employee/get/login-info
+ log ${reps_data}
+ Should Be Equal As Strings ${reps_data.json()["message"]} successful
diff --git a/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot
new file mode 100644
index 0000000..60ad6a2
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot
@@ -0,0 +1,57 @@
+*** Settings ***
+Documentation 预约送货
+Library RequestsLibrary
+Library Collections
+Library DateTime
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_paper-mill-order-reservation-list
+ Create Session ZTBT ${URL} ${header}
+ ${reps_data} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-order-reservation-list params=pageNum=1&pageSize=10&status=&orderId=${orderId}
+ log ${reps_data.json()}
+ #获取订单编号${orderId}、纸厂id${paperMillId}、订单类型${orderType}
+ ${orderId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderId #订单编号
+ ${paperMillId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillId #纸厂id
+ ${id} Get From Dictionary ${reps_data.json()["data"]["records"][0]} id #预约id
+ ${orderType} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderType #订单类型
+ ${carNoList} Get From Dictionary ${reps_data.json()["data"]["records"][0]} carNoList #车辆信息列表
+ ${paperMillName} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillName #纸厂名称
+ ${sellerReservationDate} Get From Dictionary ${reps_data.json()["data"]["records"][0]} sellerReservationDate #送货时间
+ #随机获取车辆信息
+ ${carList} Evaluate random.choice(${carNoList}) random
+ log to console \nvalue:${carList}
+ Should Be Equal As Strings ${reps_data.json()["message"]} successful
+ Set Global Variable ${orderId}
+ Set Global Variable ${paperMillId}
+ Set Global Variable ${id}
+ Set Global Variable ${paperMillName}
+ Set Global Variable ${sellerReservationDate}
+ Set Global Variable ${orderType}
+ Set Global Variable ${carList}
+
+get-supplier
+ Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId}
+ log ${reps.json()}
+ #获取供应商id和name
+ ${data} Get From Dictionary ${reps.json()} data
+ ${value} Evaluate random.choice(${data}) random
+ log to console \nvalue: ${value}
+ ${supplier_id} Get From Dictionary ${value} id #供应商id
+ ${millSupplierName} Get From Dictionary ${value} name #供应商名称
+ Set Global Variable ${supplier_id}
+ Set Global Variable ${millSupplierName}
+
+Submit-appointment
+ #${headers} Create Dictionary Content-Type=application/json X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525
+ #提交预约信息
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} get current date result_format=%Y-%m-%d
+ ${data} Set Variable {"attention":"${orderId}","buyerReservationDate":"${datatime}", "id":"${id}","millDeliveryOrderId":"${orderId}","millSupplierId":"${supplier_id}","millSupplierName":"${millSupplierName}","proxySellerSettleType":0,"scrapeOrderId":"${orderId}"}
+ log ${data}
+ ${reps} Post On Session ZTBT recycle-service/admin/customer-service/update/reservation ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
diff --git a/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/2.2-RegularUpload-weightnote-1.robot b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/2.2-RegularUpload-weightnote-1.robot
new file mode 100644
index 0000000..e0cf50b
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/2.2-RegularUpload-weightnote-1.robot
@@ -0,0 +1,205 @@
+*** Settings ***
+Documentation 上传磅单-一次付款活动
+Library DateTime
+Library RequestsLibrary
+Library Collections
+Library requests
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get-order-item-list
+ #查找预约的订单项列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order-item-list params=orderType=${orderType} &pageNum=1&pageSize=10&status=51&orderId=${orderId}
+ log ${reps.json()}
+ ${records} Get From Dictionary ${reps.json()["data"]} records #获取订单列表
+ ${orderItemId_value} Evaluate random.choice(${records}) random #随机获取订单信息
+ log to console \nvalue: ${orderItemId_value}
+ ${orderItemId} Get From Dictionary ${orderItemId_value} orderItemId #订单项编号
+ Set Global Variable ${orderItemId}
+ #Should Be Equal As Strings ${reps.json()["data"]["records"][0]} orderId=${orderId}
+
+get-order-item-details
+ #获取订单详情信息
+ 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 #代卖费单价
+ ${settleUtiPriceIncludeTaxType} Get From Dictionary ${reps.json()["data"]["orderItems"][0]} settleUtiPriceIncludeTaxType #含税补贴类型
+ ${publicSubsidies} Set Variable If '${publicSubsidies}'=='${null}' 0 ${publicSubsidies}
+ ${settleUtiPrice}= Evaluate ${unitPrice}+${publicSubsidies} #结算单价
+ ${unitSurcharge} Set Variable If '${unitSurcharge}'=='${None}' 0 ${unitSurcharge}
+ 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 ${unitSurcharge}
+ Set Global Variable ${settleUtiPriceIncludeTaxType}
+
+get_delivery-info
+ #获取订单名片信息
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get/proxy-order/delivery-info/${orderItemId}
+ log ${reps.json()}
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]} plateNumber #车牌号
+ ${settleUtiPrice} Get From Dictionary ${reps.json()["data"]} settleUtiPrice #结算单价
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleUtiPrice}
+
+get_contract_by_id
+ #获取下单时绑定的合同
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/contract/get/detail-by-id params=id=${contractId}
+ log ${reps.json()}
+ #获取垫资费、企业ID、应收金额结算规则、含税结算单价结算规则
+ ${advanceFund} Get From Dictionary ${reps.json()["data"]} advanceFund #垫资费
+ ${accountPeriod} Get From Dictionary ${reps.json()["data"]} accountPeriod #账期
+ ${buyerEnterpriseId} Get From Dictionary ${reps.json()["data"]} buyerEnterpriseId #企业id
+ ${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则
+ ${taxRefundRate} Get From Dictionary ${reps.json()["data"]} taxRefundRate #税点
+ ${proxyPaySurcharge} Get From Dictionary ${reps.json()["data"]} proxyPaySurcharge #代收费
+ ${hasInvoice} Get From Dictionary ${reps.json()["data"]} hasInvoice #是否开票
+ ${accountPeriodType} Get From Dictionary ${reps.json()["data"]} accountPeriodType #账期类型
+ ${isSubsidyAndDeductIncludeTax} Get From Dictionary ${reps.json()["data"]} isSubsidyAndDeductIncludeTax #纸厂补贴是否含税
+ ${receivableSettlementRules} Get From Dictionary ${reps.json()["data"]} settleRules #应收金额结算规则
+ ${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则
+ ${advanceFund} Set Variable If '${advanceFund}'=='${None}' 0 ${advanceFund}
+ ${proxyPaySurcharge} Set Variable If '${proxyPaySurcharge}'=='${None}' 0 ${proxyPaySurcharge}
+ Set Global Variable ${advanceFund}
+ Set Global Variable ${accountPeriod}
+ Set Global Variable ${buyerEnterpriseId}
+ Set Global Variable ${taxRefundRate}
+ Set Global Variable ${proxyPaySurcharge}
+ Set Global Variable ${hasInvoice}
+ Set Global Variable ${accountPeriodType}
+ Set Global Variable ${settlePriceIncludeTaxSettleRules}
+ Set Global Variable ${isSubsidyAndDeductIncludeTax}
+ Set Global Variable ${receivableSettlementRules}
+ Set Global Variable ${settlePriceIncludeTaxSettleRules}
+
+get-contract-list
+ #获取订单纸厂的所有合同信息
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT /recycle-service/admin/contract/get/selectable-contract-list params=orderItemId=${orderItemId}
+ log ${reps.json()}
+
+get-supplier
+ #获取纸厂供应商
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId}
+ log ${reps.json()}
+
+get-Source of funds
+ #获取资金来源
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/fund-source/get/list
+ log ${reps.json()}
+ ${data} Get From Dictionary ${reps.json()} data
+ FOR ${item} IN @{data}
+ log ${item}
+ ${isDefault} Get From Dictionary ${item} isDefault #获取启用状态
+ ${name} Get From Dictionary ${item} name #获取name
+ ${id} Get From Dictionary ${item} id #获取id
+ Exit For Loop If '${isDefault}'=='1'
+ END
+ Set Global Variable ${name}
+ Set Global Variable ${id}
+
+get-Warehouse
+ #获取所属仓库
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/transaction-main-enterprise/get/warehouse-name
+ ${仓库} Get From Dictionary ${reps.json()} data
+ #随机获取仓库
+ ${所属仓库} Evaluate random.choice(${仓库}) random
+ log to console \nvalue:${所属仓库}
+ Set Global Variable ${所属仓库}
+
+get_proxy-order_delivery-info
+ #获取订单名片信息
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get/proxy-order/delivery-info/${orderItemId}
+ log ${reps.json()}
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]} plateNumber #车牌号
+ ${settleUtiPrice} Get From Dictionary ${reps.json()["data"]} settleUtiPrice #结算单价
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleUtiPrice}
+
+get_paper-mill-category
+ #获取当前纸厂的所有纸品品类
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-category/${paperMillId} params=id=${paperMillId}
+ log ${reps.json()}
+
+Upload_pictures
+ #上传图片
+ #${dict} Create Dictionary Content-Type=image/jpeg filename=20210803.jpg
+ #Create Session ZTBT ${URL} ${dict}
+ ${filepath} Evaluate open('./16pic_6879381_b.jpg','rb')
+ ${image} Evaluate open('./16pic_6879381_b.jpg','rb')
+ ${file} Create Dictionary filepath=${filepath} image=${image}
+ Create Session ZTBT ${URL}
+ log ${file}
+ ${result} Post On Session ZTBT recycle-user-center/upload/image files=${file}
+ ${pictures} Get From Dictionary ${result.json()} data
+ log ${result.content}
+ Set Global Variable ${pictures}
+
+get_repeat_proxy-order
+ #获取重复订单信息
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/repeat/proxy-order params=orderItemId=${orderItemId}&plateNumber=${carList}&settleWeight=14800&weighingDate=${datatime}&orderType=${orderType}&settlePrice=29466.6
+ ${records} Get From Dictionary ${reps.json()["data"]} records #获取重复订单列表
+ ${orderItemId_list} Create List
+ #sleep 0.5
+ FOR ${items} IN @{records}
+ ${orderItemId} Get From Dictionary ${items} orderItemId
+ Append To List ${orderItemId_list} '''${orderItemId}'''
+ END
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ Set Global Variable ${orderItemId_list}
+
+repeat_proxy-order
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "remark":"${datatime}", \ \ \ \ "repeatOrderItem":${orderItemId_list} }
+ ${reps} Post On Session ZTBT recycle-service/admin/customer-service/confirm/repeat/proxy-order ${data.encode('utf-8')}
+
+weightnote
+ #提交磅单
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${data} Set Variable { \ \ \ \ "deductedPoint":0, \ \ \ \ "imageUrl":[ \ \ \ \ \ \ \ \ "${pictures}" \ \ \ \ ], \ \ \ \ "scrapeOrderId":"", \ \ \ \ "orderItemId":"${orderItemId}", \ \ \ \ "unitPrice":"${paperCategoryPrice}", \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "millSupplierId":"${supplier_id}", \ \ \ \ "millSupplierName":"${millSupplierName}", \ \ \ \ "settleUtiPriceIncludeTax":1.6608157894736841, \ \ \ \ "settleUtiPriceIncludeTaxType":"${settleUtiPriceIncludeTaxType}", \ \ \ \ "receivableAdjustMoney":"30", \ \ \ \ "refundSubsidy":0.002, \ \ \ \ "adjustMoney":"20", \ \ \ \ "collectionCharges":"${proxyPaySurcharge}", \ \ \ \ "advanceFund":"${advanceFund}", \ \ \ \ "transactionMainEnterpriseId":"${交易主体id}", \ \ \ \ "contractId":"${contractId}", \ \ \ \ "warehouseName":"${所属仓库}", \ \ \ \ "weightDay":"${datatime}", \ \ \ \ "settleDay":"${datatime}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "proxySellerSettleType":"${proxySellerSettleType}", \ \ \ \ "receivableSettlementRules":"${receivableSettlementRules}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "deductionNotes":"${datatime}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlePriceIncludeTaxSettleRules":"${settlePriceIncludeTaxSettleRules}", \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "netWeight":20000, \ \ \ \ "activitySettleType":null, \ \ \ \ "unitSurcharge":"${unitSurcharge}", \ \ \ \ "deliveryImageUrls":[ \ \ \ \ \ ], \ \ \ \ "publicSubsidies":0, \ \ \ \ "orderId":"${orderId}", \ \ \ \ "nonStandardPenalty_car":"", \ \ \ \ "settleWeight":10000, \ \ \ \ "deductedWeight":0, \ \ \ \ "orderType":1, \ \ \ \ "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":2, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":15, \ \ \ \ \ \ \ \ \ \ \ \ "title":"otherPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "unitType":1, \ \ \ \ \ \ \ \ \ \ \ \ "unitAmount":0.001, \ \ \ \ \ \ \ \ \ \ \ \ "title":"nonStandardPenalty", \ \ \ \ \ \ \ \ \ \ \ \ "isSubsidies":0 \ \ \ \ \ \ \ \ } \ \ \ \ ] }
+ log ${data}
+ ${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/save/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}
+
+audit_weightnote
+ #磅单审核接口
+ Create Session ZTBT ${URL} ${header}
+ ${repsonse} Post On Session ZTBT recycle-service/admin/customer-service/audit/weightnote/${weightNoteId}
+ log ${repsonse.json()}
+
+get_proxy-order
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId}
+ log ${reps.json()}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
diff --git a/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/3.2-Operation_audit.robot b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/3.2-Operation_audit.robot
new file mode 100644
index 0000000..19ebb6c
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/3.2-Operation_audit.robot
@@ -0,0 +1,80 @@
+*** Settings ***
+Documentation 运用审核-一次付款活动
+Library RequestsLibrary
+Library Collections
+Library DateTime
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_operation_list
+ #获取运营审核列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0
+ log ${reps.json()}
+
+get_paper-mill-order-by-orderItemId
+ #根据订单编号获取运营审核单
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=${orderItemId}
+ log ${reps.json()}
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId #获取审核id
+ ${weightNoteId} Get From Dictionary ${reps.json()["data"]["records"][0]} weightNoteId #获取磅单id
+ Set Global Variable ${auditRequestId}
+ Set Global Variable ${weightNoteId}
+
+get_order-log-detail
+ #获取订单日志
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId}
+ log ${reps.json()}
+
+get_order-receipt-audit-details
+ #查看运营审核详情
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${surcharge1} Evaluate ${unitSurcharge}*${netWeight}
+ ${surcharge2} Evaluate ${unitSurcharge}*${settleWeight}
+ ${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${datatime}
+
+order-receipt-audit-details
+ #b保存磅单信息
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+get_order-log-detail2
+ #运营审核驳回操作日志
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId} &operationStatus=2
+ log ${reps.json()}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+operation_audit
+ #运营审核确认通过
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ sleep 1
diff --git a/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/__init__.robot b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/__init__.robot
new file mode 100644
index 0000000..e69de29
diff --git a/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt
new file mode 100644
index 0000000..2071449
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt
@@ -0,0 +1,21 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+
+*** 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/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId}
+ ${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据
+ #Set Global Variable ${台账列表数据}
+ Should Be Equal As Numbers ${netWeight} ${reps.json()["data"]["records"][0]["netWeight"]}
+ Should Be Equal As Numbers ${unitSurcharge} ${reps.json()["data"]["records"][0]["unitSurcharge"]}
+ Should Be Equal As Numbers ${settleWeight} ${reps.json()["data"]["records"][0]["settleWeight"]}
+ Should Be Equal As Numbers ${settleUnitPrice} ${reps.json()["data"]["records"][0]["settleUtiPrice"]}
+ Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]}
+ Should Be Equal As Numbers ${adjustMoney} ${reps.json()["data"]["records"][0]["adjustMoney"]}
diff --git a/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt
new file mode 100644
index 0000000..6545de7
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt
@@ -0,0 +1,172 @@
+*** 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()}
diff --git a/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt
new file mode 100644
index 0000000..2098597
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt
@@ -0,0 +1,61 @@
+*** 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 ***
+get_operation_list
+ #获取运营审核列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId}
+ ${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Set Global Variable ${audit_status}
+ Set Global Variable ${auditRequestId}
+
+get_order-receipt-audit-details
+ #查看运营审核详情
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight}
+ ${surcharge1} Evaluate ${unitSurcharge}*${netWeight}
+ ${surcharge2} Evaluate ${unitSurcharge}*${settleWeight}
+ ${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${surcharge}
+ Set Global Variable ${auditRequestId}
+
+保存磅单信息
+ #b保存磅单信息
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d #获取当前时间
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+运营审核驳回
+ #运营审核驳回
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":2, \ \ \ \ "remark":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
diff --git a/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot b/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot
new file mode 100644
index 0000000..ee4cd03
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot
@@ -0,0 +1,41 @@
+*** Settings ***
+Documentation 代卖应付
+Library RequestsLibrary
+Library Collections
+Resource 财务审核驳回.txt
+Resource 运营审核通过.txt
+Resource 台账查询.txt
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${url} http://api-ops-psc-test.qniao.cn
+${URL1} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_list
+ #获取财务审核列表
+ Create Session ZTBT ${url} ${header}
+ ${reps} Get On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/get/list params=pageNum=1&pageSize=10&status=&orderId=&orderItemId=${orderItemId}
+ ${auditedTime} Get From Dictionary ${reps.json()["data"]["records"][0]} auditedTime #财务第一次确认结算时间
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ #Set Global Variable ${auditedTime}
+
+get_order-log-detail
+ #财务审核驳回操作记录
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId}&operationStatus=3
+
+paper-mill-order-receipt-proof-request_audit
+ #财务审核确认通过
+ Create Session ZTBT ${url} ${header}
+ ${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":1,"remark":"${datatime}" }
+ ${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')}
+ log ${reps.json()}
+ sleep 1
+
+paper-mill-order-receipt-proof-request_settle
+ #确认结算
+ Create Session ZTBT ${url} ${header}
+ ${data} Set Variable { \ \ \ \ "id":"${auditRequestId}", \ \ \ \ "adminId":null }
+ ${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/settle ${data.encode('utf-8')}
+ sleep 1
diff --git a/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot b/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot
new file mode 100644
index 0000000..3ebbe95
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot
@@ -0,0 +1,36 @@
+*** Settings ***
+Documentation 代卖应收
+Library RequestsLibrary
+Library Collections
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_paper-payment-order-list
+ #通过订单编号获取代卖应收列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-payment-order-list params=pageNum=1&pageSize=10&orderId=${orderId}
+ ${paymentOrderId} Get From Dictionary ${reps.json()["data"]["records"][0]} id #回款单号
+ log ${reps.json()}
+ Set Global Variable ${paymentOrderId}
+
+get_order-receipt-audit-details
+ #代卖应收详情
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ ${receivablePriceIncludeTax} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePriceIncludeTax
+ #${receivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePrice #获取应收金额
+ ${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收金额
+ #Set Global Variable ${receivablePrice}
+ Set Global Variable ${receivablePriceIncludeTax}
+ Set Global Variable ${noReceivablePrice}
+
+update_payment-order-status
+ #确认回款操作
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ \ \ \ "paymentOrderId":"${paymentOrderId}", \ \ \ \ "receivablePrice":"${receivablePriceIncludeTax}", \ \ \ \ "paidPrice":"${receivablePriceIncludeTax}", \ \ \ \ "noReceiveblePrice":"${noReceivablePrice}", \ \ \ \ "bankFlowNo":null, \ \ \ \ "paymentAdjustmentFee":null, \ \ \ \ "returnPayDate":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/update/payment-order-status ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ sleep 1
diff --git a/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt b/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt
new file mode 100644
index 0000000..64abf98
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt
@@ -0,0 +1,20 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+
+*** Variables ***
+${URL1} http://api-ops-ztb-test.qniao.cn
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+
+*** Keywords ***
+台账查询
+ #获取台账列表
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId}
+ ${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据
+ #Set Global Variable ${台账列表数据}
+ #${receivableAdjustMoney1} Get From Dictionary ${reps.json()["data"]["records"][0]} receivableAdjustMoney #获取应收调节费
+ #${receivableAdjustMoney1} Set Variable If '${receivableAdjustMoney}'=='None' Should Not Be Equal As Numbers ${receivableAdjustMoney} ${receivableAdjustMoney1}
+ #Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]} #对比应收调节费
+ Should Be Equal As Numbers ${noReceivablePrice} ${reps.json()["data"]["records"][0]["noReceivablePrice"]} #对比未收款金额
+ Should Be Equal As Strings ${paperMillPayAt} ${reps.json()["data"]["records"][0]["paperMillPayAt"]} #对比预计回款日期
diff --git a/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt b/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt
new file mode 100644
index 0000000..d9f1ba8
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt
@@ -0,0 +1,30 @@
+*** Settings ***
+Library Collections
+Library DateTime
+Library RequestsLibrary
+
+*** Variables ***
+${URL1} http://api-ops-ztb-test.qniao.cn
+${url} http://api-ops-psc-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 payment-settlement-center/admin/paper-mill-order-receipt-proof-request/get/list params=pageNum=1&pageSize=10&status=&orderId=&orderItemId=${orderItemId}
+ #${auditedTime} Get From Dictionary ${reps.json()["data"]["records"][0]} auditedTime #财务第一次确认结算时间
+ ${staus} Get From Dictionary ${reps.json()["data"]["records"][0]} status #获取审核状态
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ #Set Global Variable ${auditedTime}
+ Set Global Variable ${staus}
+ Set Global Variable ${auditRequestId}
+
+财务驳回
+ #财务审核驳回
+ Create Session ZTBT ${url} ${header}
+ ${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":2,"remark":"${datatime}" }
+ ${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')}
+ log ${reps.json()}
+ sleep 1
diff --git a/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt b/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt
new file mode 100644
index 0000000..74be8e4
--- /dev/null
+++ b/001-Activeorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt
@@ -0,0 +1,72 @@
+*** Settings ***
+Library RequestsLibrary
+Library DateTime
+Library Collections
+
+*** Variables ***
+${URL1} http://api-ops-ztb-test.qniao.cn
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+
+*** Keywords ***
+get_operation_list
+ #获取运营审核列表
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId}
+ ${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Set Global Variable ${audit_status}
+ Set Global Variable ${auditRequestId}
+
+get_order-receipt-audit-details
+ #查看运营审核详情
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight}
+ ${surcharge1} Evaluate ${unitSurcharge}*${netWeight}
+ ${surcharge2} Evaluate ${unitSurcharge}*${settleWeight}
+ ${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${surcharge}
+ Set Global Variable ${auditRequestId}
+
+order-receipt-audit-details
+ #b保存磅单信息
+ Create Session ZTBT ${URL1} ${header}
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+运营审核通过
+ #运营审核通过
+ Create Session ZTBT ${URL1} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
+
+运营审核后详情
+ #查看运营审核详情
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ ${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收款金额
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #获取计划回款日期
+ ${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["items"][0]} receivableAdjustMoney #获取应收调节费
+ #${noReceivablePrice} Evaluate ${noReceivablePrice}+1
+ Set Global Variable ${noReceivablePrice}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${receivableAdjustMoney}
diff --git a/002-Activeorder/1-Client(Test)/1-APPlogin(Test).robot b/002-Activeorder/1-Client(Test)/1-APPlogin(Test).robot
new file mode 100644
index 0000000..5e7cc34
--- /dev/null
+++ b/002-Activeorder/1-Client(Test)/1-APPlogin(Test).robot
@@ -0,0 +1,37 @@
+*** Settings ***
+Library RequestsLibrary
+Library Collections
+Library urllib3
+Library DatabaseLibrary
+
+*** Variables ***
+${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'}
+${url} http://api-client-ztb-test.qniao.cn
+
+*** Test Cases ***
+userlogin
+ [Setup]
+ #验证码登录
+ Disable Warnings
+ Create Session ZTBT https://api-client-uec-test.qniao.cn ${header}
+ ${data} Create Dictionary account=18888888888 captcha=888888 accountType=2
+ ${account} Set Variable 18888888888
+ #${data} Set Variable {"accountType":2,"account":"${account}","captcha":888888}
+ ${respones} POST On Session ZTBT uec/authorize/by-captcha json=${data}
+ log ${respones.status_code}
+ log ${respones.json()}
+ ${token} Get From Dictionary ${respones.json()["data"]} token
+ Set Global Variable ${token}
+ Set Global Variable ${account}
+ [Teardown]
+
+login-token
+ #${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528
+ Create Session ZTBT ${url} ${header}
+ ${token1} Create Dictionary loginToken=${token}
+ ${reps} Post On Session ZTBT recycle-user-center/authorize/get/product-line-token/by/login-token json=${token1}
+ ${gettoken} Get From Dictionary ${reps.json()["data"]} token #获取token
+ ${userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id
+ log ${reps.json()["data"]["token"]}
+ Set Global Variable ${gettoken}
+ Set Global Variable ${userId}
diff --git a/002-Activeorder/1-Client(Test)/2.3createActiveorder-2.robot b/002-Activeorder/1-Client(Test)/2.3createActiveorder-2.robot
new file mode 100644
index 0000000..6956ad3
--- /dev/null
+++ b/002-Activeorder/1-Client(Test)/2.3createActiveorder-2.robot
@@ -0,0 +1,74 @@
+*** Settings ***
+Library DateTime
+Library Collections
+Library RequestsLibrary
+
+*** Variables ***
+${url} http://api-client-ztb-test.qniao.cn
+${headers} {'content-type':'application/json','X-APP-ID':'470236309865238528','Authorization':'QNT ${gettoken}'}
+
+*** Test Cases ***
+proxy-sell-activity_list
+ #获取活动代卖列表
+ Create Session ZTBT ${url} ${headers}
+ ${repsponse} Get On Session ZTBT recycle-service/proxy-sell-activity/list params=pageNum=1&pageSize=15
+ ${records} Get From Dictionary ${repsponse.json()["data"]} records #获取代卖活动列表
+ FOR ${item} IN @{records}
+ ${activityName} Get From Dictionary ${item} activityName #获取活动名称
+ ${paperCategoryList} Get From Dictionary ${item} paperCategoryList #获取纸厂品类
+ ${paperMillId} Get From Dictionary ${item} paperMillId #获取纸厂id
+ ${activityId} Get From Dictionary ${item} activityId #获取活动id
+ Exit For Loop If '${activityName}'=='Ceshi_factory--两次'
+ END
+ ${Category_value} Evaluate random.choice(${paperCategoryList}) random #获取纸品
+ log to console \nvalue: ${Category_value}
+ ${categoryId} Get From Dictionary ${Category_value} categoryId #获取纸品id
+ ${categoryName} Get From Dictionary ${Category_value} categoryName #获取纸品名称
+ ${unitPrice} Get From Dictionary ${Category_value} unitPrice #获取纸品价格
+ Set Global Variable ${paperMillId}
+ Set Global Variable ${activityId}
+ Set Global Variable ${categoryId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${unitPrice}
+
+get-carinfo
+ #获取使用过的车辆信息
+ #${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${gettoken}
+ Create Session get-carinfo ${url} ${headers}
+ ${reps} Get On Session get-carinfo recycle-service/proxy-sell/get/his-car-info
+ log ${reps.json()}
+ ${carNumber} Get From Dictionary ${reps.json()["data"]} records #车辆列表
+ ${plateNumber_value} Evaluate random.sample(${carNumber},1) random
+ log to console \nvalue:${plateNumber_value}
+ ${plateNumber1} Get From Dictionary ${plateNumber_value[0]} plateNumber #车辆信息1
+ #${plateNumber2} Get From Dictionary ${plateNumber_value[1]} plateNumber #车辆信息2
+ Set Global Variable ${plateNumber1}
+ #Set Global Variable ${plateNumber2}
+
+get_paper-mill-paper-category-price-details
+ #获取纸厂详情
+ Create Session ZTBT ${url} ${headers}
+ ${reps} Get On Session ZTBT recycle-service/get/paper-mill-paper-category-price-details/${paperMillId}
+ log ${reps.json()}
+
+get_relation
+ #创建用户和业务归属人关系
+ Create Session ZTBT ${url} ${headers}
+ ${reps} Get On Session ZTBT recycle-service/proxy-sell/get/relation
+ ${bizUserId} Get From Dictionary ${reps.json()["data"]} bizUserId #业务归属人id
+ ${cusormerId} Get From Dictionary ${reps.json()["data"]} cusormerId #用户id
+ ${customerName} Get From Dictionary ${reps.json()["data"]} customerName #用户名称
+ Set Global Variable ${bizUserId}
+ Set Global Variable ${cusormerId}
+ Set Global Variable ${customerName}
+
+create_order
+ #创建代卖活动订单-2次付款
+ Create Session ZTBT ${url} ${headers}
+ ${datatime} get current date result_format=%Y-%m-%d
+ ${order_data} Set Variable { \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "totalEstimatedWeight":30000, \ \ \ \ "activityId":"${activityId}", \ \ \ \ "customerName":"${customerName}", \ \ \ \ "deliveryTime":"${datatime}", \ \ \ \ "carInfos":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "plateNumber":"${plateNumber1}" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
+ ${reps} Post On Session ZTBT recycle-service/proxy-sell/create/order ${order_data.encode('utf-8')}
+ log ${reps.json()}
+ ${orderId} Get From Dictionary ${reps.json()["data"]} orderId #获取订单编号
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ Set Global Variable ${orderId}
diff --git a/002-Activeorder/1-Client(Test)/__init__.robot b/002-Activeorder/1-Client(Test)/__init__.robot
new file mode 100644
index 0000000..4d46599
--- /dev/null
+++ b/002-Activeorder/1-Client(Test)/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Test Setup
diff --git a/002-Activeorder/2-Background_system(Test)/1-WebLogin/weblogin.robot b/002-Activeorder/2-Background_system(Test)/1-WebLogin/weblogin.robot
new file mode 100644
index 0000000..f08ffc4
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/1-WebLogin/weblogin.robot
@@ -0,0 +1,21 @@
+*** Settings ***
+Library RequestsLibrary
+
+*** Test Cases ***
+pwlogin
+ ${header} Create Dictionary Content-Type=application/x-www-form-urlencoded X-APP-ID=470236309865238555
+ Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header}
+ &{data} Create Dictionary username=laiyonglan@qniao.cn password=qn123456
+ log ${data}
+ ${reps} Post On Session ZTBT recycle-service/admin/login data=${data}
+ log ${reps.json()}
+ ${gettoken} Set Variable Token 6b08add42d6bcf73abb935b2adf83525
+ Should Be Equal As Strings ${reps.json()["message"]} 登陆成功
+ Set Global Variable ${gettoken}
+
+login-info
+ ${header} Create Dictionary X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525
+ Create Session login-info http://api-ops-ztb-test.qniao.cn ${header}
+ ${reps_data} Get On Session login-info recycle-service/admin/employee/get/login-info
+ log ${reps_data}
+ Should Be Equal As Strings ${reps_data.json()["message"]} successful
diff --git a/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot
new file mode 100644
index 0000000..60ad6a2
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/1-appointment.robot
@@ -0,0 +1,57 @@
+*** Settings ***
+Documentation 预约送货
+Library RequestsLibrary
+Library Collections
+Library DateTime
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_paper-mill-order-reservation-list
+ Create Session ZTBT ${URL} ${header}
+ ${reps_data} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-order-reservation-list params=pageNum=1&pageSize=10&status=&orderId=${orderId}
+ log ${reps_data.json()}
+ #获取订单编号${orderId}、纸厂id${paperMillId}、订单类型${orderType}
+ ${orderId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderId #订单编号
+ ${paperMillId} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillId #纸厂id
+ ${id} Get From Dictionary ${reps_data.json()["data"]["records"][0]} id #预约id
+ ${orderType} Get From Dictionary ${reps_data.json()["data"]["records"][0]} orderType #订单类型
+ ${carNoList} Get From Dictionary ${reps_data.json()["data"]["records"][0]} carNoList #车辆信息列表
+ ${paperMillName} Get From Dictionary ${reps_data.json()["data"]["records"][0]} paperMillName #纸厂名称
+ ${sellerReservationDate} Get From Dictionary ${reps_data.json()["data"]["records"][0]} sellerReservationDate #送货时间
+ #随机获取车辆信息
+ ${carList} Evaluate random.choice(${carNoList}) random
+ log to console \nvalue:${carList}
+ Should Be Equal As Strings ${reps_data.json()["message"]} successful
+ Set Global Variable ${orderId}
+ Set Global Variable ${paperMillId}
+ Set Global Variable ${id}
+ Set Global Variable ${paperMillName}
+ Set Global Variable ${sellerReservationDate}
+ Set Global Variable ${orderType}
+ Set Global Variable ${carList}
+
+get-supplier
+ Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId}
+ log ${reps.json()}
+ #获取供应商id和name
+ ${data} Get From Dictionary ${reps.json()} data
+ ${value} Evaluate random.choice(${data}) random
+ log to console \nvalue: ${value}
+ ${supplier_id} Get From Dictionary ${value} id #供应商id
+ ${millSupplierName} Get From Dictionary ${value} name #供应商名称
+ Set Global Variable ${supplier_id}
+ Set Global Variable ${millSupplierName}
+
+Submit-appointment
+ #${headers} Create Dictionary Content-Type=application/json X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525
+ #提交预约信息
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} get current date result_format=%Y-%m-%d
+ ${data} Set Variable {"attention":"${orderId}","buyerReservationDate":"${datatime}", "id":"${id}","millDeliveryOrderId":"${orderId}","millSupplierId":"${supplier_id}","millSupplierName":"${millSupplierName}","proxySellerSettleType":0,"scrapeOrderId":"${orderId}"}
+ log ${data}
+ ${reps} Post On Session ZTBT recycle-service/admin/customer-service/update/reservation ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
diff --git a/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/2.3-ActiveUpload-deliverynote.robot b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/2.3-ActiveUpload-deliverynote.robot
new file mode 100644
index 0000000..f577cc8
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/2.3-ActiveUpload-deliverynote.robot
@@ -0,0 +1,190 @@
+*** Settings ***
+Documentation 上次送货单-两次付款活动
+Library DateTime
+Library RequestsLibrary
+Library Collections
+Library requests
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get-order-item-list
+ #查找预约的订单项列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order-item-list params=orderType=${orderType} &pageNum=1&pageSize=10&status=51&orderId=${orderId}
+ log ${reps.json()}
+ ${records} Get From Dictionary ${reps.json()["data"]} records #获取订单列表
+ ${orderItemId_value} Evaluate random.choice(${records}) random #随机获取订单信息
+ log to console \nvalue: ${orderItemId_value}
+ ${orderItemId} Get From Dictionary ${orderItemId_value} orderItemId #订单项编号
+ Set Global Variable ${orderItemId}
+ #Should Be Equal As Strings ${reps.json()["data"]["records"][0]} orderId=${orderId}
+
+get-order-item-details
+ #获取订单详情信息
+ 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
+ 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 ${unitSurcharge}
+
+get_delivery-info
+ #获取订单名片信息
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get/proxy-order/delivery-info/${orderItemId}
+ log ${reps.json()}
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]} plateNumber #车牌号
+ ${settleUtiPrice} Get From Dictionary ${reps.json()["data"]} settleUtiPrice #结算单价
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleUtiPrice}
+
+get_contract_by_id
+ #获取下单时绑定的合同
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/contract/get/detail-by-id params=id=${contractId}
+ log ${reps.json()}
+ #获取垫资费、企业ID、应收金额结算规则、含税结算单价结算规则
+ ${advanceFund} Get From Dictionary ${reps.json()["data"]} advanceFund #垫资费
+ ${accountPeriod} Get From Dictionary ${reps.json()["data"]} accountPeriod #账期
+ ${buyerEnterpriseId} Get From Dictionary ${reps.json()["data"]} buyerEnterpriseId #企业id
+ ${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则
+ ${taxRefundRate} Get From Dictionary ${reps.json()["data"]} taxRefundRate #税点
+ ${proxyPaySurcharge} Get From Dictionary ${reps.json()["data"]} proxyPaySurcharge #代收费
+ ${hasInvoice} Get From Dictionary ${reps.json()["data"]} hasInvoice #是否开票
+ ${accountPeriodType} Get From Dictionary ${reps.json()["data"]} accountPeriodType #账期类型
+ ${isSubsidyAndDeductIncludeTax} Get From Dictionary ${reps.json()["data"]} isSubsidyAndDeductIncludeTax #纸厂补贴是否含税
+ ${receivableSettlementRules} Get From Dictionary ${reps.json()["data"]} settleRules #应收金额结算规则
+ ${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则
+ ${advanceFund} Set Variable If '${advanceFund}'=='${None}' 0 ${advanceFund}
+ ${proxyPaySurcharge} Set Variable If '${proxyPaySurcharge}'=='${None}' 0 ${proxyPaySurcharge}
+ Set Global Variable ${advanceFund}
+ Set Global Variable ${accountPeriod}
+ Set Global Variable ${buyerEnterpriseId}
+ Set Global Variable ${taxRefundRate}
+ Set Global Variable ${proxyPaySurcharge}
+ Set Global Variable ${hasInvoice}
+ Set Global Variable ${accountPeriodType}
+ Set Global Variable ${settlePriceIncludeTaxSettleRules}
+ Set Global Variable ${isSubsidyAndDeductIncludeTax}
+ Set Global Variable ${receivableSettlementRules}
+ Set Global Variable ${settlePriceIncludeTaxSettleRules}
+
+get-contract-list
+ #获取订单纸厂的所有合同信息
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT /recycle-service/admin/contract/get/selectable-contract-list params=orderItemId=${orderItemId}
+ log ${reps.json()}
+
+get-supplier
+ #获取纸厂供应商
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId}
+ log ${reps.json()}
+
+get-Source of funds
+ #获取资金来源
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/fund-source/get/list
+ log ${reps.json()}
+ ${data} Get From Dictionary ${reps.json()} data
+ FOR ${item} IN @{data}
+ log ${item}
+ ${isDefault} Get From Dictionary ${item} isDefault #获取启用状态
+ ${name} Get From Dictionary ${item} name #获取name
+ ${id} Get From Dictionary ${item} id #获取id
+ Exit For Loop If '${isDefault}'=='1'
+ END
+ Set Global Variable ${name}
+ Set Global Variable ${id}
+
+get-Warehouse
+ #获取所属仓库
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/transaction-main-enterprise/get/warehouse-name
+ ${仓库} Get From Dictionary ${reps.json()} data
+ #随机获取仓库
+ ${所属仓库} Evaluate random.choice(${仓库}) random
+ log to console \nvalue:${所属仓库}
+ Set Global Variable ${所属仓库}
+
+get_proxy-order_delivery-info
+ #获取订单名片信息
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get/proxy-order/delivery-info/${orderItemId}
+ log ${reps.json()}
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]} plateNumber #车牌号
+ ${settleUtiPrice} Get From Dictionary ${reps.json()["data"]} settleUtiPrice #结算单价
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleUtiPrice}
+
+get_paper-mill-category
+ #获取当前纸厂的所有纸品品类
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-category/${paperMillId} params=id=${paperMillId}
+ log ${reps.json()}
+
+Upload_pictures
+ #上传图片
+ #${dict} Create Dictionary Content-Type=image/jpeg filename=20210803.jpg
+ #Create Session ZTBT ${URL} ${dict}
+ ${filepath} Evaluate open('./20210803.jpg','rb')
+ ${image} Evaluate open('./20210803.jpg','rb')
+ ${file} Create Dictionary filepath=${filepath} image=${image}
+ Create Session ZTBT ${URL}
+ log ${file}
+ ${result} Post On Session ZTBT recycle-user-center/upload/image files=${file}
+ ${pictures} Get From Dictionary ${result.json()} data
+ log ${result.content}
+ Set Global Variable ${pictures}
+
+get_repeat/proxy-order
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/repeat/proxy-order params=orderItemId=${orderItemId} &plateNumber=${plateNumber} &netWeight=30000&weighingDate=${datatime}&orderType=3
+ log ${reps.json()}
+
+weightnote
+ #提交磅单
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${data} Set Variable { \ \ \ \ "settleUtiPrice":"${settleUtiPrice}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "netWeight":15500, \ \ \ \ "settleWeight":null, \ \ \ \ "unitSurcharge":${unitSurcharge}, \ \ \ \ "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}" }
+ log ${data}
+ ${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/save/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}
+
+audit_weightnote
+ #磅单审核接口
+ Create Session ZTBT ${URL} ${header}
+ ${repsonse} Post On Session ZTBT recycle-service/admin/customer-service/audit/weightnote/${weightNoteId}
+ log ${repsonse.json()}
+
+get_proxy-order
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId}
+ log ${reps.json()}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
diff --git a/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/3.3-Operation_audit.robot b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/3.3-Operation_audit.robot
new file mode 100644
index 0000000..3555a8a
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/3.3-Operation_audit.robot
@@ -0,0 +1,135 @@
+*** Settings ***
+Documentation 运营审核-两次付款活动
+Library RequestsLibrary
+Library Collections
+Library DateTime
+Resource 提交磅单.txt
+Resource 运营审核驳回.txt
+Resource 台账查询.txt
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_operation_list
+ #获取运营审核列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0
+ log ${reps.json()}
+
+get_paper-mill-order-by-orderItemId
+ #根据订单编号获取运营审核单
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=${orderItemId}
+ log ${reps.json()}
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId #获取审核id
+ ${weightNoteId} Get From Dictionary ${reps.json()["data"]["records"][0]} weightNoteId #获取磅单id
+ Set Global Variable ${auditRequestId}
+ Set Global Variable ${weightNoteId}
+
+get_order-log-detail
+ #获取订单日志
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId}
+ log ${reps.json()}
+
+get_order-receipt-audit-details
+ #查看运营审核详情
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ ${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} #结算重量
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${datatime}
+
+order-receipt-audit-details
+ #b保存磅单信息
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+get_order-log-detail2
+ #运营审核驳回操作日志
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId} &operationStatus=2
+ log ${reps.json()}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+重复执行驳回和上传磅单操作
+ #重复执行上传磅单、运营驳回操作
+ FOR ${items} IN RANGE 5
+ Run Keyword get_operation_list
+ Run Keyword get_order-receipt-audit-details
+ Run Keyword If '${audit_status}'=='0' Run Keyword 运营审核驳回
+ sleep 1
+ Run Keyword 获取送货单详情
+ Run Keyword If '${status}'=='51' 上传送货单
+ Run Keyword audit_weightnote
+ Run Keyword 获取上传送货单后的订单详情
+ Run Keyword 台账查询
+ END
+
+get_operation_list3
+ #获取运营审核列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId}
+ ${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Set Global Variable ${audit_status}
+ Set Global Variable ${auditRequestId}
+
+get_order-receipt-audit-details3
+ #查看运营审核详情
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ ${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight} #结算重量
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${datatime}
+
+order-receipt-audit-details3
+ #b保存磅单信息
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+operation_audit
+ #运营审核确认通过
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ sleep 1
diff --git a/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/__init__.robot b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/__init__.robot
new file mode 100644
index 0000000..e69de29
diff --git a/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt
new file mode 100644
index 0000000..96eca67
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/台账查询.txt
@@ -0,0 +1,21 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+
+*** 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/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId}
+ ${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据
+ #Set Global Variable ${台账列表数据}
+ Should Be Equal As Numbers ${netWeight} ${reps.json()["data"]["records"][0]["netWeight"]}
+ Should Be Equal As Numbers ${unitSurcharge} ${reps.json()["data"]["records"][0]["unitSurcharge"]}
+ #Should Be Equal As Numbers ${settleWeight} ${reps.json()["data"]["records"][0]["settleWeight"]}
+ #Should Be Equal As Numbers ${settleUnitPrice} ${reps.json()["data"]["records"][0]["settleUtiPrice"]}
+ #Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]}
+ #Should Be Equal As Numbers ${adjustMoney} ${reps.json()["data"]["records"][0]["adjustMoney"]}
diff --git a/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt
new file mode 100644
index 0000000..6545de7
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/提交磅单.txt
@@ -0,0 +1,172 @@
+*** 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()}
diff --git a/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt
new file mode 100644
index 0000000..2098597
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/2.1-Consignment management/运营审核驳回.txt
@@ -0,0 +1,61 @@
+*** 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 ***
+get_operation_list
+ #获取运营审核列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId}
+ ${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Set Global Variable ${audit_status}
+ Set Global Variable ${auditRequestId}
+
+get_order-receipt-audit-details
+ #查看运营审核详情
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight}
+ ${surcharge1} Evaluate ${unitSurcharge}*${netWeight}
+ ${surcharge2} Evaluate ${unitSurcharge}*${settleWeight}
+ ${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${surcharge}
+ Set Global Variable ${auditRequestId}
+
+保存磅单信息
+ #b保存磅单信息
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d #获取当前时间
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+运营审核驳回
+ #运营审核驳回
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":2, \ \ \ \ "remark":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
diff --git a/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot b/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot
new file mode 100644
index 0000000..ee4cd03
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/4-Financial_audit.robot
@@ -0,0 +1,41 @@
+*** Settings ***
+Documentation 代卖应付
+Library RequestsLibrary
+Library Collections
+Resource 财务审核驳回.txt
+Resource 运营审核通过.txt
+Resource 台账查询.txt
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${url} http://api-ops-psc-test.qniao.cn
+${URL1} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_list
+ #获取财务审核列表
+ Create Session ZTBT ${url} ${header}
+ ${reps} Get On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/get/list params=pageNum=1&pageSize=10&status=&orderId=&orderItemId=${orderItemId}
+ ${auditedTime} Get From Dictionary ${reps.json()["data"]["records"][0]} auditedTime #财务第一次确认结算时间
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ #Set Global Variable ${auditedTime}
+
+get_order-log-detail
+ #财务审核驳回操作记录
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId}&operationStatus=3
+
+paper-mill-order-receipt-proof-request_audit
+ #财务审核确认通过
+ Create Session ZTBT ${url} ${header}
+ ${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":1,"remark":"${datatime}" }
+ ${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')}
+ log ${reps.json()}
+ sleep 1
+
+paper-mill-order-receipt-proof-request_settle
+ #确认结算
+ Create Session ZTBT ${url} ${header}
+ ${data} Set Variable { \ \ \ \ "id":"${auditRequestId}", \ \ \ \ "adminId":null }
+ ${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/settle ${data.encode('utf-8')}
+ sleep 1
diff --git a/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot b/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot
new file mode 100644
index 0000000..0f75fdf
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/5-Sales_receivables.robot
@@ -0,0 +1,36 @@
+*** Settings ***
+Documentation 代卖应收
+Library RequestsLibrary
+Library Collections
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_paper-payment-order-list
+ #通过订单编号获取代卖应收列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-payment-order-list params=pageNum=1&pageSize=10&orderId=${orderId}
+ ${paymentOrderId} Get From Dictionary ${reps.json()["data"]["records"][0]} id #回款单号
+ log ${reps.json()}
+ Set Global Variable ${paymentOrderId}
+
+get_order-receipt-audit-details
+ #代卖应收详情
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ ${receivablePriceIncludeTax} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePriceIncludeTax
+ #${receivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePrice #获取应收金额
+ ${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收金额
+ #Set Global Variable ${receivablePrice}
+ Set Global Variable ${receivablePriceIncludeTax}
+ Set Global Variable ${noReceivablePrice}
+
+update_payment-order-status
+ #确认回款操作
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ \ \ \ "paymentOrderId":"${paymentOrderId}", \ \ \ \ "receivablePrice":"${receivablePriceIncludeTax}", \ \ \ \ "paidPrice":"${receivablePriceIncludeTax}", \ \ \ \ "noReceiveblePrice":"${noReceivablePrice}", \ \ \ \ "bankFlowNo":null, \ \ \ \ "paymentAdjustmentFee":null, \ \ \ \ "returnPayDate":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/update/payment-order-status ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ sleep 5
diff --git a/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt b/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt
new file mode 100644
index 0000000..64abf98
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/台账查询.txt
@@ -0,0 +1,20 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+
+*** Variables ***
+${URL1} http://api-ops-ztb-test.qniao.cn
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+
+*** Keywords ***
+台账查询
+ #获取台账列表
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId}
+ ${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据
+ #Set Global Variable ${台账列表数据}
+ #${receivableAdjustMoney1} Get From Dictionary ${reps.json()["data"]["records"][0]} receivableAdjustMoney #获取应收调节费
+ #${receivableAdjustMoney1} Set Variable If '${receivableAdjustMoney}'=='None' Should Not Be Equal As Numbers ${receivableAdjustMoney} ${receivableAdjustMoney1}
+ #Should Be Equal As Numbers ${receivableAdjustMoney} ${reps.json()["data"]["records"][0]["receivableAdjustMoney"]} #对比应收调节费
+ Should Be Equal As Numbers ${noReceivablePrice} ${reps.json()["data"]["records"][0]["noReceivablePrice"]} #对比未收款金额
+ Should Be Equal As Strings ${paperMillPayAt} ${reps.json()["data"]["records"][0]["paperMillPayAt"]} #对比预计回款日期
diff --git a/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt b/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt
new file mode 100644
index 0000000..d9f1ba8
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/财务审核驳回.txt
@@ -0,0 +1,30 @@
+*** Settings ***
+Library Collections
+Library DateTime
+Library RequestsLibrary
+
+*** Variables ***
+${URL1} http://api-ops-ztb-test.qniao.cn
+${url} http://api-ops-psc-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 payment-settlement-center/admin/paper-mill-order-receipt-proof-request/get/list params=pageNum=1&pageSize=10&status=&orderId=&orderItemId=${orderItemId}
+ #${auditedTime} Get From Dictionary ${reps.json()["data"]["records"][0]} auditedTime #财务第一次确认结算时间
+ ${staus} Get From Dictionary ${reps.json()["data"]["records"][0]} status #获取审核状态
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ #Set Global Variable ${auditedTime}
+ Set Global Variable ${staus}
+ Set Global Variable ${auditRequestId}
+
+财务驳回
+ #财务审核驳回
+ Create Session ZTBT ${url} ${header}
+ ${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":2,"remark":"${datatime}" }
+ ${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')}
+ log ${reps.json()}
+ sleep 1
diff --git a/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt b/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt
new file mode 100644
index 0000000..74be8e4
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/3-Withdrawal_application/运营审核通过.txt
@@ -0,0 +1,72 @@
+*** Settings ***
+Library RequestsLibrary
+Library DateTime
+Library Collections
+
+*** Variables ***
+${URL1} http://api-ops-ztb-test.qniao.cn
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+
+*** Keywords ***
+get_operation_list
+ #获取运营审核列表
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId}
+ ${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Set Global Variable ${audit_status}
+ Set Global Variable ${auditRequestId}
+
+get_order-receipt-audit-details
+ #查看运营审核详情
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight}
+ ${surcharge1} Evaluate ${unitSurcharge}*${netWeight}
+ ${surcharge2} Evaluate ${unitSurcharge}*${settleWeight}
+ ${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${surcharge}
+ Set Global Variable ${auditRequestId}
+
+order-receipt-audit-details
+ #b保存磅单信息
+ Create Session ZTBT ${URL1} ${header}
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":"${paperMillPayAt}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":"${publicSubsidies}", \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+运营审核通过
+ #运营审核通过
+ Create Session ZTBT ${URL1} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
+
+运营审核后详情
+ #查看运营审核详情
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ ${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收款金额
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #获取计划回款日期
+ ${receivableAdjustMoney} Get From Dictionary ${reps.json()["data"]["items"][0]} receivableAdjustMoney #获取应收调节费
+ #${noReceivablePrice} Evaluate ${noReceivablePrice}+1
+ Set Global Variable ${noReceivablePrice}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${receivableAdjustMoney}
diff --git a/002-Activeorder/2-Background_system(Test)/4-Consignment_management/2.3-ActiveUpload-weightnote.robot b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/2.3-ActiveUpload-weightnote.robot
new file mode 100644
index 0000000..147307f
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/2.3-ActiveUpload-weightnote.robot
@@ -0,0 +1,207 @@
+*** Settings ***
+Library requests
+Library Collections
+Library RequestsLibrary
+Library DateTime
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_proxy-order-item-list
+ #查找预约的订单项列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order-item-list params=pageNum=1&pageSize=10&orderType=2&status=51&weightNoteType=2&orderItemId=${orderItemId}
+ log ${reps.json()}
+ ${orderItemId} Get From Dictionary ${reps.json()["data"]["records"][0]} orderItemId #订单项编号
+ Set Global Variable ${orderItemId}
+ Should Be Equal As Strings ${reps.json()["data"]["records"][0]["orderId"]} ${orderId}
+
+get_proxy-order-details
+ #查看订单详情
+ 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} #结算单价
+ log ${contractId}
+ 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}
+
+get_delivery-info
+ #获取订单名片信息
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get/proxy-order/delivery-info/${orderItemId}
+ log ${reps.json()}
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]} plateNumber #车牌号
+ ${settleUtiPrice} Get From Dictionary ${reps.json()["data"]} settleUtiPrice #结算单价
+ ${settleUtiPriceIncludeTaxType} Get From Dictionary ${reps.json()["data"]} settleUtiPriceIncludeTaxType #含税补贴价类型
+ ${netWeight} Get From Dictionary ${reps.json()["data"]} netWeight #净重
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleUtiPrice}
+ Set Global Variable ${settleUtiPriceIncludeTaxType}
+ Set Global Variable ${netWeight}
+
+get-contract-list
+ #获取订单纸厂的所有合同信息
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT /recycle-service/admin/contract/get/selectable-contract-list params=orderItemId=${orderItemId}
+ log ${reps.json()}
+
+get_weightnote
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/proxy-sell/get/weightnote/${weightnoteId}
+ log ${reps.json()}
+
+get_paperMill-supplier
+ #获取纸厂供应商
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/paper-mill-merchant/${paperMillId} params=paperMillId=${paperMillId}
+ log ${reps.json()}
+
+get-Warehouse
+ #获取所属仓库
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/transaction-main-enterprise/get/warehouse-name
+ ${仓库} Get From Dictionary ${reps.json()} data
+ #随机获取仓库
+ ${所属仓库} Evaluate random.choice(${仓库}) random
+ log to console \nvalue:${所属仓库}
+ Set Global Variable ${所属仓库}
+
+get-Source of funds
+ #获取资金来源
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/fund-source/get/list
+ log ${reps.json()}
+ ${data} Get From Dictionary ${reps.json()} data
+ FOR ${item} IN @{data}
+ log ${item}
+ ${isDefault} Get From Dictionary ${item} isDefault #获取启用状态
+ ${name} Get From Dictionary ${item} name #获取name
+ ${id} Get From Dictionary ${item} id #获取id
+ Exit For Loop If '${isDefault}'=='1'
+ END
+ Set Global Variable ${name}
+ Set Global Variable ${id}
+
+get_paper-mill-category
+ #获取当前纸厂的所有纸品品类
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/paperMill/get/paper-mill-category/${paperMillId} params=id=${paperMillId}
+ log ${reps.json()}
+
+get_contract_by_id
+ #获取下单时绑定的合同
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/contract/get/detail-by-id params=id=${contractId}
+ log ${reps.json()}
+ #获取垫资费、企业ID、应收金额结算规则、含税结算单价结算规则
+ ${advanceFund} Get From Dictionary ${reps.json()["data"]} advanceFund #垫资费
+ ${buyerEnterpriseId} Get From Dictionary ${reps.json()["data"]} buyerEnterpriseId #企业id
+ ${settleRules} Get From Dictionary ${reps.json()["data"]} settleRules #应收金额结算规则
+ ${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则
+ ${taxRefundRate} Get From Dictionary ${reps.json()["data"]} taxRefundRate #税点
+ ${proxyPaySurcharge} Get From Dictionary ${reps.json()["data"]} proxyPaySurcharge #代收费
+ ${hasInvoice} Get From Dictionary ${reps.json()["data"]} hasInvoice #是否开票
+ ${accountPeriodType} Get From Dictionary ${reps.json()["data"]} accountPeriodType #账期类型
+ ${isSubsidyAndDeductIncludeTax} Get From Dictionary ${reps.json()["data"]} isSubsidyAndDeductIncludeTax #纸厂补贴是否含税
+ ${receivableSettlementRules} Get From Dictionary ${reps.json()["data"]} settleRules #应收金额结算规则
+ ${settlePriceIncludeTaxSettleRules} Get From Dictionary ${reps.json()["data"]} settlePriceIncludeTaxSettleRules #含税结算单价结算规则
+ ${advanceFund} Set Variable If '${advanceFund}'=='${None}' 0 ${advanceFund}
+ ${proxyPaySurcharge} Set Variable If '${proxyPaySurcharge}'=='${None}' 0 ${proxyPaySurcharge}
+ Set Global Variable ${advanceFund}
+ Set Global Variable ${buyerEnterpriseId}
+ Set Global Variable ${taxRefundRate}
+ Set Global Variable ${proxyPaySurcharge}
+ Set Global Variable ${hasInvoice}
+ Set Global Variable ${accountPeriodType}
+ Set Global Variable ${settleRules}
+ Set Global Variable ${settlePriceIncludeTaxSettleRules}
+ Set Global Variable ${isSubsidyAndDeductIncludeTax}
+ Set Global Variable ${receivableSettlementRules}
+ Set Global Variable ${settlePriceIncludeTaxSettleRules}
+
+get-category price
+ #获取下单品类,上传磅单时的价格
+ Create Session ZTBT ${URL} ${header}
+ ${dataTime} Get Current Date result_format=%Y-%m-%d
+ ${reps} Get On Session ZTBT recycle-service/admin/proxy-sell/get-category-price-by-date params=orderItemId=${orderItemId}&weightDay=${dataTime}
+ log ${reps.json()}
+ ${price} Get From Dictionary ${reps.json()["data"][0]} price #下单品类价格
+ ${publicSubsidies} Get From Dictionary ${reps.json()["data"][0]} publicSubsidies #下单品类公开补贴
+ Set Global Variable ${price}
+ Set Global Variable ${publicSubsidies}
+ Set Global Variable ${dataTime}
+
+Upload_pictures
+ #上传图片
+ #${dict} Create Dictionary Content-Type=image/jpeg filename=20210803.jpg
+ #Create Session ZTBT ${URL} ${dict}
+ ${filepath} Evaluate open('E:/lyl/图片/21042217001449712.png','rb')
+ ${image} Evaluate open('E:/lyl/图片/21042217001449712.png','rb')
+ ${file} Create Dictionary filepath=${filepath} image=${image}
+ Create Session ZTBT ${URL}
+ log ${file}
+ ${result} Post On Session ZTBT recycle-user-center/upload/image files=${file}
+ ${pictures} Get From Dictionary ${result.json()} data
+ log ${result.content}
+ Set Global Variable ${pictures}
+
+get_repeat_proxy-order
+ #获取重复订单信息
+ Create Session ZTBT ${URL} ${header}
+ #${datatime}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/repeat/proxy-order params=orderItemId=${orderItemId}&plateNumber=${carList}&settleWeight=13550&weighingDate=${datatime}&orderType=${orderType}
+ log ${reps.json()}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+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":16200, \ \ \ \ "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()}
+
+get_proxy-order
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/customer-service/get/proxy-order/${orderId} params=orderId=${orderId}&orderItemId=${orderItemId}
+ log ${reps.json()}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
diff --git a/002-Activeorder/2-Background_system(Test)/4-Consignment_management/3.3--Operation_audit.robot b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/3.3--Operation_audit.robot
new file mode 100644
index 0000000..7a98145
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/3.3--Operation_audit.robot
@@ -0,0 +1,81 @@
+*** Settings ***
+Library RequestsLibrary
+Library Collections
+Library DateTime
+Resource 更新磅单.txt
+Resource 运营审核驳回.txt
+Resource 台账查询.txt
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_operation_list
+ #获取运营审核列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0
+ log ${reps.json()}
+
+get_paper-mill-order-by-orderItemId
+ #根据订单编号获取运营审核单
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=${orderItemId}
+ log ${reps.json()}
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId #获取审核id
+ ${weightNoteId} Get From Dictionary ${reps.json()["data"]["records"][0]} weightNoteId #获取磅单id
+ Set Global Variable ${auditRequestId}
+ Set Global Variable ${weightNoteId}
+
+get_order-log-detail
+ #获取订单日志
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId}
+ log ${reps.json()}
+
+get_order-receipt-audit-details
+ #查看运营审核详情
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${datatime}
+ Set Global Variable ${settleWeight}
+
+order-receipt-audit-details
+ #b保存磅单信息
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ \ \ \ "auditRequestItemId":"${auditRequestItemId}", \ \ \ \ "categoryName":"${categoryName}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "paperCategoryId":"${paperCategoryId}", \ \ \ \ "paperMillPayAt":null, \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "receivablePrice":5550, \ \ \ \ "settlementDate":"${datatime}", \ \ \ \ "weighingDate":"${datatime}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "isInvoice":"${hasInvoice}", \ \ \ \ "fundSourceId":"${id}", \ \ \ \ "transactionMainEnterpriseName":"${交易主体name}", \ \ \ \ "invoicePoint":"${taxRefundRate}", \ \ \ \ "publicSubsidies":0, \ \ \ \ "publicSubsidiesIncludeTax":0, \ \ \ \ "settleUnitPrice":"${settleUtiPrice}", \ \ \ \ "settleUnitPriceIncludeTax":1.337449, \ \ \ \ "fundSourceName":"${name}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/edit/order-receipt-audit-details ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+get_order-log-detail2
+ #运营审核驳回操作日志
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId} &operationStatus=2
+ log ${reps.json()}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+operation_audit
+ #运营审核确认通过
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":1, \ \ \ \ "remark":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+ sleep 2
diff --git a/002-Activeorder/2-Background_system(Test)/4-Consignment_management/4.3-Financial_audit.robot b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/4.3-Financial_audit.robot
new file mode 100644
index 0000000..8999fe9
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/4.3-Financial_audit.robot
@@ -0,0 +1,36 @@
+*** Settings ***
+Library RequestsLibrary
+Library Collections
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${url} http://api-ops-psc-test.qniao.cn
+${URL1} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_list
+ #获取财务审核列表
+ Create Session ZTBT ${url} ${header}
+ ${reps} Get On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/get/list params=pageNum=1&pageSize=10&status=&orderId=&orderItemId=${orderItemId}
+ log ${reps.json()}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
+
+get_order-log-detail
+ #财务审核驳回操作记录
+ Create Session ZTBT ${URL1} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/order-log-detail params=orderId=${orderId}&weightNoteId=${weightNoteId}&operationStatus=3
+
+paper-mill-order-receipt-proof-request_audit
+ #财务审核确认通过
+ Create Session ZTBT ${url} ${header}
+ ${data} Set Variable {"auditRequestId":"${auditRequestId}","adminId":null,"isPass":1,"remark":"${datatime}" }
+ ${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/audit ${data.encode('utf-8')}
+ log ${reps.json()}
+ sleep 1
+
+paper-mill-order-receipt-proof-request_settle
+ #确认结算
+ Create Session ZTBT ${url} ${header}
+ ${data} Set Variable { \ \ \ \ "id":"${auditRequestId}", \ \ \ \ "adminId":null }
+ ${reps} Post On Session ZTBT payment-settlement-center/admin/paper-mill-order-receipt-proof-request/settle ${data.encode('utf-8')}
+ sleep 2
diff --git a/002-Activeorder/2-Background_system(Test)/4-Consignment_management/5.3-sales_receivable.robot b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/5.3-sales_receivable.robot
new file mode 100644
index 0000000..1061a2f
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/5.3-sales_receivable.robot
@@ -0,0 +1,34 @@
+*** Settings ***
+Documentation 代卖应收
+Library RequestsLibrary
+Library Collections
+
+*** Variables ***
+${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
+${URL} http://api-ops-ztb-test.qniao.cn
+
+*** Test Cases ***
+get_paper-payment-order-list
+ #通过订单编号获取代卖应收列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-payment-order-list params=pageNum=1&pageSize=10&orderId=${orderId}
+ ${paymentOrderId} Get From Dictionary ${reps.json()["data"]["records"][0]} id #回款单号
+ log ${reps.json()}
+ Set Global Variable ${paymentOrderId}
+
+get_order-receipt-audit-details
+ #代卖应收详情
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ ${receivablePriceIncludeTax} Get From Dictionary ${reps.json()["data"]["items"][0]} receivablePriceIncludeTax #获取应收金额
+ #${receivablePrice} Get From Dictionary ${reps.json()["data"]["records"][0]} receivablePrice
+ ${noReceivablePrice} Get From Dictionary ${reps.json()["data"]["items"][0]} noReceivablePrice #获取未收金额
+ Set Global Variable ${receivablePriceIncludeTax}
+ Set Global Variable ${noReceivablePrice}
+
+update_payment-order-status
+ #确认回款操作
+ Create Session ZTBT ${URL} ${header}
+ ${data} Set Variable { \ \ \ \ "paymentOrderId":"${paymentOrderId}", \ \ \ \ "receivablePrice":"${receivablePriceIncludeTax}", \ \ \ \ "paidPrice":"${receivablePriceIncludeTax}", \ \ \ \ "noReceiveblePrice":"${noReceivablePrice}", \ \ \ \ "bankFlowNo":null, \ \ \ \ "paymentAdjustmentFee":null, \ \ \ \ "returnPayDate":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/update/payment-order-status ${data.encode('utf-8')}
+ Should Be Equal As Strings ${reps.json()["message"]} successful
diff --git a/002-Activeorder/2-Background_system(Test)/4-Consignment_management/__init__.robot b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/__init__.robot
new file mode 100644
index 0000000..e69de29
diff --git a/002-Activeorder/2-Background_system(Test)/4-Consignment_management/台账查询.txt b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/台账查询.txt
new file mode 100644
index 0000000..e4b5b68
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/台账查询.txt
@@ -0,0 +1,11 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+
+*** Keywords ***
+台账查询
+ #获取台账列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/parameter/get/parameter params=pageNum=1&pageSize=10&withdrawState=&state=&orderItemId=${orderItemId}
+ ${台账列表数据} Get From List ${reps.json()["data"]["records"]} 0 #获取台账列表数据
+ #Set Global Variable ${台账列表数据}
diff --git a/002-Activeorder/2-Background_system(Test)/4-Consignment_management/更新磅单.txt b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/更新磅单.txt
new file mode 100644
index 0000000..fef1cda
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/更新磅单.txt
@@ -0,0 +1,84 @@
+*** 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()}
diff --git a/002-Activeorder/2-Background_system(Test)/4-Consignment_management/运营审核驳回.txt b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/运营审核驳回.txt
new file mode 100644
index 0000000..ca9a755
--- /dev/null
+++ b/002-Activeorder/2-Background_system(Test)/4-Consignment_management/运营审核驳回.txt
@@ -0,0 +1,53 @@
+*** 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 ***
+get_operation_list
+ #获取运营审核列表
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Get On Session ZTBT recycle-service/admin/operation/get/paper-mill-order-receipt-audit params=pageNum=1&pageSize=10&status=0&orderItemId=&orderId=${orderId}
+ ${audit_status} Get From Dictionary ${reps.json()["data"]["records"][0]} status
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]["records"][0]} auditRequestId
+ Set Global Variable ${audit_status}
+ Set Global Variable ${auditRequestId}
+
+get_order-receipt-audit-details
+ #查看运营审核详情
+ Create Session ZTBT ${URL} ${header}
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/get/order-receipt-audit-details/${auditRequestId}/${weightNoteId}
+ log ${reps.json()}
+ ${auditRequestItemId} Get From Dictionary ${reps.json()["data"]["items"][0]} auditRequestItemId #审核项id
+ ${categoryName} Get From Dictionary ${reps.json()["data"]["items"][0]} categoryName #纸品品类名称
+ ${paperCategoryId} Get From Dictionary ${reps.json()["data"]["items"][0]} paperCategoryId #纸厂品类id
+ ${netWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} netWeight #净重
+ ${paperMillPayAt} Get From Dictionary ${reps.json()["data"]["items"][0]} paperMillPayAt #计划回款日期
+ ${plateNumber} Get From Dictionary ${reps.json()["data"]["items"][0]} plateNumber #车牌号
+ ${settleWeight} Get From Dictionary ${reps.json()["data"]["items"][0]} settleWeight #结算重量
+ ${settleWeight} Set Variable If '${settleWeight}'=='None' 0 ${settleWeight}
+ ${surcharge1} Evaluate ${unitSurcharge}*${netWeight}
+ ${surcharge2} Evaluate ${unitSurcharge}*${settleWeight}
+ ${surcharge} Set Variable If '${proxySellerSettleType}'=='0' ${surcharge1} ${surcharge2} #代卖费总额
+ ${paperMillPayAt} Set Variable If '${paperMillPayAt}'=='无账期' null ${paperMillPayAt} #纸厂账期
+ ${auditRequestId} Get From Dictionary ${reps.json()["data"]} auditRequestId
+ Set Global Variable ${auditRequestItemId}
+ Set Global Variable ${categoryName}
+ Set Global Variable ${netWeight}
+ Set Global Variable ${paperMillPayAt}
+ Set Global Variable ${plateNumber}
+ Set Global Variable ${settleWeight}
+ Set Global Variable ${paperCategoryId}
+ Set Global Variable ${surcharge}
+ Set Global Variable ${auditRequestId}
+
+运营审核驳回
+ #运营审核驳回
+ Create Session ZTBT ${URL} ${header}
+ ${datatime} Get Current Date result_format=%Y-%m-%d
+ ${data} Set Variable { \ \ \ \ "auditRequestId":"${auditRequestId}", \ \ \ \ "isPass":2, \ \ \ \ "remark":"${datatime}" }
+ ${reps} Post On Session ZTBT recycle-service/admin/operation/operation/audit ${data.encode('utf-8')}
diff --git a/16pic_6879381_b.jpg b/16pic_6879381_b.jpg
new file mode 100644
index 0000000..285f957
Binary files /dev/null and b/16pic_6879381_b.jpg differ
diff --git a/20210803.jpg b/20210803.jpg
new file mode 100644
index 0000000..24fe80d
Binary files /dev/null and b/20210803.jpg differ
diff --git a/21042217001449712.png b/21042217001449712.png
new file mode 100644
index 0000000..fba0436
Binary files /dev/null and b/21042217001449712.png differ
diff --git a/log.html b/log.html
index 3ac7be1..0dadfd8 100755
--- a/log.html
+++ b/log.html
@@ -1,11 +1,11 @@
-
+
-
+
-
@@ -1655,7 +1612,7 @@ window.settings = {"background":{"fail":"#f66","pass":"#9e9","skip":"#fed84f"},"
Opening Robot Framework report failed
Verify that you have JavaScript enabled in your browser.
-
Make sure you are using a modern enough browser. If using Internet Explorer, version 11 is required.
+
Make sure you are using a modern enough browser. If using Internet Explorer, version 8 or newer is required.
Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
@@ -1685,12 +1642,12 @@ $(document).ready(function () {
function setBackground(topsuite) {
var color;
- if (topsuite.fail)
+ if (topsuite.criticalFailed)
color = window.settings.background.fail;
- else if (topsuite.pass)
- color = window.settings.background.pass;
+ else if (topsuite.totalFailed)
+ color = window.settings.background.nonCriticalFail;
else
- color = window.settings.background.skip;
+ color = window.settings.background.pass;
$('body').css('background-color', color);
}
@@ -1704,18 +1661,18 @@ function addDetails() {
if (window.location.hash)
showDetailsByHash();
else
- renderSearchSelector();
+ renderTotalSelector();
}
function addCustomSortersForDetails() {
$.tablesorter.addParser({
- id: 'status',
+ id: 'criticality',
type: 'numeric',
is: function(s) {
return false; // do not auto-detect
},
format: function(s) {
- return {'FAIL': -1, 'SKIP': 0, 'PASS': 1}[s];
+ return s === 'yes' ? 0 : 1;
}
});
$.tablesorter.addParser({
@@ -1753,22 +1710,26 @@ function showDetailsByHash() {
action(query);
}
-function totalDetailSelected() {
- renderTotalSelector();
+function totalDetailSelected(name) {
+ renderTotalSelector(name);
+ if (name) {
+ renderTotalDetails(name);
+ var title = name == 'critical' ? 'Critical {Test}s' : 'All {Test}s'
+ updatePrintSelector(testOrTask(title));
+ }
scrollToSelector('totals', name);
}
-function renderTotalSelector() {
- var args = {linkTarget: 'totals',
+function renderTotalSelector(name) {
+ var args = {linkTarget: (name) ? 'totals?'+name : 'totals',
totalTabStatus: 'detail-tab-selected'};
- renderSelector(args, 'totalDetailsSelectorTemplate');
- updatePrintSelector(testOrTask('All {Test}s'));
- renderTotalDetails();
+ renderSelector(args, 'totalDetailsSelectorTemplate', {selected: name});
}
-function renderTotalDetails() {
- var stat = window.testdata.statistics().total[0];
- var tests = window.testdata.suite().allTests().sort(sortByStatus)
+function renderTotalDetails(name) {
+ var index = (name == 'critical') ? 0 : 1;
+ var stat = window.testdata.statistics().total[index];
+ var tests = getTotalTests(name);
stat.totalTime = calculateTotalTime(tests);
$.tmpl('tagOrTotalDetailsTemplate', stat).appendTo('#details-header');
drawTestDetailsTable(tests, true);
@@ -1866,8 +1827,11 @@ function renderSearchSelector(suite, test, include, exclude) {
function renderSearchDetails(suite, test, include, exclude) {
var tests = searchTests(util.escape(suite), util.escape(test),
util.escape(include), util.escape(exclude));
- var stats = calculateStats(tests);
- stats.totalTime = calculateTotalTime(tests);
+ var passed = calculatePassed(tests);
+ var stats = {total: tests.length,
+ pass: passed,
+ fail: tests.length - passed,
+ totalTime: calculateTotalTime(tests)};
$.tmpl('tagOrTotalDetailsTemplate', stats).appendTo('#details-header');
drawTestDetailsTable(tests, true);
}
@@ -1918,16 +1882,23 @@ function renderTestDetailsHeader() {
}
function sortByStatus(t1, t2) {
- if (t1.status == t2.status)
- return t1.fullName < t2.fullName ? -1 : 1;
- statuses = {'FAIL': -1, 'SKIP': 0, 'PASS': 1};
- return statuses[t1.status] < statuses[t2.status] ? -1 : 1;
+ if (t1.status != t2.status)
+ return t1.status == 'FAIL' ? -1 : 1;
+ if (t1.isCritical != t2.isCritical)
+ return t1.isCritical ? -1 : 1;
+ return t1.fullName < t2.fullName ? -1 : 1;
}
function getTestsHavingTag(tag) {
return window.testdata.suite().searchTestsByTag(tag).sort(sortByStatus);
}
+function getTotalTests(name) {
+ if (name == 'critical')
+ return window.testdata.suite().criticalTests().sort(sortByStatus);
+ return window.testdata.suite().allTests().sort(sortByStatus);
+}
+
function calculateTotalTime(tests) {
var total = 0;
for (var i = 0, len = tests.length; i < len; i++)
@@ -1935,19 +1906,11 @@ function calculateTotalTime(tests) {
return util.formatElapsed(total);
}
-function calculateStats(tests) {
+function calculatePassed(tests) {
var passed = util.filter(tests, function (test) {
return test.status == 'PASS';
});
- var failed = util.filter(tests, function (test) {
- return test.status == 'FAIL';
- });
- return {
- total: tests.length,
- pass: passed.length,
- fail: failed.length,
- skip: tests.length - passed.length - failed.length
- };
+ return passed.length;
}
function renderTestDetails(sortByStatus, target) {
@@ -1970,12 +1933,12 @@ function renderTestDetailsRows(tests, target) {
}
function configureTableSorter(sortByStatus) {
- var config = {headers: {3: {sorter: 'status'},
- 5: {sortInitialOrder: 'desc'},
- 6: {sorter: 'times'}},
+ var config = {headers: {3: {sorter: 'criticality'},
+ 6: {sortInitialOrder: 'desc'},
+ 7: {sorter: 'times'}},
selectorSort: '.details-col-header'};
if (sortByStatus)
- config['sortList'] = [[3, 0]];
+ config['sortList'] = [[4, 0], [3, 0]];
$('#test-details').tablesorter(config);
}
@@ -2012,19 +1975,15 @@ function hideHiddenDetailsColumns(elem) {