Commit 5e3ff9d2 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程十脚本编写

parent ff08e6cf
......@@ -58,11 +58,6 @@ def test3(dept_id='d69a68df361a4289b2262e4ef75b55a5', stockAreaId='b72a363163ff4
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
# str = commonFuc().get_business_data(module, 'data3')
# list2 = list(str.split(","))
# print(list2)
# for i in list2:
# # 请求体
request_body = commonFuc().get_business_data(module, "payload62_9",dept_id,stockAreaId,username1,uxid1,username1)
......
# -*- encoding=utf8 -*-
from air_case.public1.public1.public1 import get_hosid, branch_add
from air_case.public1.public1.public1 import *
from common.db.sql.sql_del_branch_info import delData
from common.fileUtls import FileUtils
from common.run_cmd_script import execute_command
......@@ -46,6 +46,7 @@ def test1():
execute_command("python runner_test.py tag id2263-226 debug sit")
# 查询库区
execute_command("python runner_test.py tag id2263-228 debug sit")
# r_d0库房管理_库区设置_人员管理_添加人员_查询人员
execute_command("python runner_test.py tag id2263-233 debug sit")
# r_d2库房管理_库区设置_人员管理_添加人员
......@@ -168,47 +169,6 @@ def test2(): # 科室添加产品信息(产品是从外网同步过来的)
def dept_query_all(): # 科室查询,将科室id写入文件中
module = "b2_herp3_bs"
# 内网登录
username = commonFuc().get_business_data(module, "username")
# print('医院名称',username)
password = commonFuc().get_business_data(module, "password")
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token, projectCode, uxid, corpId, info = login_system(username, password).get_token()
# print( token,projectCode,uxid,corpId,info)
# b9_科室管理_科室登记_科室查询
branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "deptPage_url")
# 获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
commonFuc().get_business_data(module, "X-APP-CODE"))
# #请求体
request_body = commonFuc().get_business_data(module, "payload13", branch_id)
print(request_body)
# # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
data = commonFuc().analysis_json('data', result)
total = commonFuc().analysis_json('total', data)
if total == 4:
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
# 将deptid写入文件
data1 = commonFuc().analysis_json('data', data)
print('data1', data1)
info = []
for i in data1:
deptid = commonFuc().analysis_json('id', i)
info.append(deptid)
titlename = ['deptid1', 'deptid2', 'deptid3', 'deptid4']
FileUtils().w_info8(info, module, '所有科室id', titlename, 'message6')
def grants_user(orgName='d69a68df361a4289b2262e4ef75b55a5', mgrRangeId='feb0cc16618c437fb4d033cd339a0377'):
module = "b2_herp3_bs"
# 登录获取用户id等信息,使用创建的用户登录===========开始
......@@ -261,16 +221,25 @@ def grants_user(orgName='d69a68df361a4289b2262e4ef75b55a5', mgrRangeId='feb0cc16
commonFuc().check_text_exist(0, result)
else:
commonFuc().check_text_exist('error', result)
try:
# ==============删除业务数据和报表数据
# delData().Delete_business_Data()#删除业务数据
# delData().Del_reporter_data() # 删除报表数据
delData().Delete_business_Data()#删除业务数据
delData().Del_reporter_data() # 删除报表数据
#==============删除业务数据和报表数据
test1()
test2()# 科室添加产品信息(产品是从外网同步过来的)
dept_query_all()# 科室查询,将科室id写入文件中
grants_user()#给用户授权
# delData().Delete_branch_by_id()#删除院区数据
# test1()
# test2()# 科室添加产品信息(产品是从外网同步过来的)
# dept_query_all()# 科室查询,将科室id写入文件中
# grants_user()#给用户授权
# 二级库区信息写入文件
get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'],
FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'], 2)
# 设置二级库区联系人
set_stockShelf_Linkman()
#
set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'], 2)
commonFuc().check_text_exist_result_text('succees', 'succees')
except Exception as e:
......
......@@ -322,7 +322,7 @@ def out_return_gt():
#跟台退货出库确认========================
try:
set_dept_lead() # 设置科室负责人
set_dept_lead() # 设置二级科室负责人
# # # # 设置默认科室,切换到二级科室,使用科室管理功能
updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
herpService_mcmsDeptGoodsInfo_getByProvIdPage()
......
......@@ -1297,7 +1297,7 @@ def SaveCacheBatch2(headers):
print('result', result)
def set_dept_lead(): # 设置科室负责人
def set_dept_lead(): # 设置二级科室负责人
module = 'b2_herp3_bs'
username = FileUtils().r_info8(module, '用户名信息', 'message3')["username1"]
## print('医院名称',username)
......@@ -1515,7 +1515,7 @@ def get_stockAreaId_new(dept_id, deptName, type=1):
# print('list_a', len(list_a), list_a)
info = (list_a, list_b, list_c)
titlename = ('list_a', 'list_b', 'list_c')
# 将条码信息写入文件
# 将库区信息写入文件
FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '库区信息', titlename, 'message22')
return shelfCode
......
企业信息:
e_id: CR202405220037
cname: 国药集团公司f$F5C
e_id: CR202405230077
cname: 国药集团公司p0t4h
医院信息:
h_id: 湖南省人民医院o3Jru
h_name: 湖南省人民医院o3Jru
h_id: 湖南省人民医院ycaWg
h_name: 湖南省人民医院ycaWg
产品审核信息:
MSPid: MSP2405220011_1
MSPid: MSP2405230021_1
hosId: h0347
hosGoodsId: h034700003684
provGoodsid: provGood-99220817
goodsAuditBillId: MSP2405220011
targetId: MSP2405220011_1
hosGoodsId: h034700003750
provGoodsid: provGood-99220883
goodsAuditBillId: MSP2405230021
targetId: MSP2405230021_1
院区新增:
branch_id: h0347-3616
branch_name: 东土城路院区3pvuL
branch_id: h0347-3623
branch_name: 东土城路院区CU2K!
科室信息:
dept2_id: 7aa9a7c18aa1440ba5c88f459c2d17c8
dept2_id: ae5633c54a4741c08e1b76d10025ebf5
dept2_name: 二级检验科002
用户名信息:
username1: 自动化测试uocVF
username2: 自动化测试uocVF
username1: 自动化测试tsjSE
username2: 自动化测试tsjSE
一级科室信息:
dept1_id: 9b15c86f70a64f2ab83e207bde345419
dept1_id: 550f4768e0f74ccbb706d3afa3d63a59
dept1_name: 设备科001
部门和库区信息:
dept1_id: 9b15c86f70a64f2ab83e207bde345419
stockAreaId: d6ce9f2970974f57bec70ee770f4d3c3
dept1_id: 550f4768e0f74ccbb706d3afa3d63a59
stockAreaId: c882f4f961c44e0485e136aa21249588
所有科室id:
deptid1: 9b15c86f70a64f2ab83e207bde345419
deptid2: 7aa9a7c18aa1440ba5c88f459c2d17c8
deptid3: d3f75022bc314df2851672082aa3a95e
deptid4: a7b51dde2ad34d01b9dd7e2ee629d378
deptid1: 550f4768e0f74ccbb706d3afa3d63a59
deptid2: ae5633c54a4741c08e1b76d10025ebf5
deptid3: e0ee64931b334b9580c8e5713914acdc
deptid4: b690d4c142d34b8daa90557bd1695326
所有科室name:
deptid1: 设备科001
deptid2: 二级检验科002
deptid3: 三级检测组003
deptid4: 科室004
shelfinfo:
shelfid: d6ce9f2970974f57bec70ee770f4d3c3
shelfCode: areah03472013
shelfid: c882f4f961c44e0485e136aa21249588
shelfCode: areah03472030
areaName: 自动化测试
供货关系申请2:
e_corpId: p1e223
e_corpId: p1e236
h_corpId: h0347
e_username: 国药集团公司f$F5C
e_username: 国药集团公司p0t4h
h_name: test001
产品审核信息:
MSPid: MSP2405220007_1
MSPid: MSP2405230017_1
hosId: h0347
hosGoodsId: h034700003680
provGoodsid: provGood-99220813
goodsAuditBillId: MSP2405220007
targetId: MSP2405220007_1
hosGoodsId: h034700003746
provGoodsid: provGood-99220879
goodsAuditBillId: MSP2405230017
targetId: MSP2405230017_1
低值配送单号:
distrBillId1: PSh0347202405220011
distrBillId2: PSh0347202405220011
distrBillId1:
distrBillId2:
高值配送单号:
distrBillId1: PSh0347202405220012
distrBillId2: PSh0347202405220012
distrBillId1:
distrBillId2:
试剂配送单号:
distrBillId1: PSh0347202405220013
distrBillId2: PSh0347202405220013
distrBillId1:
distrBillId2:
高值跟台配送单号:
distrBillId1: PSh0347202405220014
distrBillId2: PSh0347202405220014
distrBillId1:
distrBillId2:
采购计划单号高值:
orderNo1: PLAN2024052223516
orderNo2: PLAN2024052223516
orderNo1: PLAN2024052323711
orderNo2: PLAN2024052323711
采购计划单号试剂:
orderNo1: PLAN2024052223517
orderNo2: PLAN2024052223517
orderNo1: PLAN2024052323712
orderNo2: PLAN2024052323712
产品信息:
list_a:
- &id001
- hosGoodsId: h034700003680
hosGoodsCode: '00003680'
provId: p1e223
subProvId: p1e223
subProvName: 国药集团公司f$F5C
goodsName: 高值牙钻机(0rN$
- hosGoodsId: h034700003746
hosGoodsCode: '00003746'
provId: p1e236
subProvId: p1e236
subProvName: 国药集团公司p0t4h
goodsName: 高值牙钻机FgmfE
goodsSpec: G-31891
goodsGeneralName:
goodsMfrsId: mfrs-11229
......
产品审核信息:
MSPid: MSP2405220008_1
MSPid: MSP2405230018_1
hosId: h0347
hosGoodsId: h034700003681
provGoodsid: provGood-99220814
goodsAuditBillId: MSP2405220008
targetId: MSP2405220008_1
hosGoodsId: h034700003747
provGoodsid: provGood-99220880
goodsAuditBillId: MSP2405230018
targetId: MSP2405230018_1
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