Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
5e3ff9d2
Commit
5e3ff9d2
authored
May 23, 2024
by
xiao-hesheng
Browse files
流程十脚本编写
parent
ff08e6cf
Changes
29
Hide whitespace changes
Inline
Side-by-side
air_case/b2_herp3_bs/r_d2库房管理_库区设置_人员管理_添加人员.air/r_d2库房管理_库区设置_人员管理_添加人员.py
View file @
5e3ff9d2
...
...
@@ -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
)
...
...
air_case/b5_spd3_core_business_flow/a_a4_流程四_基础模块设置.air/a_a4_流程四_基础模块设置.py
View file @
5e3ff9d2
# -*- 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
:
...
...
air_case/b5_spd3_core_business_flow/a_b1流程八_高值跟台业务流程.air/a_b1流程八_高值跟台业务流程.py
View file @
5e3ff9d2
...
...
@@ -322,7 +322,7 @@ def out_return_gt():
#跟台退货出库确认========================
try
:
set_dept_lead
()
# 设置科室负责人
set_dept_lead
()
# 设置
二级
科室负责人
# # # # 设置默认科室,切换到二级科室,使用科室管理功能
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
herpService_mcmsDeptGoodsInfo_getByProvIdPage
()
...
...
air_case/public1/public1/public1.py
View file @
5e3ff9d2
...
...
@@ -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
...
...
data/a2_mdm3_ea/message
View file @
5e3ff9d2
企业信息:
e_id: CR2024052
2
00
3
7
cname: 国药集团公司
f$F5C
e_id: CR2024052
3
00
7
7
cname: 国药集团公司
p0t4h
data/a3_mdm3_hs/message
View file @
5e3ff9d2
医院信息:
h_id: 湖南省人民医院
o3Jru
h_name: 湖南省人民医院
o3Jru
h_id: 湖南省人民医院
ycaWg
h_name: 湖南省人民医院
ycaWg
data/a5_mdm3_pdm/message2
View file @
5e3ff9d2
产品审核信息
:
MSPid
:
MSP24052
2
00
1
1_1
MSPid
:
MSP24052
3
00
2
1_1
hosId
:
h0347
hosGoodsId
:
h034700003
684
provGoodsid
:
provGood-992208
17
goodsAuditBillId
:
MSP24052
2
00
1
1
targetId
:
MSP24052
2
00
1
1_1
hosGoodsId
:
h034700003
750
provGoodsid
:
provGood-992208
83
goodsAuditBillId
:
MSP24052
3
00
2
1
targetId
:
MSP24052
3
00
2
1_1
data/b2_herp3_bs/message
View file @
5e3ff9d2
院区新增:
branch_id: h0347-36
16
branch_name: 东土城路院区
3pvuL
branch_id: h0347-36
23
branch_name: 东土城路院区
CU2K!
科室信息:
dept2_id:
7aa9a7c18aa1440ba5c88f459c2d17c8
dept2_id:
ae5633c54a4741c08e1b76d10025ebf5
dept2_name: 二级检验科002
data/b2_herp3_bs/message3
View file @
5e3ff9d2
用户名信息
:
username1
:
自动化测试
uocVF
username2
:
自动化测试
uocVF
username1
:
自动化测试
tsjSE
username2
:
自动化测试
tsjSE
data/b2_herp3_bs/message4
View file @
5e3ff9d2
一级科室信息
:
dept1_id
:
9b15c86f70a64f2ab83e207bde34541
9
dept1_id
:
550f4768e0f74ccbb706d3afa3d63a5
9
dept1_name
:
设备科001
data/b2_herp3_bs/message5
View file @
5e3ff9d2
部门和库区信息
:
dept1_id
:
9b15c86f70a64f2ab83e207bde34541
9
stockAreaId
:
d6ce9f2970974f57bec70ee770f4d3c3
dept1_id
:
550f4768e0f74ccbb706d3afa3d63a5
9
stockAreaId
:
c882f4f961c44e0485e136aa21249588
data/b2_herp3_bs/message6
View file @
5e3ff9d2
所有科室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
data/b2_herp3_bs/message7
View file @
5e3ff9d2
shelfinfo
:
shelfid
:
d6ce9f2970974f57bec70ee770f4d3c3
shelfCode
:
areah034720
1
3
shelfid
:
c882f4f961c44e0485e136aa21249588
shelfCode
:
areah0347203
0
areaName
:
自动化测试
data/b5_spd3_core_business_flow/message
View file @
5e3ff9d2
供货关系申请2:
e_corpId: p1e2
2
3
e_corpId: p1e23
6
h_corpId: h0347
e_username: 国药集团公司
f$F5C
e_username: 国药集团公司
p0t4h
h_name: test001
data/b5_spd3_core_business_flow/message1
View file @
5e3ff9d2
产品审核信息
:
MSPid
:
MSP24052
2
00
0
7_1
MSPid
:
MSP24052
3
00
1
7_1
hosId
:
h0347
hosGoodsId
:
h034700003
680
provGoodsid
:
provGood-992208
13
goodsAuditBillId
:
MSP24052
2
00
0
7
targetId
:
MSP24052
2
00
0
7_1
hosGoodsId
:
h034700003
746
provGoodsid
:
provGood-992208
79
goodsAuditBillId
:
MSP24052
3
00
1
7
targetId
:
MSP24052
3
00
1
7_1
data/b5_spd3_core_business_flow/message10
View file @
5e3ff9d2
低值配送单号
:
distrBillId1
:
PSh0347202405220011
distrBillId2
:
PSh0347202405220011
distrBillId1
:
distrBillId2
:
高值配送单号
:
distrBillId1
:
PSh0347202405220012
distrBillId2
:
PSh0347202405220012
distrBillId1
:
distrBillId2
:
试剂配送单号
:
distrBillId1
:
PSh0347202405220013
distrBillId2
:
PSh0347202405220013
distrBillId1
:
distrBillId2
:
高值跟台配送单号
:
distrBillId1
:
PSh0347202405220014
distrBillId2
:
PSh0347202405220014
distrBillId1
:
distrBillId2
:
data/b5_spd3_core_business_flow/message11
View file @
5e3ff9d2
采购计划单号高值
:
orderNo1
:
PLAN2024052
2
23
516
orderNo2
:
PLAN2024052
2
23
516
orderNo1
:
PLAN2024052
3
23
711
orderNo2
:
PLAN2024052
3
23
711
data/b5_spd3_core_business_flow/message12
View file @
5e3ff9d2
采购计划单号试剂
:
orderNo1
:
PLAN2024052
2
23
517
orderNo2
:
PLAN2024052
2
23
517
orderNo1
:
PLAN2024052
3
23
712
orderNo2
:
PLAN2024052
3
23
712
data/b5_spd3_core_business_flow/message19
View file @
5e3ff9d2
产品信息
:
list_a
:
-
&id001
-
hosGoodsId
:
h034700003
680
hosGoodsCode
:
'00003
680
'
provId
:
p1e2
2
3
subProvId
:
p1e2
2
3
subProvName
:
国药集团公司
f$F5C
goodsName
:
高值牙钻机
(0rN$
-
hosGoodsId
:
h034700003
746
hosGoodsCode
:
'00003
746
'
provId
:
p1e23
6
subProvId
:
p1e23
6
subProvName
:
国药集团公司
p0t4h
goodsName
:
高值牙钻机
FgmfE
goodsSpec
:
G-31891
goodsGeneralName
:
goodsMfrsId
:
mfrs-11229
...
...
data/b5_spd3_core_business_flow/message2
View file @
5e3ff9d2
产品审核信息
:
MSPid
:
MSP24052
2
00
0
8_1
MSPid
:
MSP24052
3
00
1
8_1
hosId
:
h0347
hosGoodsId
:
h034700003
681
provGoodsid
:
provGood-992208
14
goodsAuditBillId
:
MSP24052
2
00
0
8
targetId
:
MSP24052
2
00
0
8_1
hosGoodsId
:
h034700003
747
provGoodsid
:
provGood-992208
80
goodsAuditBillId
:
MSP24052
3
00
1
8
targetId
:
MSP24052
3
00
1
8_1
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment