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
8dc06849
Commit
8dc06849
authored
11 months ago
by
xiao-hesheng
Browse files
Options
Download
Email Patches
Plain Diff
流程十脚本编写
parent
3f738b18
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向二级库.air/a_b4流程十一请领业务流_二级库向二级库.py
+45
-0
...s_flow/a_b4流程十一请领业务流_二级库向二级库.air/a_b4流程十一请领业务流_二级库向二级库.py
data/b2_herp3_bs/data
+1
-1
data/b2_herp3_bs/data
data/b2_herp3_bs/message6
+2
-0
data/b2_herp3_bs/message6
report/summary.html
+5
-5
report/summary.html
with
53 additions
and
6 deletions
+53
-6
air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向二级库.air/a_b4流程十一请领业务流_二级库向二级库.py
+
45
-
0
View file @
8dc06849
...
...
@@ -295,9 +295,54 @@ def add_dept2():
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
def
add_new_deptinfo
():
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
==
5
:
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'
,
'deptid5'
]
FileUtils
().
w_info8
(
info
,
module
,
'所有科室id'
,
titlename
,
'message6'
)
info1
=
[]
for
i
in
data1
:
ename
=
commonFuc
().
analysis_json
(
'ename'
,
i
)
info1
.
append
(
ename
)
FileUtils
().
w_info8
(
info1
,
module
,
'所有科室name'
,
titlename
,
'message6'
)
try
:
add_dept2
()
add_new_deptinfo
()
# set_dept_lead() # 设置二级科室负责人
# # 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0"
# add_logic_stock()
...
...
This diff is collapsed.
Click to expand it.
data/b2_herp3_bs/data
+
1
-
1
View file @
8dc06849
...
...
@@ -211,7 +211,7 @@ json_headers2: {
"payload13": {"pageNum": 1,"pageSize": 50,"orderBy": "code asc","queryObject": {"ename": "","branchId": "院区id", "branchId": "%s", "hosId": "医院id", "hosId": "h0347" }}
"payload14": {"branchId":"%s","cname":"","ename":"设备科001","erpCode":"001","address":"设备科001","contactWay":"13401003250","deptKind":1,"deptCate":1,"deptLevel":"1","flag":"1","hisDeptCodes":"","deptType":"1","packetType":"0","corpId":"h0347","corpKind":1}
"payload15": {"branchId":"%s","cname":"","ename":"二级检验科002","erpCode":"002","address":"二级检验科002","contactWay":"13401003250","deptKind":7,"deptCate":1,"deptLevel":"2","flag":"1","hisDeptCodes":"","deptType":"0","packetType":"0","corpId":"h0347","corpKind":1}
"payload15_2": {"branchId":"%s","cname":"","ename":"二级
检验
科005","erpCode":"005","address":"二级
检验
科005","contactWay":"13401003250","deptKind":7,"deptCate":1,"deptLevel":"2","flag":"1","hisDeptCodes":"","deptType":"0","packetType":"0","corpId":"%s","corpKind":1}
"payload15_2": {"branchId":"%s","cname":"","ename":"二级科
室
005","erpCode":"005","address":"二级科
室
005","contactWay":"13401003250","deptKind":7,"deptCate":1,"deptLevel":"2","flag":"1","hisDeptCodes":"","deptType":"0","packetType":"0","corpId":"%s","corpKind":1}
"payload16": {"branchId":"%s","pid":"%s","cname":"","ename":"三级检测组003","erpCode":"003","address":"三级检测组003","contactWay":"12401003250","deptKind":7,"deptCate":1,"deptLevel":"3","flag":"1","hisDeptCodes":"","deptType":"0","packetType":"0","corpId":"h0347","corpKind":1}
"payload17": {"branchId":"%s","pid":"%s","cname":"","ename":"科室004","erpCode":"004","address":"三级科室004","contactWay":"三级科室004","deptKind":5,"deptCate":1,"deptLevel":"4","flag":"1","hisDeptCodes":"","deptType":"0","packetType":"0","corpId":"h0347","corpKind":1}
...
...
This diff is collapsed.
Click to expand it.
data/b2_herp3_bs/message6
+
2
-
0
View file @
8dc06849
...
...
@@ -3,8 +3,10 @@
deptid2
:
ebacb1842d234dfd9dbc59fc11bad8bf
deptid3
:
97dac712280c45a89bbe2ad3ae40280b
deptid4
:
05a182bdd747451882d4abec8fc7bc2f
deptid5
:
15ac77f32ce84b5cb65a4034c2ef182e
所有科室name
:
deptid1
:
设备科001
deptid2
:
二级检验科002
deptid3
:
三级检测组003
deptid4
:
科室004
deptid5
:
二级检验科005
This diff is collapsed.
Click to expand it.
report/summary.html
+
5
-
5
View file @
8dc06849
...
...
@@ -76,9 +76,9 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0
</td>
<td
class=
'details-col-elapsed'
>
0分
2
秒
</td>
<td
class=
"details-col-elapsed"
>
0.0%
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
4
秒
</td>
<td
class=
"details-col-elapsed"
>
10
0.0%
</td>
</tr>
</table>
...
...
@@ -94,8 +94,8 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a_b4流程十一请领业务流_二级库向二级库/log.html'
target=
'_blank'
>
a_b4流程十一请领业务流_二级库向二级库
</a></td>
<td
class=
"
fail"
>
失败
</td>
<td
class=
"details-col-elapsed"
>
2.065
</td>
<td
class=
"
success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
4.219
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
...
...
This diff is collapsed.
Click to expand it.
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