From fcd60b7e0822f51af0ed505a883f40c2c53efc78 Mon Sep 17 00:00:00 2001 From: xiao-hesheng Date: Fri, 8 Nov 2024 13:58:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=B8=80=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...56\345\272\223\351\252\214\350\257\201.py" | 75 +++++++++++++++---- 1 file changed, 59 insertions(+), 16 deletions(-) diff --git "a/air_case/b6_spd3_core_business_flow_database_check/a_a1_\346\265\201\347\250\213\344\270\200\345\244\226\347\275\221\344\274\201\344\270\232\346\263\250\345\206\214\345\256\241\346\211\271_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_a1_\346\265\201\347\250\213\344\270\200\345\244\226\347\275\221\344\274\201\344\270\232\346\263\250\345\206\214\345\256\241\346\211\271_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" "b/air_case/b6_spd3_core_business_flow_database_check/a_a1_\346\265\201\347\250\213\344\270\200\345\244\226\347\275\221\344\274\201\344\270\232\346\263\250\345\206\214\345\256\241\346\211\271_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_a1_\346\265\201\347\250\213\344\270\200\345\244\226\347\275\221\344\274\201\344\270\232\346\263\250\345\206\214\345\256\241\346\211\271_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" index 9eb8bced..2f24cee0 100644 --- "a/air_case/b6_spd3_core_business_flow_database_check/a_a1_\346\265\201\347\250\213\344\270\200\345\244\226\347\275\221\344\274\201\344\270\232\346\263\250\345\206\214\345\256\241\346\211\271_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_a1_\346\265\201\347\250\213\344\270\200\345\244\226\347\275\221\344\274\201\344\270\232\346\263\250\345\206\214\345\256\241\346\211\271_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" +++ "b/air_case/b6_spd3_core_business_flow_database_check/a_a1_\346\265\201\347\250\213\344\270\200\345\244\226\347\275\221\344\274\201\344\270\232\346\263\250\345\206\214\345\256\241\346\211\271_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_a1_\346\265\201\347\250\213\344\270\200\345\244\226\347\275\221\344\274\201\344\270\232\346\263\250\345\206\214\345\256\241\346\211\271_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" @@ -26,13 +26,13 @@ def check_company_regist_bill(type=1): sql1 = "select * from spd_ybtest_hdi.company_regist_bill order by create_time desc limit 1;" actual = check_mcms_pur_sql(sql1) print('actual', actual) - id = get_id("select id from spd_ybtest_hdi.supply_relation order by create_time desc limit 1;") - hos_id = get_id("select hos_id from spd_ybtest_hdi.supply_relation where id='%s';" % id) + id = get_id("select id from spd_ybtest_hdi.company_regist_bill order by create_time desc limit 1;") + hos_id = get_id("select hos_id from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) prov_id = get_prov_id() - sub_prov_id = get_id("select sub_prov_id from spd_ybtest_hdi.supply_relation where id='%s';" % id) - contact_way = get_id("select contact_way from spd_ybtest_hdi.supply_relation where id='%s';" % id) - contact_user = get_id("select contact_user from spd_ybtest_hdi.supply_relation where id='%s';" % id) - create_time = get_create_time("select create_time from spd_ybtest_hdi.supply_relation where id='%s';" % id) + sub_prov_id = get_id("select sub_prov_id from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) + contact_way = get_id("select contact_way from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) + contact_user = get_id("select contact_user from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) + create_time = get_create_time("select create_time from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) # last_modified = get_create_time("select last_modified from spd_ybtest_hdi.supply_relation where id='%s';" % id) # username = commonFuc().get_business_data('b2_herp3_bs', "username") auditor = get_id("select auditor from spd_ybtest_hdi.supply_relation where id='%s';" % id) @@ -42,7 +42,7 @@ def check_company_regist_bill(type=1): audit_time = get_create_time("select audit_time from spd_ybtest_hdi.supply_relation where id='%s';" % id) last_modified = get_create_time("select last_modified from spd_ybtest_hdi.supply_relation where id='%s';" % id) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', - 'check_supply_relation2', id, hos_id, prov_id, sub_prov_id, contact_way + 'company_regist_bill', id, hos_id, prov_id, sub_prov_id, contact_way , contact_user, auditor, audit_time, create_user, create_time, last_modified_user, last_modified) @@ -69,23 +69,23 @@ def check_company_regist_bill(type=1): sql1 = "select * from spd_ybtest_hdi.company_regist_bill order by create_time desc limit 1;" actual = check_mcms_pur_sql(sql1) print('actual', actual) - id = get_id("select id from spd_ybtest_hdi.supply_relation order by create_time desc limit 1;") - hos_id = get_id("select hos_id from spd_ybtest_hdi.supply_relation where id='%s';" % id) + id = get_id("select id from spd_ybtest_hdi.company_regist_bill order by create_time desc limit 1;") + hos_id = get_id("select hos_id from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) prov_id = get_prov_id() - sub_prov_id = get_id("select sub_prov_id from spd_ybtest_hdi.supply_relation where id='%s';" % id) - contact_way = get_id("select contact_way from spd_ybtest_hdi.supply_relation where id='%s';" % id) - contact_user = get_id("select contact_user from spd_ybtest_hdi.supply_relation where id='%s';" % id) - create_time = get_create_time("select create_time from spd_ybtest_hdi.supply_relation where id='%s';" % id) + sub_prov_id = get_id("select sub_prov_id from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) + contact_way = get_id("select contact_way from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) + contact_user = get_id("select contact_user from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) + create_time = get_create_time("select create_time from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) # last_modified = get_create_time("select last_modified from spd_ybtest_hdi.supply_relation where id='%s';" % id) # username = commonFuc().get_business_data('b2_herp3_bs', "username") - auditor = get_id("select auditor from spd_ybtest_hdi.supply_relation where id='%s';" % id) + auditor = get_id("select auditor from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) create_user = get_login_user_uxid_bydb( FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"]) last_modified_user = get_id("select id from spd_ybtest_hdi.sys_user where user_code='test_1';") audit_time = get_create_time("select audit_time from spd_ybtest_hdi.supply_relation where id='%s';" % id) - last_modified = get_create_time("select last_modified from spd_ybtest_hdi.supply_relation where id='%s';" % id) + last_modified = get_create_time("select last_modified from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', - 'check_supply_relation2', id, hos_id, prov_id, sub_prov_id, contact_way + 'company_regist_bill2', id, hos_id, prov_id, sub_prov_id, contact_way , contact_user, auditor, audit_time, create_user, create_time, last_modified_user, last_modified) @@ -106,6 +106,49 @@ def check_company_regist_bill(type=1): else: print('error') commonFuc().check_text_exist_result_text('error', 'succees') +def check_bas_company_info(): + print('检查bas_company_info数据') + branch_id = get_branch_id() + sql1 = "select * from spd_ybtest_hdi.bas_company_info order by create_time desc limit 1;" + actual = check_mcms_pur_sql(sql1) + print('actual', actual) + id = get_id("select id from spd_ybtest_hdi.bas_company_info order by create_time desc limit 1;") + hos_id = get_id("select hos_id from spd_ybtest_hdi.bas_company_info where id='%s';" % id) + prov_id = get_prov_id() + sub_prov_id = get_id("select sub_prov_id from spd_ybtest_hdi.bas_company_info where id='%s';" % id) + contact_way = get_id("select contact_way from spd_ybtest_hdi.bas_company_info where id='%s';" % id) + contact_user = get_id("select contact_user from spd_ybtest_hdi.bas_company_info where id='%s';" % id) + create_time = get_create_time("select create_time from spd_ybtest_hdi.bas_company_info where id='%s';" % id) + # last_modified = get_create_time("select last_modified from spd_ybtest_hdi.supply_relation where id='%s';" % id) + # username = commonFuc().get_business_data('b2_herp3_bs', "username") + auditor = get_id("select auditor from spd_ybtest_hdi.bas_company_info where id='%s';" % id) + create_user = get_login_user_uxid_bydb( + FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_username"]) + last_modified_user = get_id("select id from spd_ybtest_hdi.sys_user where user_code='test_1';") + audit_time = get_create_time("select audit_time from spd_ybtest_hdi.supply_relation where id='%s';" % id) + last_modified = get_create_time("select last_modified from spd_ybtest_hdi.company_regist_bill where id='%s';" % id) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'bas_company_info2', id, hos_id, prov_id, sub_prov_id, contact_way + , contact_user, auditor, audit_time, create_user, create_time, + last_modified_user, last_modified) + + actual_value1 = get_process_list2(actual) + expected_value1 = get_process_list2(expected) + actual_value2 = actual_value1.replace(" ", "") + expected_value2 = expected_value1.replace(" ", "") + # print('actual_value2',actual_value2) + print('expected_value2') + print(expected_value2) + print('actual_value2') + print(actual_value2) + result = (compare_text_index(actual_value2, expected_value2)) + print('result', result) + if actual_value2 == expected_value2: + print('ok') + commonFuc().check_text_exist_result_text('succees', 'succees') + else: + print('error') + commonFuc().check_text_exist_result_text('error', 'succees') pro_path = commonFuc().get_pro_path2() print('pro_path', pro_path) sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_a1_流程一外网企业注册审批.air') -- GitLab