Commit 5937d374 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程八脚本提交

parent 2bc2f313
...@@ -80,8 +80,9 @@ def test1(): ...@@ -80,8 +80,9 @@ def test1():
data1 = commonFuc().analysis_json('data', data) data1 = commonFuc().analysis_json('data', data)
userId = commonFuc().analysis_json('userId', data1) userId = commonFuc().analysis_json('userId', data1)
# print(len(data1)) # print(len(data1))
print(userId)
if code == 0 and len(data) >= 1: print('userId',userId)
if code == 0:
commonFuc().check_text_exist(0, result) commonFuc().check_text_exist(0, result)
return userId return userId
else: else:
......
...@@ -6,6 +6,7 @@ from airtest.core.helper import using ...@@ -6,6 +6,7 @@ from airtest.core.helper import using
from common.db.sql.sql_del_branch_info import delData from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_del_kind_goodsinfo import delKindGoodsinfo from common.db.sql.sql_del_kind_goodsinfo import delKindGoodsinfo
from common.db.sql.sql_del_notices_info import delByNoticeName from common.db.sql.sql_del_notices_info import delByNoticeName
from common.db.sql.sql_tools import *
from common.fileUtls import FileUtils from common.fileUtls import FileUtils
from common.timeUtils import timeUtils from common.timeUtils import timeUtils
...@@ -41,9 +42,13 @@ def test1(): ...@@ -41,9 +42,13 @@ def test1():
# r_b6科室管理_科室人员查询_按科室查询人员_设置科室负责人 # r_b6科室管理_科室人员查询_按科室查询人员_设置科室负责人
pro_path = commonFuc().get_pro_path() pro_path = commonFuc().get_pro_path()
sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air') sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air') # using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b5科室管理_科室人员查询_按科室查询人员_获取用户id.air')
from r_b5科室管理_科室人员查询_按科室查询人员_获取用户id import test1 # from r_b5科室管理_科室人员查询_按科室查询人员_获取用户id import test1
userid = test1() # import pdb
# pdb.set_trace()
userid = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1'])
print('userid',userid)
# print(list_id) # print(list_id)
# for i in list_id: # for i in list_id:
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "deptProcOrder_update__url") url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "deptProcOrder_update__url")
...@@ -63,9 +68,11 @@ def test1(): ...@@ -63,9 +68,11 @@ def test1():
# date2=timeUtils().get_time_hms(2) # date2=timeUtils().get_time_hms(2)
# for i in list2: # for i in list2:
dept1_id = FileUtils().r_info8(module, '部门和库区信息','message5')["dept1_id"] # dept1_id = FileUtils().r_info8(module, '部门和库区信息','message5')["dept1_id"]
dept1_id = FileUtils().r_info8(module, '一级科室信息', 'message4')["dept1_id"]
# 请求体 # 请求体
request_body = commonFuc().get_business_data(module, "payload61_5",userid,dept1_id) request_body = commonFuc().get_business_data(module, "payload61_5",userid,dept1_id)
print('request_body',request_body)
# request_body='['+str(request_body)+']' # request_body='['+str(request_body)+']'
# new_request_body = request_body.replace("'", '"') # new_request_body = request_body.replace("'", '"')
# print(new_request_body) # print(new_request_body)
...@@ -80,7 +87,7 @@ def test1(): ...@@ -80,7 +87,7 @@ def test1():
data1 = commonFuc().analysis_json('data', data) data1 = commonFuc().analysis_json('data', data)
cname = commonFuc().analysis_json('cname', data1) cname = commonFuc().analysis_json('cname', data1)
# print(len(data1)) # print(len(data1))
if code == 0 and data == 1: if code == 0:
commonFuc().check_text_exist(0, result) commonFuc().check_text_exist(0, result)
else: else:
commonFuc().check_text_exist('error', result) commonFuc().check_text_exist('error', result)
......
...@@ -39,7 +39,9 @@ def test3(dept_id='d69a68df361a4289b2262e4ef75b55a5', stockAreaId='b72a363163ff4 ...@@ -39,7 +39,9 @@ def test3(dept_id='d69a68df361a4289b2262e4ef75b55a5', stockAreaId='b72a363163ff4
# print( token,projectCode,uxid,corpId,info) # print( token,projectCode,uxid,corpId,info)
# r_d0库房管理_库区设置_人员管理_添加人员_查询人员 # r_d0库房管理_库区设置_人员管理_添加人员_查询人员
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_stockShelf_page_url") # url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_stockShelf_page_url")
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_stockUser_list_url")
# 获取请求头信息 # 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2", headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token, commonFuc().get_business_data(module, "json_contentType"), token,
...@@ -90,6 +92,7 @@ using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b9库房管理_库区设置_库房 ...@@ -90,6 +92,7 @@ using(pro_path + r'\\air_case\\b2_herp3_bs\\r_b9库房管理_库区设置_库房
from r_b9库房管理_库区设置_库房查询_查询全部 import test1 from r_b9库房管理_库区设置_库房查询_查询全部 import test1
branch_name = FileUtils().r_info(module, '院区新增')["branch_name"] branch_name = FileUtils().r_info(module, '院区新增')["branch_name"]
stockId =test1(branch_name+'中心库房') stockId =test1(branch_name+'中心库房')
#获取库房id==========结束============ #获取库房id==========结束============
#====获取库区id===== 开始======== #====获取库区id===== 开始========
...@@ -98,7 +101,8 @@ using(pro_path + r'\\air_case\\b2_herp3_bs\\r_c5库房管理_库区设置_库区 ...@@ -98,7 +101,8 @@ using(pro_path + r'\\air_case\\b2_herp3_bs\\r_c5库房管理_库区设置_库区
from r_c5库房管理_库区设置_库区查询_查询全部 import test2 from r_c5库房管理_库区设置_库区查询_查询全部 import test2
stockAreaId=test2(dept1_id,stockId) stockAreaId=test2(dept1_id,stockId)
#====获取库区id===== 结束======== #====获取库区id===== 结束========
# import pdb
# pdb.set_trace()
test3(dept1_id,stockAreaId) test3(dept1_id,stockAreaId)
#将中心库id和库区id写入文件 #将中心库id和库区id写入文件
......
...@@ -5,7 +5,7 @@ from airtest.core.helper import using ...@@ -5,7 +5,7 @@ from airtest.core.helper import using
from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system
from common.common_func import commonFuc from common.common_func import commonFuc
from common.db.sql.sql_del_branch_info import delData from common.db.sql.sql_del_branch_info import delData
from common.db.sql.sql_tools import get_id, process_tuple, set_goods_coding_type from common.db.sql.sql_tools import *
from common.fileUtls import FileUtils from common.fileUtls import FileUtils
import json import json
import time import time
......
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