diff --git a/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot b/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot index 9d2f5e7..98e2b1f 100644 --- a/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot +++ b/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot @@ -29,9 +29,10 @@ operate_open_account_printing_packaging_factory ${printing_packaging_factory_locdistrictname} Set Variable 天河区 ${printing_packaging_factory_locstreetname} Set Variable 车陂街道 ${body} Set Variable {"name":"${printing_packaging_factory_name}","type":${printing_packaging_factory_type},"shortName":"${printing_packaging_factory_shortname}","uniformSocialCreditCode":"${printing_packaging_factory_uniformsocialcreditcode}","locDetail":"${printing_packaging_factory_locdetail}","legalPersonName":"${printing_packaging_factory_legalpersonname}","legalPersonIdCardNo":"${printing_packaging_factory_legalpersonidcardno}","locProvinceId":${printing_packaging_factory_locprovinceid},"locCityId":${printing_packaging_factory_loccityid},"locDistrictId":${printing_packaging_factory_locdistrictid},"locStreetId":${printing_packaging_factory_locstreetid},"locProvinceName":"${printing_packaging_factory_locprovincename}","locCityName":"${printing_packaging_factory_loccityname}","locDistrictName":"${printing_packaging_factory_locdistrictname}","locStreetName":"${printing_packaging_factory_locstreetname}"} - Set Suite Variable ${printing_packaging_factory_name} + Set Global Variable ${printing_packaging_factory_name} Set Suite Variable ${printing_packaging_factory_shortname} - Set Suite Variable ${printing_packaging_factory_legalpersonname} + Set Global Variable ${printing_packaging_factory_legalpersonname} + Set Global Variable ${printing_packaging_factory_legalpersonidcardno} ${response} POST On Session yytops /cloud-print-user-center/admin/save/enterprise ${body.encode("utf8")} Log ${response.status_code} log ${response.json()} @@ -62,7 +63,7 @@ operate_get_printing_packaging_factory_search Should Be Equal As Strings ${printing_packaging_factory_shortname} ${response.json()["data"]["records"][0]["shortName"]} Should Be Equal As Strings ${printing_packaging_factory_legalpersonname} ${response.json()["data"]["records"][0]["legalPersonName"]} ${printing_packaging_factory_id} Get From Dictionary ${response.json()["data"]["records"][0]} id - Set Suite Variable ${printing_packaging_factory_id} + Set Global Variable ${printing_packaging_factory_id} operate_get_printing_packaging_factory_modify_state Create Session uecops ${uecops} headers=${operationbackend_header} diff --git a/005_enterprise_apply_credit/apply_credit_qniao_customer.robot b/005_enterprise_apply_credit/apply_credit_qniao_customer.robot index a8166de..a73d728 100644 --- a/005_enterprise_apply_credit/apply_credit_qniao_customer.robot +++ b/005_enterprise_apply_credit/apply_credit_qniao_customer.robot @@ -9,6 +9,22 @@ ${pscops} https://api-ops-psc-test.qniao.cn ${yytops} https://api-ops-yyt-test.qniao.cn *** Test Cases *** +operate_save_apply_credit_qniao + Disable Warnings + Create Session yytops ${yytops} headers=${operationbackend_header} + ${printing_packaging_factory_type} Set Variable 2 + ${printing_packaging_factory_purpose} Set Variable 1 #授信类型 1采购原纸 + ${printing_packaging_factory_creditLine} Set Variable 990000 + ${printing_packaging_factory_paperSettlementIntervalTypeId} Set Variable 11 #结算周期 11月结30天 12月结45天 13月结60天 14月结75天 15月结90天 + ${printing_packaging_factory_remark} Set Variable autotest_remark + ${body} Set Variable {"creditLine":${printing_packaging_factory_creditLine},"enterpriseId":"${printing_packaging_factory_id}","enterpriseName":"${printing_packaging_factory_name}","enterpriseType":${printing_packaging_factory_type},"legalpersonIdNo":"${printing_packaging_factory_legalpersonidcardno}","legalpersonMobile":null,"legalpersonName":"${printing_packaging_factory_legalpersonname}","purpose":${printing_packaging_factory_purpose},"remark":"${printing_packaging_factory_remark}","paperSettlementIntervalTypeId":"${printing_packaging_factory_paperSettlementIntervalTypeId}"} + ${response} POST On Session yytops /cloud-print-user-center/admin/credit/application/save/application ${body.encode("utf8")} + Log ${response.status_code} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + sleep 1 + operate_get_credit_list Create Session yytops ${yytops} headers=${operationpsc_header} ${response} Get On Session yytops /cloud-print-user-center/admin/credit/application/get/application-order-list @@ -17,11 +33,88 @@ operate_get_credit_list Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} -operate_get_credit_search +operate_get_credit_list_search Create Session yytops ${yytops} headers=${operationpsc_header} - ${param} Set Variable timeBegin=2021-09-29 00:00:00&timeEnd=2021-09-29 23:59:59&enterpriseType=2&status=1&enterpriseName=测试&legalpersonName=测试 + ${param} Set Variable timeBegin=${current_date} 00:00:00&timeEnd=${current_date} 23:59:59&enterpriseType=${printing_packaging_factory_type}&status=1&enterpriseName=${printing_packaging_factory_name}&legalpersonName=${printing_packaging_factory_legalpersonname} ${response} Get On Session yytops /cloud-print-user-center/admin/credit/application/get/application-order-list params=${param} Log ${response.status_code} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} + ${printing_packaging_factory_credit_id} Get From Dictionary ${response.json()["data"]["records"][0]} id + Set Suite Variable ${printing_packaging_factory_credit_id} + +operate_verify_reject_apply_credit_qniao + Disable Warnings + Create Session yytops ${yytops} headers=${operationbackend_header} + ${printing_packaging_factory_verify_status} Set Variable 2 #审核状态 1审核通过 2审核驳回 + ${body} Set Variable {"status":${printing_packaging_factory_verify_status}} + ${response} Put On Session yytops /cloud-print-user-center/admin/credit/application/verify/application-order/${printing_packaging_factory_credit_id} ${body.encode("utf8")} + Log ${response.status_code} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + sleep 1 + +operate_update_apply_credit_qniao + Disable Warnings + Create Session yytops ${yytops} headers=${operationbackend_header} + ${printing_packaging_factory_type} Set Variable 2 + ${printing_packaging_factory_purpose} Set Variable 1 #授信类型 1采购原纸 + ${printing_packaging_factory_creditLine} Set Variable 990000 + ${printing_packaging_factory_paperSettlementIntervalTypeId} Set Variable 11 #结算周期 11月结30天 12月结45天 13月结60天 14月结75天 15月结90天 + ${printing_packaging_factory_remark} Set Variable autotest_remark + ${body} Set Variable {"id":"${printing_packaging_factory_credit_id}","creditLine":${printing_packaging_factory_creditLine},"enterpriseId":"${printing_packaging_factory_id}","enterpriseName":"${printing_packaging_factory_name}","enterpriseType":${printing_packaging_factory_type},"legalpersonIdNo":"${printing_packaging_factory_legalpersonidcardno}","legalpersonMobile":null,"legalpersonName":"${printing_packaging_factory_legalpersonname}","purpose":${printing_packaging_factory_purpose},"remark":"${printing_packaging_factory_remark}","paperSettlementIntervalTypeId":"${printing_packaging_factory_paperSettlementIntervalTypeId}"} + ${response} POST On Session yytops /cloud-print-user-center/admin/credit/application/save/application ${body.encode("utf8")} + Log ${response.status_code} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + sleep 1 + +operate_verify_pass_apply_credit_qniao + Disable Warnings + Create Session yytops ${yytops} headers=${operationbackend_header} + ${printing_packaging_factory_verify_status} Set Variable 1 #审核状态 1审核通过 2审核驳回 + ${body} Set Variable {"status":${printing_packaging_factory_verify_status}} + ${response} Put On Session yytops /cloud-print-user-center/admin/credit/application/verify/application-order/${printing_packaging_factory_credit_id} ${body.encode("utf8")} + Log ${response.status_code} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + sleep 1 + +operate_get_credit_list_details + Create Session yytops ${yytops} headers=${operationpsc_header} + ${response} Get On Session yytops /cloud-print-user-center/admin/credit/get/enterprise-credit-list + Log ${response.status_code} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + +operate_get_credit_list_details_search + Create Session yytops ${yytops} headers=${operationpsc_header} + ${param} Set Variable enterpriseName=${printing_packaging_factory_name}&legalpersonName=${printing_packaging_factory_legalpersonname} + ${response} Get On Session yytops /cloud-print-user-center/admin/credit/get/enterprise-credit-list params=${param} + Log ${response.status_code} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + Should Be Equal As Strings ${printing_packaging_factory_name} ${response.json()["data"]["records"][0]["enterpriseName"]} + ${printing_packaging_factory_credit_details_id} Get From Dictionary ${response.json()["data"]["records"][0]} id + Set Suite Variable ${printing_packaging_factory_credit_details_id} + +operate_get_credit_list_details_list + Create Session yytops ${yytops} headers=${operationpsc_header} + ${response} Get On Session yytops /cloud-print-user-center/admin/credit/order/get/order-list/${printing_packaging_factory_credit_details_id} + Log ${response.status_code} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + Should Be Equal As Strings ${printing_packaging_factory_creditLine} ${response.json()["data"]["records"][0]["currentCreditLine"]} + +database_delete_printing_packaging_factory_credit + Connect To Database Using Custom Params pymysql database='yyt_user_center', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8' + Execute Sql String update qn_enterprise_credit_application set is_delete = 1 where enterprise_id = ${printing_packaging_factory_id} + Execute Sql String update qn_enterprise_credit_order set is_delete = 1 where enterprise_id = ${printing_packaging_factory_id} + Disconnect From Database