Commit a366dea0 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

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

parent 1a06ecc0
...@@ -748,6 +748,7 @@ def check_mcms_purchase(type=16): ...@@ -748,6 +748,7 @@ def check_mcms_purchase(type=16):
# 要验证的数据sql # 要验证的数据sql
sql1 = "select * from mcms_purchase where branch_id='%s' and bill_mode='%s' and id='%s' order by create_time desc LIMIT 1;" % ( sql1 = "select * from mcms_purchase where branch_id='%s' and bill_mode='%s' and id='%s' order by create_time desc LIMIT 1;" % (
branch_id, type, id1) branch_id, type, id1)
print(sql1)
# 获取实际值 # 获取实际值
actual = check_mcms_pur_plan_sql(sql1) actual = check_mcms_pur_plan_sql(sql1)
print('actual', actual) print('actual', actual)
...@@ -764,24 +765,25 @@ def check_mcms_purchase(type=16): ...@@ -764,24 +765,25 @@ def check_mcms_purchase(type=16):
area_code = commonFuc().analysis_json('shelfCode', list_a) area_code = commonFuc().analysis_json('shelfCode', list_a)
area_name = '默认库区' area_name = '默认库区'
# source_id = id1 # source_id = id1
rec_user = get_login_user_uxid() rec_user = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1']
# rec_user = get_login_user_uxid()
rec_addr = '自动化测试' rec_addr = '自动化测试'
sql = "select bill_expdt_date from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( sql = "select bill_expdt_date from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % (
branch_id, buyBillId) branch_id, buyBillId)
print(sql) print(sql)
bill_expdt_date = get_expdt_date(sql) bill_expdt_date = get_expdt_date(sql)
create_user = rec_user create_user = get_login_user_uxid()
create_time = get_create_time( create_time = get_create_time(
"select create_time from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( "select create_time from mcms_purchase where branch_id='%s' and id='%s' order by create_time desc LIMIT 1;" % (
branch_id, id1)) branch_id, id1))
last_modified = get_create_time( last_modified = get_create_time(
"select last_modified from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( "select last_modified from mcms_purchase where branch_id='%s' and id='%s' order by create_time desc LIMIT 1;" % (
branch_id, id1)) branch_id, id1))
last_modified_user = create_user last_modified_user = create_user
last_auditor=last_modified last_auditor=rec_user
last_audit_time= get_create_time( last_audit_time= get_create_time(
"select last_audit_time from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;" % ( "select last_audit_time from mcms_purchase where branch_id='%s' and id='%s' order by create_time desc LIMIT 1;" % (
branch_id, id1)) branch_id, id1))
if type == 16: if type == 16:
...@@ -807,7 +809,7 @@ def check_mcms_purchase(type=16): ...@@ -807,7 +809,7 @@ def check_mcms_purchase(type=16):
exe_prov_id = prov_id exe_prov_id = prov_id
exe_prov_name = prov_name exe_prov_name = prov_name
close_date = get_create_time( close_date = get_create_time(
"select create_time from mcms_pur_plan where id='%s';" % ( "select close_date from mcms_purchase where id='%s';" % (
id1)) id1))
source_id=planBillId source_id=planBillId
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
...@@ -876,7 +878,7 @@ def check_mcms_purchase(type=16): ...@@ -876,7 +878,7 @@ def check_mcms_purchase(type=16):
exe_prov_id = prov_id exe_prov_id = prov_id
exe_prov_name = prov_name exe_prov_name = prov_name
close_date = get_create_time( close_date = get_create_time(
"select create_time from mcms_pur_plan where id='%s';" % ( "select close_date from mcms_purchase where id='%s';" % (
id1)) id1))
source_id = planBillId source_id = planBillId
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
......
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