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
e3b6ee57
Commit
e3b6ee57
authored
Jun 20, 2024
by
xiao-hesheng
Browse files
流程十四脚本编写
parent
cb8187f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b1流程八_高值跟台业务流程.air/a_b1流程八_高值跟台业务流程.py
View file @
e3b6ee57
...
@@ -173,11 +173,11 @@ def second_dept_in_warehouse():
...
@@ -173,11 +173,11 @@ def second_dept_in_warehouse():
# 条码库存查询=================================================
# 条码库存查询=================================================
# # 将二级库库存条码信息写入文件
# # 将二级库库存条码信息写入文件
data
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
data
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
data1
=
[]
data1
=
[]
for
i
in
data
:
for
i
in
data
:
lockStatus
=
commonFuc
().
analysis_json
(
'lockStatus'
,
i
)
lockStatus
=
commonFuc
().
analysis_json
(
'lockStatus'
,
i
)
if
lockStatus
==
0
:
if
lockStatus
==
0
:
data1
=
i
data1
=
i
break
break
list_a
=
[]
list_a
=
[]
list_b
=
[]
list_b
=
[]
...
@@ -256,16 +256,16 @@ def second_dept_in_warehouse():
...
@@ -256,16 +256,16 @@ def second_dept_in_warehouse():
print
(
'台使用确认——跟台退货,url'
,
url
)
print
(
'台使用确认——跟台退货,url'
,
url
)
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"二级库条码信息"
,
'message20'
)
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"二级库条码信息"
,
'message20'
)
list_a
=
info
[
'list_a'
]
list_a
=
info
[
'list_a'
]
extInfo
=
commonFuc
().
analysis_json
(
'extInfo'
,
list_a
)
extInfo
=
commonFuc
().
analysis_json
(
'extInfo'
,
list_a
)
distrOrderNo
=
reGetString
(
extInfo
,
r
'distrBillId": "'
,
r
'", '
)
distrOrderNo
=
reGetString
(
extInfo
,
r
'distrBillId": "'
,
r
'", '
)
print
(
'distrOrderNo'
,
distrOrderNo
)
print
(
'distrOrderNo'
,
distrOrderNo
)
provId
=
commonFuc
().
analysis_json
(
'provId'
,
list_a
)
provId
=
commonFuc
().
analysis_json
(
'provId'
,
list_a
)
provName
=
commonFuc
().
analysis_json
(
'provName'
,
list_a
)
provName
=
commonFuc
().
analysis_json
(
'provName'
,
list_a
)
hosGoodsCode
=
commonFuc
().
analysis_json
(
'hosGoodsCode'
,
list_a
)
hosGoodsCode
=
commonFuc
().
analysis_json
(
'hosGoodsCode'
,
list_a
)
goodsName
=
commonFuc
().
analysis_json
(
'goodsName'
,
list_a
)
goodsName
=
commonFuc
().
analysis_json
(
'goodsName'
,
list_a
)
goodsSpec
=
commonFuc
().
analysis_json
(
'goodsSpec'
,
list_a
)
goodsSpec
=
commonFuc
().
analysis_json
(
'goodsSpec'
,
list_a
)
unit
=
commonFuc
().
analysis_json
(
'unit'
,
list_a
)
unit
=
commonFuc
().
analysis_json
(
'unit'
,
list_a
)
qty
=
commonFuc
().
analysis_json
(
'qty'
,
list_a
)
qty
=
commonFuc
().
analysis_json
(
'qty'
,
list_a
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload36"
,
areaCode
,
areaName
,
viewId2
,
distrOrderNo
,
provId
,
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload36"
,
areaCode
,
areaName
,
viewId2
,
distrOrderNo
,
provId
,
provName
,
pkgCodeSee
,
hosGoodsId
,
hosGoodsCode
,
goodsName
,
goodsSpec
,
provName
,
pkgCodeSee
,
hosGoodsId
,
hosGoodsCode
,
goodsName
,
goodsSpec
,
unit
,
batchCode
,
productDate
,
expdtDate
,
qty
,
stockId
,
shelfCode
)
unit
,
batchCode
,
productDate
,
expdtDate
,
qty
,
stockId
,
shelfCode
)
...
@@ -275,6 +275,7 @@ def second_dept_in_warehouse():
...
@@ -275,6 +275,7 @@ def second_dept_in_warehouse():
# 跟台使用确认——跟台退货== == == == == == == == == == == == == == == ==
# 跟台使用确认——跟台退货== == == == == == == == == == == == == == == ==
def
out_return_gt
():
def
out_return_gt
():
module
=
"b5_spd3_core_business_flow"
module
=
"b5_spd3_core_business_flow"
# # 登录获取用户id等信息,使用创建的用户登录===========开始
# # 登录获取用户id等信息,使用创建的用户登录===========开始
...
@@ -285,42 +286,42 @@ def out_return_gt():
...
@@ -285,42 +286,42 @@ def out_return_gt():
# # 获取token和projectCode
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束
# 登录获取用户id等信息,使用创建的用户登录============结束
#跟台退货出库列表查询——中心库=================
#
跟台退货出库列表查询——中心库=================
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
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"
))
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_out_return_gt_url"
)
"herpService_out_return_gt_url"
)
print
(
'跟台退货出库列表查询——中心库================='
,
url
)
print
(
'跟台退货出库列表查询——中心库================='
,
url
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload37"
,
get_branch_id
())
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload37"
,
get_branch_id
())
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
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
DR_Id
=
'DR_Id'
DR_Id
=
'DR_Id'
for
i
in
data1
:
for
i
in
data1
:
status
=
commonFuc
().
analysis_json
(
'status'
,
i
)
status
=
commonFuc
().
analysis_json
(
'status'
,
i
)
if
status
==
'待处理'
:
if
status
==
'待处理'
:
DR_Id
=
commonFuc
().
analysis_json
(
'id'
,
i
)
DR_Id
=
commonFuc
().
analysis_json
(
'id'
,
i
)
break
break
try
:
try
:
print
(
'DR_Id'
,
DR_Id
)
print
(
'DR_Id'
,
DR_Id
)
except
:
except
:
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_out_return_confirm_url"
)
"herpService_out_return_confirm_url"
)
print
(
'#跟台退货出库确认——中心库================='
,
url
)
print
(
'#跟台退货出库确认——中心库================='
,
url
)
deptid1
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
deptid1
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload38"
,
DR_Id
,
deptid1
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload38"
,
DR_Id
,
deptid1
)
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
)
#跟台退货出库确认========================
# 跟台退货出库确认========================
try
:
try
:
set_dept_lead
()
# 设置二级科室负责人
set_dept_lead
()
# 设置二级科室负责人
# # # # 设置默认科室,切换到二级科室,使用科室管理功能
# # # # 设置默认科室,切换到二级科室,使用科室管理功能
...
@@ -339,7 +340,7 @@ try:
...
@@ -339,7 +340,7 @@ try:
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
second_dept_in_warehouse
()
# 二级科室入库
second_dept_in_warehouse
()
# 二级科室入库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
1
))
# 设置登录账号默认权限是中心库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
1
))
# 设置登录账号默认权限是中心库
out_return_gt
()
#
跟台退货出库_中心库处理
out_return_gt
()
#
跟台退货出库_中心库处理
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