Commit 3a7d6098 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程五脚本编写

parent 490b4fec
......@@ -157,14 +157,7 @@ def invoice():
provId,
branchId, balanceDetId, purMode, barCode, viewId)
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)
result = commonFuc().http_post(url, request_body_json, headers)
print('result', result)
......
......@@ -613,27 +613,13 @@ def invoice(type=1,OBh_ID='OBhxxxxxxxxxxxxxxx'):
invoiceQty=leftSettleQty
invoiceAmount=maxSettleAmount
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)
else:
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)
print('发票提交request_body',request_body)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('发票提交',result)
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)
#==============发票提交===========================================
#===============发票确认列表查询
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment