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
39cd0798
Commit
39cd0798
authored
Jun 07, 2024
by
xiao-hesheng
Browse files
流程十二脚本编写
parent
8f283713
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b7流程十四退库业务_消耗退库.air/a_b7流程十四退库业务_消耗退库.py
View file @
39cd0798
...
@@ -434,7 +434,7 @@ def second_dept_consume_in_Stock(type=1):
...
@@ -434,7 +434,7 @@ def second_dept_consume_in_Stock(type=1):
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
if
type
==
2
:
if
type
==
2
:
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"dept_stock_scan_url"
)
"dept_stock_scan_url"
)
print
(
'消耗扫条码,url'
,
url
)
print
(
'消耗扫条码,url'
,
url
)
...
@@ -501,7 +501,13 @@ def second_dept_consume_in_Stock(type=1):
...
@@ -501,7 +501,13 @@ def second_dept_consume_in_Stock(type=1):
print
(
'消耗退回'
,
'request_body'
,
request_body
)
print
(
'消耗退回'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'消耗退回,result'
,
result
)
print
(
'消耗退回,result'
,
result
)
elif
type
==
1
:
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
if
data
!=
None
and
code
==
0
:
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
elif
type
==
1
:
print
(
'低值耗材消耗退回入库'
)
print
(
'低值耗材消耗退回入库'
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_dept_availablePage_list_url"
)
"herpService_dept_availablePage_list_url"
)
...
@@ -509,19 +515,26 @@ def second_dept_consume_in_Stock(type=1):
...
@@ -509,19 +515,26 @@ def second_dept_consume_in_Stock(type=1):
list_a
=
info
[
'list_a'
]
list_a
=
info
[
'list_a'
]
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
list_a
)
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
list_a
)
stockName
=
commonFuc
().
analysis_json
(
'stockName'
,
list_a
)
stockName
=
commonFuc
().
analysis_json
(
'stockName'
,
list_a
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
list_a
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
list_a
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
list_a
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
list_a
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload63"
,
stockId
,
stockName
,
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload63"
,
stockId
,
stockName
,
areaCode
,
areaName
,
get_hosid
())
areaCode
,
areaName
,
get_hosid
())
print
(
'低值消耗产品查询'
,
'request_body'
,
request_body
)
print
(
'低值消耗产品查询'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'低值消耗产品查询,result'
,
result
)
print
(
'低值消耗产品查询,result'
,
result
)
viewId2
=
commonFuc
().
analysis_json
(
'viewId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
viewId2
=
commonFuc
().
analysis_json
(
'viewId'
,
commonFuc
().
analysis_json
(
'data'
,
DRh_id
=
commonFuc
().
analysis_json
(
'billId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
commonFuc
().
analysis_json
(
'data'
,
barcodeId
=
commonFuc
().
analysis_json
(
'bottleId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
result
)))
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
DRh_id
=
commonFuc
().
analysis_json
(
'billId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
barcodeId
=
commonFuc
().
analysis_json
(
'bottleId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
# 消耗退回 == == == == == == == == == == == == == == == ==
# 消耗退回 == == == == == == == == == == == == == == == ==
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"dept_stock_rtn_submit_url"
)
"dept_stock_rtn_submit_url"
)
...
@@ -533,7 +546,13 @@ def second_dept_consume_in_Stock(type=1):
...
@@ -533,7 +546,13 @@ def second_dept_consume_in_Stock(type=1):
print
(
'低值消耗消耗退回'
,
'request_body'
,
request_body
)
print
(
'低值消耗消耗退回'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'低值消耗消耗退回,result'
,
result
)
print
(
'低值消耗消耗退回,result'
,
result
)
elif
type
==
3
:
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
if
data
!=
None
and
code
==
0
:
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
elif
type
==
3
:
print
(
'试剂耗材消耗退回入库'
)
print
(
'试剂耗材消耗退回入库'
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_dept_availablePage_list_url"
)
"herpService_dept_availablePage_list_url"
)
...
@@ -541,21 +560,28 @@ def second_dept_consume_in_Stock(type=1):
...
@@ -541,21 +560,28 @@ def second_dept_consume_in_Stock(type=1):
list_a
=
info
[
'list_a'
]
list_a
=
info
[
'list_a'
]
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
list_a
)
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
list_a
)
stockName
=
commonFuc
().
analysis_json
(
'stockName'
,
list_a
)
stockName
=
commonFuc
().
analysis_json
(
'stockName'
,
list_a
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
list_a
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
list_a
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
list_a
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
list_a
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload64"
,
stockId
,
stockName
,
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload64"
,
stockId
,
stockName
,
areaCode
,
areaName
,
get_hosid
())
areaCode
,
areaName
,
get_hosid
())
print
(
'试剂耗材消耗退回入库产品查询'
,
'request_body'
,
request_body
)
print
(
'试剂耗材消耗退回入库产品查询'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'试剂耗材消耗退回入库产品查询,result'
,
result
)
print
(
'试剂耗材消耗退回入库产品查询,result'
,
result
)
# import pdb
# import pdb
# pdb.set_trace()
# pdb.set_trace()
viewId2
=
commonFuc
().
analysis_json
(
'viewId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
viewId2
=
commonFuc
().
analysis_json
(
'viewId'
,
commonFuc
().
analysis_json
(
'data'
,
DRh_id
=
commonFuc
().
analysis_json
(
'billId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
commonFuc
().
analysis_json
(
'data'
,
barcodeId
=
commonFuc
().
analysis_json
(
'bottleId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
result
)))
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
DRh_id
=
commonFuc
().
analysis_json
(
'billId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
barcodeId
=
commonFuc
().
analysis_json
(
'bottleId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
# 消耗退回 == == == == == == == == == == == == == == == ==
# 消耗退回 == == == == == == == == == == == == == == == ==
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"dept_stock_rtn_submit_url"
)
"dept_stock_rtn_submit_url"
)
...
@@ -567,6 +593,13 @@ def second_dept_consume_in_Stock(type=1):
...
@@ -567,6 +593,13 @@ def second_dept_consume_in_Stock(type=1):
print
(
'试剂耗材消耗退回'
,
'request_body'
,
request_body
)
print
(
'试剂耗材消耗退回'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'试剂耗材消耗退回,result'
,
result
)
print
(
'试剂耗材消耗退回,result'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
if
data
!=
None
and
code
==
0
:
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
try
:
try
:
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
2
))
# 设置登录账号默认权限是二级库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
2
))
# 设置登录账号默认权限是二级库
...
@@ -575,9 +608,9 @@ try:
...
@@ -575,9 +608,9 @@ try:
second_dept_consume_Out_Stock
(
2
)
# 高值消耗出库
second_dept_consume_Out_Stock
(
2
)
# 高值消耗出库
second_dept_consume_in_Stock
(
2
)
# 高值消耗退货入库
second_dept_consume_in_Stock
(
2
)
# 高值消耗退货入库
second_dept_consume_Out_Stock
(
1
)
# 低值消耗出库
second_dept_consume_Out_Stock
(
1
)
# 低值消耗出库
second_dept_consume_in_Stock
(
1
)
# 低值消耗退回入库
second_dept_consume_in_Stock
(
1
)
# 低值消耗退回入库
second_dept_consume_Out_Stock
(
3
)
# 试剂消耗出库
second_dept_consume_Out_Stock
(
3
)
# 试剂消耗出库
second_dept_consume_in_Stock
(
3
)
#
试剂消耗退回入库
second_dept_consume_in_Stock
(
3
)
#
试剂消耗退回入库
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
except
:
except
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'1'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'1'
)
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