Commit 66b97cc1 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

数据库验证流程十二脚本编写

parent fb41b191
......@@ -328,7 +328,7 @@ def check_mcms_psi_dept(type=16):
pickBillId=get_PICK_id(branch_id,type)
psiDeptOutBillId=DR_ID
psiDeptOutOrderNo=order_no
create_user=get_login_user_uxid()
create_user=get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1'])
create_time=get_create_time("select create_time from mcms_psi_dept where id='%s';" % DR_ID)
last_modified=get_create_time("select last_modified from mcms_psi_dept where id='%s';" % DR_ID)
last_modified_user=create_user
......@@ -350,7 +350,7 @@ def check_mcms_psi_dept(type=16):
,create_user,create_time,last_modified,last_modified_user)
else:
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_dept_buy5_3',DR_ID,order_no,target_corp_id,target_branch_id,target_dept_id,target_dept_name,target_stock_id
'mcms_psi_dept3',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,
buyBillId,pickOrderNo,buyOrderNo,pickBillId,psiDeptOutBillId,psiDeptOutOrderNo
......@@ -437,11 +437,13 @@ try:
# 上面暂时注释========================
#检查出库单
# check_mcms_psi_dept(16)
check_mcms_psi_dept(20)
# check_mcms_psi_dept(20)
check_mcms_psi_dept(66)
second_dept_one_key_in(5)
second_dept_one_key_in(5)
second_dept_one_key_in(5)
commonFuc().check_text_exist_result_text('succees', 'succees')
except:
except Exception as e:
# 打印错误信息
print(f"发生错误: {e}")
commonFuc().check_text_exist_result_text('error', '1')
......@@ -170,6 +170,18 @@ def get_id(sql):
cursor.close()
return new_str1
def get_login_user_uxid_bydb(username):
db, cursor = get_sql_conn()
cursor.execute("select id from sys_user where user_code='%s'"%username)
results = cursor.fetchone()
str1 = str(results)
new_str1 = str1.replace(',)', '')
new_str1 = new_str1.replace('(', '')
new_str1 = new_str1.replace(',', '')
new_str1 = new_str1.replace("'", '')
# print(new_str1)
cursor.close()
return new_str1
def get_dept_buy_id(sql):
db, cursor = get_sql_conn()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment