Commit 1e0f38b5 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

新增流程十数据库验证脚本

parent 40336c15
...@@ -217,13 +217,13 @@ def BuyCarSubmit(): ...@@ -217,13 +217,13 @@ def BuyCarSubmit():
# 创建领车交易================================================= # 创建领车交易=================================================
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_buy_createBuyBill_url") "herpService_buy_createBuyBill_url")
print('创建领车交易=================', url) print('创建领车交易=================', url)
billExpdtDate = timeUtils().get_time_add(30, 2) billExpdtDate = timeUtils().get_time_add(30, 2)
request_body = commonFuc().get_business_data(module, "payload44", billExpdtDate, get_branch_id(), list_id[0], request_body = commonFuc().get_business_data(module, "payload44", billExpdtDate, get_branch_id(), list_id[0],
list_id[1], list_id[2]) list_id[1], list_id[2])
print('创建领车交易', 'request_body', request_body) print('创建领车交易', 'request_body', request_body)
result = commonFuc().http_post(url, request_body, headers) result = commonFuc().http_post(url, request_body, headers)
print('创建领车交易,result', result) print('创建领车交易,result', result)
currentTaskList = commonFuc().analysis_json('currentTaskList', commonFuc().analysis_json('data', result)) currentTaskList = commonFuc().analysis_json('currentTaskList', commonFuc().analysis_json('data', result))
......
...@@ -117,7 +117,10 @@ def check_mcms_dept_buy(): ...@@ -117,7 +117,10 @@ def check_mcms_dept_buy():
deptname2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'] deptname2 = FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2']
# target_dept_id=FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1'] # target_dept_id=FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid1']
area_code = get_stockAreaId_new(deptid2, deptname2, 2) # area_code = get_stockAreaId_new(deptid2, deptname2, 2)
info=FileUtils().r_info8("b5_spd3_core_business_flow", "库区信息", 'message22')
list_a = info['list_a']
area_code= commonFuc().analysis_json('shelfCode', list_a)
area_name = '默认库区' area_name = '默认库区'
# 读取文件中的信息 # 读取文件中的信息
info = FileUtils().r_info8('b5_spd3_core_business_flow', "二级库请领产品信息", 'message21') info = FileUtils().r_info8('b5_spd3_core_business_flow', "二级库请领产品信息", 'message21')
...@@ -132,7 +135,7 @@ def check_mcms_dept_buy(): ...@@ -132,7 +135,7 @@ def check_mcms_dept_buy():
target_stock_id = get_id("select logic_id FROM yb_direct WHERE branch_id ='%s';"%branch_id) target_stock_id = get_id("select logic_id FROM yb_direct WHERE branch_id ='%s';"%branch_id)
bill_expdt_date = get_expdt_date("select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='16' order by create_time desc LIMIT 1;" % branch_id) bill_expdt_date = get_expdt_date("select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='16' order by create_time desc LIMIT 1;" % branch_id)
rec_user = get_login_user_uxid() rec_user = get_login_user_uxid()
rec_addr='二级检验科002' # rec_addr='二级检验科002'
create_user = rec_user create_user = rec_user
create_time = get_create_time("select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='16' order by create_time desc LIMIT 1;" % branch_id) create_time = get_create_time("select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='16' order by create_time desc LIMIT 1;" % branch_id)
last_modified = get_create_time("select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='16' order by create_time desc LIMIT 1;" % branch_id) last_modified = get_create_time("select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='16' order by create_time desc LIMIT 1;" % branch_id)
...@@ -148,38 +151,53 @@ def check_mcms_dept_buy(): ...@@ -148,38 +151,53 @@ def check_mcms_dept_buy():
last_modified, last_modified_user) last_modified, last_modified_user)
print('expected', expected) print('expected', expected)
print('aaaaaaaaaaaaaaaaa') 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)
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')
try: try:
# ==============暂时注释================== set_dept_lead() # 设置二级科室负责人
# set_dept_lead() # 设置二级科室负责人 # 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0"
# # 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0" pro_path = commonFuc().get_pro_path2()
# pro_path = commonFuc().get_pro_path2() print('pro_path', pro_path)
# print('pro_path', pro_path) sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_b3流程十请领业务流_二级库向边仓.air')
# sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_b3流程十请领业务流_二级库向边仓.air') using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_b3流程十请领业务流_二级库向边仓.air')
# using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_b3流程十请领业务流_二级库向边仓.air') from a_b3流程十请领业务流_二级库向边仓 import add_logic_stock
# from a_b3流程十请领业务流_二级库向边仓 import add_logic_stock
# add_logic_stock()
# add_logic_stock()
# from a_b3流程十请领业务流_二级库向边仓 import goods_move
# from a_b3流程十请领业务流_二级库向边仓 import goods_move from a_b3流程十请领业务流_二级库向边仓 import second_dept_Request
# from a_b3流程十请领业务流_二级库向边仓 import second_dept_Request from a_b3流程十请领业务流_二级库向边仓 import BuyCarSubmit
# from a_b3流程十请领业务流_二级库向边仓 import BuyCarSubmit from a_b3流程十请领业务流_二级库向边仓 import check_buyWayText
# from a_b3流程十请领业务流_二级库向边仓 import check_buyWayText
# # # 设置产品出库渠道为边仓
# # # 设置产品出库渠道为边仓 goods_move()
# goods_move() updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
# updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库 # # # # 低值
# # # # # 低值 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() # 请领车提交
# ==============暂时注释==================
check_mcms_dept_buy() check_mcms_dept_buy()
# for i in range(6): # 三个单据共审批6次 # for i in range(6): # 三个单据共审批6次
# approval_center() # approval_center()
......
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