diff --git "a/air_case/b6_spd3_core_business_flow_database_check/a_b7\346\265\201\347\250\213\345\215\201\345\233\233\351\200\200\345\272\223\344\270\232\345\212\241_\346\266\210\350\200\227\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b7\346\265\201\347\250\213\345\215\201\345\233\233\351\200\200\345\272\223\344\270\232\345\212\241_\346\266\210\350\200\227\351\200\200\345\272\223_\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_b7\346\265\201\347\250\213\345\215\201\345\233\233\351\200\200\345\272\223\344\270\232\345\212\241_\346\266\210\350\200\227\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b7\346\265\201\347\250\213\345\215\201\345\233\233\351\200\200\345\272\223\344\270\232\345\212\241_\346\266\210\350\200\227\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" index 9a1ac4c983a4b256ef34687ae484c14f03c5c211..75f8e396b81323a0f4b3077e6a1671241e562634 100644 --- "a/air_case/b6_spd3_core_business_flow_database_check/a_b7\346\265\201\347\250\213\345\215\201\345\233\233\351\200\200\345\272\223\344\270\232\345\212\241_\346\266\210\350\200\227\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b7\346\265\201\347\250\213\345\215\201\345\233\233\351\200\200\345\272\223\344\270\232\345\212\241_\346\266\210\350\200\227\351\200\200\345\272\223_\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_b7\346\265\201\347\250\213\345\215\201\345\233\233\351\200\200\345\272\223\344\270\232\345\212\241_\346\266\210\350\200\227\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.air/a_b7\346\265\201\347\250\213\345\215\201\345\233\233\351\200\200\345\272\223\344\270\232\345\212\241_\346\266\210\350\200\227\351\200\200\345\272\223_\346\225\260\346\215\256\345\272\223\351\252\214\350\257\201.py" @@ -911,6 +911,106 @@ def check_mcms_psi_dept_XH_CK(type1=10,type2=16): print('error') commonFuc().check_text_exist_result_text('error', 'succees') +def check_his_order(type1=10): + print('检查his_order数据') + branch_id = get_branch_id() + sql = " select * from his_order where branch_id='%s' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id) + + actual = check_mcms_dept_buy_sql(sql) + print(actual) + + DR_ID = get_id( + " select id from his_order where branch_id='%s' order by CREATE_TIME desc LIMIT 1;" % ( + branch_id)) + sql = "select order_no from his_order where id='%s';" % DR_ID + order_no = get_id(sql) + target_corp_id = get_hosid() + target_branch_id = get_branch_id() + target_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] + target_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + target_stock_id = get_stockId_fromdb(target_dept_name + '库房') + target_area_code = get_stockAreaId_new_fromDb(target_dept_name, 2) + PICK_id = get_PICK_id(branch_id, type1) + source_id = PICK_id + source_corp_id = get_hosid() + source_branch_id = get_branch_id() + source_dept_id = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] + source_dept_name = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] + source_stock_id = get_stockId_fromdb(source_dept_name + '库房') + source_area_code = get_stockAreaId_new_fromDb(source_dept_name, 2) + buyBillId = get_buyBillId(branch_id, type1) + pickOrderNo = get_PICK_order_no(branch_id, type1) + buyOrderNo = get_buyOrderNo(branch_id, type1) + pickBillId = get_PICK_id(branch_id, type1) + psiDeptOutBillId = DR_ID + psiDeptOutOrderNo = order_no + create_user = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']) + create_time = get_create_time("select create_time from his_order where id='%s';" % DR_ID) + last_modified = get_create_time("select last_modified from his_order where id='%s';" % DR_ID) + last_modified_user = create_user + accounter = create_user + account_date = process_tuple(get_create_time("select account_date from his_order where id='%s';" % DR_ID)) + if type1 == 10: + his_charge_no = get_id( + " select his_charge_no from his_order where branch_id='%s' and psi_dept_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, DR_ID)) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'his_order1', DR_ID, order_no, target_corp_id, + target_branch_id, + target_dept_id, target_dept_name, target_stock_id + , target_area_code, source_id, source_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code, + his_charge_no, accounter, account_date, + pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo + , create_user, create_time, last_modified, last_modified_user + + ) + elif type1 == 67: + + his_charge_no = get_id( + " select his_charge_no from his_order where branch_id='%s' and psi_dept_id='%s' order by create_time desc LIMIT 1;" % ( + branch_id, DR_ID)) + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'his_order2', DR_ID, order_no, target_corp_id, + target_branch_id, + target_dept_id, target_dept_name, target_stock_id + , target_area_code, source_id, source_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code, + his_charge_no, accounter, account_date, + pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo + , create_user, create_time, last_modified, last_modified_user + ) + else: + + expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', + 'his_order3', DR_ID, order_no, target_corp_id, target_branch_id, + target_dept_id, target_dept_name, target_stock_id + , target_area_code, source_id, source_corp_id, source_branch_id, + source_dept_id, source_dept_name, source_stock_id, source_area_code, + accounter, account_date, + pickOrderNo, pickBillId, psiDeptOutBillId, psiDeptOutOrderNo + , create_user, create_time, last_modified, last_modified_user + + ) + print('expected', expected) + print('aaaaaaaaaaaaaaaaa') + 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) + print(compare_text_index(actual_value2, expected_value2)) + 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)