add workflow 天润Smart-ccc工单数据,dev

This commit is contained in:
root 2024-07-02 10:48:23 +08:00
parent 22cc92470d
commit 56da9aa434
1 changed files with 9 additions and 5 deletions

View File

@ -72,15 +72,19 @@ def request_data_signature_post():
url_param = build_query_string(param) url_param = build_query_string(param)
print(f'url_param: {url_param}') print(f'url_param: {url_param}')
url_param = f'POSTapi-bj.clink.cn/ticket/list_ticket?{url_param}' url_param = f'POSTapi-bj.clink.cn/ticket/list_ticket?{url_param}'
print(f'url_param2: {url_param}') print(f'待计算字符串: {url_param}')
signature= generate_signature(url_param,'5g027B6w06630Y5240c1') signature= generate_signature(url_param,'5g027B6w06630Y5240c1')
print(f'signature: {signature}') print(f'计算签名: {signature}')
url = f'{url}?{url_path}&Signature={signature}' print(f'编码后签名: {urllib.parse.quote_plus(signature)}')
url = f'{url}?{url_path}&Signature={urllib.parse.quote_plus(signature)}'
print(f'url: {url}') print(f'url: {url}')
body={'endTime':formatted2_previous_hour(1),'startTime':'2024-01-01 00:00:00'} body={'endTime':formatted2_previous_hour(1),'startTime':'2024-01-01 00:00:00'}
#body={'endTime':formatted2_previous_hour(0),'startTime':formatted2_previous_hour(1)} #body={'endTime':formatted2_previous_hour(0),'startTime':formatted2_previous_hour(1)}
print(f'body: {body}') jsonData = json.dumps(body)
dataReqL=requests.post(url,headers=header,data=json.dumps(body)) print(f'body: {jsonData}')
dataReqL=requests.post(url,headers=header,data=jsonData)
i = 0 i = 0
while 'error' in dataReqL and i < 5: while 'error' in dataReqL and i < 5:
time.sleep(1) time.sleep(1)