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

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

parent 1846ead7
...@@ -34,7 +34,7 @@ def check_mcms_dept_buy_car(type=1): ...@@ -34,7 +34,7 @@ def check_mcms_dept_buy_car(type=1):
elif type == 3: elif type == 3:
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"] hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"]
branch_id = get_branch_id() branch_id = get_branch_id()
# 获取每次都会变化的字段create_time的值 # 获取create_time的值
create_time = get_create_time( create_time = get_create_time(
"select create_time from mcms_dept_buy_car where branch_id='%s'and hos_goods_id='%s'order by create_time desc LIMIT 1;" % ( "select create_time from mcms_dept_buy_car where branch_id='%s'and hos_goods_id='%s'order by create_time desc LIMIT 1;" % (
branch_id, hos_goods_id)) branch_id, hos_goods_id))
...@@ -49,6 +49,7 @@ def check_mcms_dept_buy_car(type=1): ...@@ -49,6 +49,7 @@ def check_mcms_dept_buy_car(type=1):
print('create_time', create_time, 'id', id) print('create_time', create_time, 'id', id)
sql = """select * from mcms_dept_buy_car where branch_id='%s' and hos_goods_id='%s' order by create_time desc LIMIT 1; sql = """select * from mcms_dept_buy_car where branch_id='%s' and hos_goods_id='%s' order by create_time desc LIMIT 1;
""" % (branch_id, hos_goods_id) """ % (branch_id, hos_goods_id)
#要验证的sql,取自数据库的表中
actual_value1 = check_mcms_dept_buy_car_sql(sql) actual_value1 = check_mcms_dept_buy_car_sql(sql)
print(actual_value1) print(actual_value1)
deptid2 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'] deptid2 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2']
...@@ -798,7 +799,7 @@ def check_mcms_purchase(type=16): ...@@ -798,7 +799,7 @@ def check_mcms_purchase(type=16):
if type == 16: if type == 16:
# 验证子表数据 # 验证子表数据
# check_mcms_mcms_pur_plan_detail(id2, type, planOrderNo) check_mcms_purchase_detail(id1, type, order_no)
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"] hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
planBillId = process_tuple( planBillId = process_tuple(
get_id( get_id(
...@@ -833,7 +834,8 @@ def check_mcms_purchase(type=16): ...@@ -833,7 +834,8 @@ def check_mcms_purchase(type=16):
) )
elif type == 20: elif type == 20:
# check_mcms_mcms_pur_plan_detail(id2, type, planOrderNo) #检查采购订单子表
check_mcms_purchase_detail(id1, type, order_no)
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"] hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message1')["hosGoodsId"]
planBillId = process_tuple( planBillId = process_tuple(
get_id( get_id(
...@@ -867,7 +869,8 @@ def check_mcms_purchase(type=16): ...@@ -867,7 +869,8 @@ def check_mcms_purchase(type=16):
create_time, last_modified, last_auditor, last_audit_time create_time, last_modified, last_auditor, last_audit_time
) )
elif type == 66: elif type == 66:
# check_mcms_mcms_pur_plan_detail(id2, type, planOrderNo) #检查采购订单子表数据
check_mcms_purchase_detail(id1, type, order_no)
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"] hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message3')["hosGoodsId"]
planBillId = process_tuple( planBillId = process_tuple(
get_id( get_id(
...@@ -1459,63 +1462,63 @@ try: ...@@ -1459,63 +1462,63 @@ try:
from a_b4流程十一请领业务流_二级库向直送 import check_accept_order from a_b4流程十一请领业务流_二级库向直送 import check_accept_order
for i in range(1): for i in range(1):
# goods_move2() # 设置产品出库渠道为直送 goods_move2() # 设置产品出库渠道为直送
# # # 低值 # # 低值
# second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1)
# check_mcms_dept_buy_car(1) check_mcms_dept_buy_car(1)
# # # 高值 # # 高值
# second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2)
# check_mcms_dept_buy_car(2) check_mcms_dept_buy_car(2)
# # # 试剂 # # 试剂
# second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3) second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
# check_mcms_dept_buy_car(3) check_mcms_dept_buy_car(3)
# BuyCarSubmit() # 请领车提交 BuyCarSubmit() # 请领车提交
#
# list_data = ['16', '20', '66'] list_data = ['16', '20', '66']
# for i in list_data: for i in list_data:
# check_mcms_dept_buy(int(i)) check_mcms_dept_buy(int(i))
# mcms_dept_buy_detail(int(i)) mcms_dept_buy_detail(int(i))
# for i in range(6): # 三个单据共审批6次 for i in range(6): # 三个单据共审批6次
# approval_center() approval_center()
# list_data = ['16', '20', '66'] list_data = ['16', '20', '66']
# for i in list_data: for i in list_data:
# check_mcms_dept_buy_approval_after(int(i)) check_mcms_dept_buy_approval_after(int(i))
# mcms_dept_buy_detail_approval_after(int(i)) mcms_dept_buy_detail_approval_after(int(i))
#
# # 检查自动生成的采购计划数据 # 检查自动生成的采购计划数据
# list_data = ['16', '20', '66'] list_data = ['16', '20', '66']
# for i in list_data: for i in list_data:
# check_mcms_mcms_pur_plan(int(i)) check_mcms_mcms_pur_plan(int(i))
# # 采购模块处理 # 采购模块处理
# purchase_module_process() purchase_module_process()
#
# for i in range(3): # 三个单据共审批3次 for i in range(3): # 三个单据共审批3次
# approval_center() approval_center()
list_data = ['16', '20', '66']
for i in list_data:
check_mcms_purchase(int(i))
#检查同步到外网的采购订单数据跟内网的是否一致
check_mcms_purchase_out_and_in(1)
check_mcms_purchase_out_and_in(2)
order_dp(1) # 1低值
order_dp(2) # 2高值
order_dp(3) # 3试剂
list_data = ['16', '20', '66']
for i in list_data:
check_hdi_distr(int(i))
# 上面暂时注释=========================================
# check_accept_order(1) # 低值
# #
# list_data = ['16', '20', '66'] # check_mcms_check(1)#调用函数检查验收单数据库写值
# for i in list_data:
# check_mcms_purchase(int(i))
# #
# #检查同步到外网的采购订单数据跟内网的是否一致 # check_accept_order(2) # 高值
# check_mcms_purchase_out_and_in(1) # check_accept_order(3) # 试剂
# check_mcms_purchase_out_and_in(2) # second_dept_one_key_in()
# order_dp(1) # 1低值 # second_dept_one_key_in()
# order_dp(2) # 2高值 # second_dept_one_key_in()
# order_dp(3) # 3试剂
# list_data = ['16', '20', '66']
# for i in list_data:
# check_hdi_distr(int(i))
# 上面暂时注释=========================================
check_accept_order(1) # 低值
check_mcms_check(1)#调用函数检查验收单写值
check_accept_order(2) # 高值
check_accept_order(3) # 试剂
second_dept_one_key_in()
second_dept_one_key_in()
second_dept_one_key_in()
commonFuc().check_text_exist_result_text('succees', 'succees') commonFuc().check_text_exist_result_text('succees', 'succees')
except Exception as e: except Exception as e:
# 打印错误信息 # 打印错误信息
......
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