Commit 6a98de66 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

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

parent b8731673
...@@ -190,7 +190,7 @@ def mcms_dept_buy_detail(type=16): ...@@ -190,7 +190,7 @@ def mcms_dept_buy_detail(type=16):
# 检查二级库请领单审批前的主表数据 # 检查二级库请领单审批前的主表数据
def check_mcms_dept_buy(type=16): def check_mcms_dept_buy(type=16):
branch_id = get_branch_id() branch_id = get_branch_id()
sql = """select * from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1; sql = """select * from mcms_dept_buy where branch_id='%s' and bill_mode='%s' and buy_kind='LY' order by create_time desc LIMIT 1;
""" % (branch_id, type) """ % (branch_id, type)
actual = check_mcms_dept_buy_sql(sql) actual = check_mcms_dept_buy_sql(sql)
print(actual) print(actual)
...@@ -258,7 +258,7 @@ def check_mcms_dept_buy(type=16): ...@@ -258,7 +258,7 @@ def check_mcms_dept_buy(type=16):
last_modified, last_modified_user) last_modified, last_modified_user)
elif type == 20: elif type == 20:
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_dept_buy_direct_sending2', id1, order_no1, get_hosid(), 'mcms_dept_buy5_2', id1, order_no1, get_hosid(),
branch_id, deptid2, branch_id, deptid2,
deptname2, area_code, area_name, target_dept_id, target_dept_name, deptname2, area_code, area_name, target_dept_id, target_dept_name,
target_stock_id, target_stock_name, bill_expdt_date, rec_user, target_stock_id, target_stock_name, bill_expdt_date, rec_user,
...@@ -266,7 +266,7 @@ def check_mcms_dept_buy(type=16): ...@@ -266,7 +266,7 @@ def check_mcms_dept_buy(type=16):
last_modified, last_modified_user) last_modified, last_modified_user)
else: else:
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check', expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_dept_buy_direct_sending3', id1, order_no1, get_hosid(), 'mcms_dept_buy5_3', id1, order_no1, get_hosid(),
branch_id, deptid2, branch_id, deptid2,
deptname2, area_code, area_name, target_dept_id, target_dept_name, deptname2, area_code, area_name, target_dept_id, target_dept_name,
target_stock_id, target_stock_name, bill_expdt_date, rec_user, target_stock_id, target_stock_name, bill_expdt_date, rec_user,
...@@ -303,44 +303,45 @@ try: ...@@ -303,44 +303,45 @@ try:
from a_b5流程十二请领业务流_二级库向二级库 import add_new_deptinfo,edit_goods_target,second_dept_Request from a_b5流程十二请领业务流_二级库向二级库 import add_new_deptinfo,edit_goods_target,second_dept_Request
from a_b5流程十二请领业务流_二级库向二级库 import BuyCarSubmit,pick_execute from a_b5流程十二请领业务流_二级库向二级库 import BuyCarSubmit,pick_execute
#========下面暂时注释 #========下面暂时注释
# add_dept2() # 新增一个二级科室 add_dept2() # 新增一个二级科室
# add_new_deptinfo() # 写入科室信息到文件中 add_new_deptinfo() # 写入科室信息到文件中
# grants_user_new() # 新增授权 grants_user_new() # 新增授权
# # 同步库房信息 # 同步库房信息
# execute_command("python runner_test.py tag id2263-221 debug sit") execute_command("python runner_test.py tag id2263-221 debug sit")
# # 设置部门用户 # 设置部门用户
# set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'], set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'],
# FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'], 2) FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'], 2)
# # 设置部门负责人 # 设置部门负责人
# set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"]) # 设置二级科室负责人 set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"]) # 设置二级科室负责人
# get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'], get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'],
# FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'], 2) FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'], 2)
#
# # 设置库区联系人
# deptName5 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5']
#
# set_stockShelf_Linkman(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"],
# get_stockAreaId2_new_fromDb(deptName5, 2))
# #新建科室产品分配
# dept_goods_distribute(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'])
# #编辑产品请领目标为二级检验科002
# currentDeptId = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5']
# targetDeptId = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2']
# edit_goods_target(currentDeptId, targetDeptId)
#
# updateUserLoginDefaultRange(get_listUserMgrRangePage1(5)) # 设置登录账号默认权限是新二级库
# # # 低值 # 设置库区联系人
# second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1) deptName5 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5']
# check_mcms_dept_buy_car(1)
# # # # 高值 set_stockShelf_Linkman(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"],
# second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2) get_stockAreaId2_new_fromDb(deptName5, 2))
# check_mcms_dept_buy_car(2) #新建科室产品分配
# # # # 试剂 dept_goods_distribute(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'])
# second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3) #编辑产品请领目标为二级检验科002
# check_mcms_dept_buy_car(3) currentDeptId = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5']
targetDeptId = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2']
edit_goods_target(currentDeptId, targetDeptId)
updateUserLoginDefaultRange(get_listUserMgrRangePage1(5)) # 设置登录账号默认权限是新二级库
# # 低值
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1)
check_mcms_dept_buy_car(1)
# # # 高值
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2)
check_mcms_dept_buy_car(2)
# # # 试剂
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
check_mcms_dept_buy_car(3)
# 上面暂时注释======================== # 上面暂时注释========================
# BuyCarSubmit() # 请领车提交 BuyCarSubmit() # 请领车提交
time.sleep(6)
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))
...@@ -351,6 +352,7 @@ try: ...@@ -351,6 +352,7 @@ try:
# 二级科室领用出库 # 二级科室领用出库
# 低值拣货执行 # 低值拣货执行
pick_execute() pick_execute()
second_dept_one_key_in(5) second_dept_one_key_in(5)
second_dept_one_key_in(5) second_dept_one_key_in(5)
second_dept_one_key_in(5) second_dept_one_key_in(5)
......
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