You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
5.1 KiB
44 lines
5.1 KiB
*** Settings ***
|
|
Library urllib3
|
|
Library DateTime
|
|
Library Collections
|
|
Library RequestsLibrary
|
|
|
|
*** Test Cases ***
|
|
create_papermill_org
|
|
#创建纸厂组织
|
|
Disable Warnings
|
|
Create Session ZTBTSC ${ztbscops} ${ztbsc_header}
|
|
${data} Set Variable {"fullName":"自动化测试纸厂"}
|
|
${reps} Post On Session ZTBTSC ztb-user-enterprise-service/admin/paper-mill/create ${data.encode('utf-8')}
|
|
${papermill_orgId} Get From Dictionary ${reps.json()["data"]} organizationId #获取造纸厂组织id
|
|
${papermill_Id} Get From Dictionary ${reps.json()["data"]} id #获取造纸厂id
|
|
Should Be Equal As Strings ${reps.json()["message"]} successful
|
|
Should Be Equal As Numbers ${reps.json()["code"]} 0
|
|
Set Global Variable ${papermill_orgId}
|
|
Set Global Variable ${papermill_Id}
|
|
#修改组织税点信息
|
|
Create Session ZTBTSC ${uecops} ${ztbsc_header}
|
|
${enterprise_data} Set Variable { \ \ \ \ "inputTaxPoint":"2051,2052,2053", "organizationId":"${papermill_orgId}" }
|
|
${reps} Post On Session ZTBTSC uec/admin/save/enterprise-tax-info ${enterprise_data.encode('utf-8')}
|
|
${papermill_baseinfo} Get On Session ZTBTSC uec/admin/get/enterprise/detail/by-org-id params=orgId=${papermill_orgId} #获取造纸厂基础信息
|
|
${papermill_Name} Get From Dictionary ${papermill_baseinfo.json()["data"]} name
|
|
Set Global Variable ${papermill_Name}
|
|
|
|
create_category_quote
|
|
#新增纸厂品类报价
|
|
Create Session ZTBTSC ${ztbscops} ${ztbsc_header}
|
|
${category_data} Set Variable { \ \ \ \ "paperMillId":"${papermill_Id}", \ \ \ \ "quoteEffectiveTime":"${time}", \ \ \ \ "toCreateCategoryQuoteList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryDto":{ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "paperMillId":"${papermill_Id}", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "paperMillScrapPaperCategoryName":"一级纸" \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryQuoteDto":{ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "floatingQuotedPrice":"", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "allowOrder":1, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "paperMillId":"${papermill_Id}", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "publicSubsidies":0.01, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "quotedPrice":2, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "sortNumber":1 \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryDto":{ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "paperMillId":"${papermill_Id}", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "paperMillScrapPaperCategoryName":"白卡" \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryQuoteDto":{ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "floatingQuotedPrice":"", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "allowOrder":1, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "paperMillId":"${papermill_Id}", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "publicSubsidies":"", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "quotedPrice":2.2, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "sortNumber":2 \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryDto":{ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "paperMillId":"${papermill_Id}", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "paperMillScrapPaperCategoryName":"小白花" \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ "paperCategoryQuoteDto":{ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "floatingQuotedPrice":"", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "allowOrder":1, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "paperMillId":"${papermill_Id}", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "publicSubsidies":"", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "quotedPrice":2.11, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "sortNumber":3 \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "toUpdateCategoryQuoteList":[ \ \ \ \ \ ], \ \ \ \ "toDeleteCategoryList":[ \ \ \ \ \ ], \ \ \ \ "toDeleteCategoryQuoteList":[ \ \ \ \ \ ] }
|
|
${category_reps} Post On Session ZTBTSC ztb-supply-chain-service/admin/save/scrap-paper-category-quote ${category_data.encode('utf-8')}
|
|
Should Be Equal As Strings ${category_reps.json()["message"]} successful
|
|
${category_list_reps} Get On Session ZTBTSC ztb-supply-chain-service/admin/get/paper-mill-purchase/scrap-paper-category-quote-list params=paperMillId=${papermill_Id}&pageNum=1&pageSize=10
|
|
${quoteEffectiveTime} Get From Dictionary ${category_list_reps.json()["data"]["records"][0]} quoteEffectiveTime
|
|
${CategoryQuoteVoList} Get From Dictionary ${category_list_reps.json()["data"]["records"][0]} paperCategoryQuoteVoList
|
|
FOR ${index} ${items} IN ENUMERATE @{CategoryQuoteVoList}
|
|
${category_id} Evaluate [category_id['paperMillScrapPaperCategoryId']for category_id in ${items}]
|
|
#${category_name} Get From Dictionary ${items} paperMillScrapPaperCategoryName
|
|
#${publicSubsidies} Get From Dictionary ${items} publicSubsidies
|
|
#${publicSubsidies} Set Variable If ${publicSubsidies}==None 0 ${publicSubsidies}
|
|
#${quotedPrice} Get From Dictionary ${items} quotedPrice
|
|
END
|
|
Set Global Variable ${category_id}
|