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
785d8f8c
Commit
785d8f8c
authored
Jul 12, 2024
by
肖 和生
Browse files
Merge remote-tracking branch 'remotes/origin/master' into core_flow
parents
9e10584f
7ad46483
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_a5流程五_中心库入库结算_正结算1_提交采购计划.air/a_a5流程五_中心库入库结算_正结算1_提交采购计划.py
View file @
785d8f8c
...
...
@@ -455,59 +455,7 @@ def reagent_purchase_plan():
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
def
goods_move3
():
# 设置请领出库渠道为中心库
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
username
=
info
[
'username1'
]
password
=
commonFuc
().
get_business_data
(
"b2_herp3_bs"
,
"password"
)
print
(
'username,password'
,
username
,
password
)
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束
module
=
"b2_herp3_bs"
# 设置请领出库渠道为中心库
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"updateSettleType_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"
))
for
i
in
range
(
1
,
4
):
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"产品审核信息"
,
'message%s'
%
i
)
hosGoodsId
=
info
[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
branchGoodsId
=
SERACH_goods_id
(
GoodsId
)
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload47_3"
,
branchGoodsId
,
hosGoodsId
,
get_branch_id
())
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'goods_move,result'
,
result
)
def
SERACH_goods_id
(
GoodsId
):
# 在请领出库渠道边仓中搜索产品
module
=
'b5_spd3_core_business_flow'
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
username
=
info
[
'username1'
]
password
=
commonFuc
().
get_business_data
(
"b2_herp3_bs"
,
"password"
)
print
(
'username,password'
,
username
,
password
)
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束\
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_mcmsBranchGoodsInfo_page_url"
)
dept1
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
# hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId']
# GoodsId = hosGoodsId.replace(get_hosid(), '')
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload53_2"
,
GoodsId
,
get_hosid
(),
get_branch_id
(),
dept1
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
branchGoodsId
=
commonFuc
().
analysis_json
(
'id'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
return
branchGoodsId
def
main
():
try
:
# 获取低值的hosGoodsId
...
...
air_case/b5_spd3_core_business_flow/a_b2流程九请领业务流_二级库向中心库.air/a_b2流程九请领业务流_二级库向中心库.py
View file @
785d8f8c
...
...
@@ -390,6 +390,61 @@ def pick_execute(hosGoodsId,GoodsId,type=1):
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'herpService_stock_review_pass_submit_urlresult'
,
result
)
#复核===================================
def
goods_move3
():
# 设置请领出库渠道为中心库
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
username
=
info
[
'username1'
]
password
=
commonFuc
().
get_business_data
(
"b2_herp3_bs"
,
"password"
)
print
(
'username,password'
,
username
,
password
)
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束
module
=
"b2_herp3_bs"
# 设置请领出库渠道为中心库
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"updateSettleType_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"
))
for
i
in
range
(
1
,
4
):
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"产品审核信息"
,
'message%s'
%
i
)
hosGoodsId
=
info
[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
branchGoodsId
=
SERACH_goods_id
(
GoodsId
)
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload47_3"
,
branchGoodsId
,
hosGoodsId
,
get_branch_id
())
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'goods_move,result'
,
result
)
def
SERACH_goods_id
(
GoodsId
):
# 在请领出库渠道边仓中搜索产品
module
=
'b5_spd3_core_business_flow'
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
username
=
info
[
'username1'
]
password
=
commonFuc
().
get_business_data
(
"b2_herp3_bs"
,
"password"
)
print
(
'username,password'
,
username
,
password
)
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束\
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_mcmsBranchGoodsInfo_page_url"
)
dept1
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
# hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId']
# GoodsId = hosGoodsId.replace(get_hosid(), '')
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload53_2"
,
GoodsId
,
get_hosid
(),
get_branch_id
(),
dept1
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
branchGoodsId
=
commonFuc
().
analysis_json
(
'id'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
return
branchGoodsId
def
main
():
try
:
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
...
...
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