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
3a7d6098
Commit
3a7d6098
authored
Apr 28, 2024
by
xiao-hesheng
Browse files
流程五脚本编写
parent
490b4fec
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_a8流程五_中心库入库结算_正结算3_外网开票.air/a_a8流程五_中心库入库结算_正结算3_外网开票.py
View file @
3a7d6098
...
@@ -157,14 +157,7 @@ def invoice():
...
@@ -157,14 +157,7 @@ def invoice():
provId
,
provId
,
branchId
,
balanceDetId
,
purMode
,
barCode
,
viewId
)
branchId
,
balanceDetId
,
purMode
,
barCode
,
viewId
)
print
(
'request_body'
,
request_body
)
print
(
'request_body'
,
request_body
)
# request_body = "[" + str(request_body) + "]"
# print('request_body', request_body)
# # string = "这是一段包含'单引号'的文本"
# new_request_body = request_body.replace("'", '"')
# new_request_body1 = new_request_body.replace("\\", '\\\\')
# new_request_body2=new_request_body1.replace("None", 'null')
# print(new_request_body2)
# request_body_json = json.loads(new_request_body2,encoding='utf-8')
request_body_json
=
get_process_list
(
request_body
)
request_body_json
=
get_process_list
(
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body_json
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body_json
,
headers
)
print
(
'result'
,
result
)
print
(
'result'
,
result
)
...
...
air_case/public1/public1/public1.py
View file @
3a7d6098
...
@@ -613,27 +613,13 @@ def invoice(type=1,OBh_ID='OBhxxxxxxxxxxxxxxx'):
...
@@ -613,27 +613,13 @@ def invoice(type=1,OBh_ID='OBhxxxxxxxxxxxxxxx'):
invoiceQty
=
leftSettleQty
invoiceQty
=
leftSettleQty
invoiceAmount
=
maxSettleAmount
invoiceAmount
=
maxSettleAmount
invoiceDate
=
timeUtils
().
get_time_hms
(
5
)
invoiceDate
=
timeUtils
().
get_time_hms
(
5
)
if
type
==
2
:
#负结算
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload3_2_2_2"
,
hosName
,
invoiceQty
,
invoiceAmount
,
invoiceDate
,
hosId
,
hosVersion
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload3_2_2_2"
,
hosName
,
invoiceQty
,
invoiceAmount
,
invoiceDate
,
hosId
,
hosVersion
)
else
:
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload3_2_2_2"
,
hosName
,
invoiceQty
,
invoiceAmount
,
invoiceDate
,
hosId
,
hosVersion
)
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
)
print
(
'发票提交'
,
result
)
time
.
sleep
(
3
)
time
.
sleep
(
3
)
# while True:
# time.sleep(3)
# print('发票提交,等待3秒')
# request_body = commonFuc().get_business_data(module, "payload3_2_2_2", hosName, -invoiceQty, -invoiceAmount,
# invoiceDate, hosId, hosVersion)
# print('发票提交request_body2', request_body)
# result = commonFuc().http_post(url, request_body, headers)
# print('发票提交结果2', result)
# if commonFuc().analysis_json('code',result)==0:
# break
print
(
'result'
,
result
)
print
(
'result'
,
result
)
#==============发票提交===========================================
#==============发票提交===========================================
#===============发票确认列表查询
#===============发票确认列表查询
...
...
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