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
bc461e04
Commit
bc461e04
authored
Apr 30, 2024
by
xiao-hesheng
Browse files
流程七脚本编写
parent
498b01e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b1流程八_高值跟台业务流程.air/a_b1流程八_高值跟台业务流程.py
View file @
bc461e04
...
...
@@ -80,19 +80,17 @@ def operationApply(): # 高值跟台申请
try
:
set_dept_user
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
],
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
],
2
)
# set_dept_lead()#设置科室负责人
# # 设置默认科室,切换到二级科室,使用科室管理功能
# updateUserLoginDefaultRange(get_listUserMgrRangePage(2))
# herpService_mcmsDeptGoodsInfo_getByProvIdPage()
# operationApply()
# approval_center()
# updateUserLoginDefaultRange(get_listUserMgrRangePage(1))
# approval_center()
set_dept_lead
()
#设置科室负责人
# 设置默认科室,切换到二级科室,使用科室管理功能
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
herpService_mcmsDeptGoodsInfo_getByProvIdPage
()
operationApply
()
approval_center
()
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
1
))
approval_center1
()
# #内网查询手术通知单号
#
orderno=Search_OrderNO()
#
height_value_order_dp(orderno)
orderno
=
Search_OrderNO
()
height_value_order_dp
(
orderno
)
commonFuc
().
check_text_exist_result_text
(
'succeed'
,
'succeed'
)
except
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'1'
)
air_case/public1/public1/public1.py
View file @
bc461e04
...
...
@@ -60,10 +60,12 @@ def approval_center(OBH_ID='OBhxxxxxxxxxxxxxxx'):
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'resultaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
total
==
0
:
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_6"
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
...
...
@@ -98,6 +100,63 @@ def approval_center(OBH_ID='OBhxxxxxxxxxxxxxxx'):
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
def
approval_center1
():
module
=
"b2_herp3_bs"
# 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
print
(
info
)
username1
=
info
[
'username1'
]
username
=
username1
## 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
()
# 登录获取用户id等信息,使用创建的用户登录============结束
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"apprCenter_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
,
"payload50_6"
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'resultaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
commonFuc
().
check_text_exist
(
0
,
result
)
taskId
=
commonFuc
().
analysis_json
(
'taskId'
,
data1
[
0
])
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"approvalBatch_url"
)
# 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_7"
,
taskId
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'resultaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
result
)
# 断言
# checkDict=commonFuc().get_business_data(module,'checkDict10')
# commonFuc().check_result(checkDict,result)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
if
code
>=
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
def
login
(
username
,
password
,
type
=
1
):
print
(
'username,password'
,
username
,
password
)
...
...
@@ -1163,10 +1222,52 @@ def get_listUserMgrRangePage(type=1): # 查询权限id
request_body
=
commonFuc
().
get_business_data
(
'b5_spd3_core_business_flow'
,
"payload23"
,
uxid
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
print
(
'data1'
,
data1
)
list2
=
[]
mgrRangeName_list
=
[]
for
i
in
data1
:
mgrRangeName
=
i
[
'mgrRangeName'
]
mgrRangeName_list
.
append
(
mgrRangeName
)
print
(
'mgrRangeName_list'
,
mgrRangeName_list
)
for
i
in
mgrRangeName_list
:
print
(
i
)
if
i
==
'设备科001'
:
list2
.
append
(
i
)
for
i
in
mgrRangeName_list
:
if
i
==
'二级检验科002'
:
list2
.
append
(
i
)
else
:
continue
for
i
in
mgrRangeName_list
:
if
i
==
'三级检测组003'
:
list2
.
append
(
i
)
else
:
continue
for
i
in
mgrRangeName_list
:
if
i
==
'科室004'
:
list2
.
append
(
i
)
else
:
continue
print
(
'list2'
,
list2
)
if
type
==
1
:
return
commonFuc
().
analysis_json
(
'id'
,
data1
[
1
])
elif
type
==
2
:
return
commonFuc
().
analysis_json
(
'id'
,
data1
[
0
])
for
i
in
data1
:
if
i
[
'mgrRangeName'
]
==
list2
[
0
]:
return
commonFuc
().
analysis_json
(
'id'
,
i
)
elif
type
==
2
:
for
i
in
data1
:
if
i
[
'mgrRangeName'
]
==
list2
[
1
]:
return
commonFuc
().
analysis_json
(
'id'
,
i
)
elif
type
==
3
:
for
i
in
data1
:
if
i
[
'mgrRangeName'
]
==
list2
[
2
]:
return
commonFuc
().
analysis_json
(
'id'
,
i
)
elif
type
==
4
:
for
i
in
data1
:
if
i
[
'mgrRangeName'
]
==
list2
[
3
]:
return
commonFuc
().
analysis_json
(
'id'
,
i
)
def
get_stockAreaId_new
(
dept_id
,
deptName
,
type
=
1
):
...
...
report/summary.html
View file @
bc461e04
...
...
@@ -55,9 +55,9 @@
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
8
秒
</td>
<td
class=
"details-col-elapsed"
>
10
0.0%
</td>
<td
class=
'details-col-elapsed'
>
0
</td>
<td
class=
'details-col-elapsed'
>
0分
55
秒
</td>
<td
class=
"details-col-elapsed"
>
0.0%
</td>
</tr>
</table>
...
...
@@ -73,8 +73,8 @@
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a_b1流程八_高值跟台业务流程/log.html'
target=
'_blank'
>
a_b1流程八_高值跟台业务流程
</a></td>
<td
class=
"
success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
8.057
</td>
<td
class=
"
fail"
>
失败
</td>
<td
class=
"details-col-elapsed"
>
55.533
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
...
...
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