add workflow 天润Smart-ccc工单数据,dev
This commit is contained in:
parent
262ddd7d72
commit
de25dc81a5
|
@ -65,11 +65,11 @@ def build_query_string(params):
|
||||||
def request_data_signature_post():
|
def request_data_signature_post():
|
||||||
print(f'开始请求工单列表数据:{formatted2_previous_hour(0)}')
|
print(f'开始请求工单列表数据:{formatted2_previous_hour(0)}')
|
||||||
url='https://api-bj.clink.cn/ticket/list_ticket'
|
url='https://api-bj.clink.cn/ticket/list_ticket'
|
||||||
header={}
|
header={'Content-Type':'application/json;charset=UTF-8'}
|
||||||
param={'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177','Timestamp':current_time_utc,'Expires':'86400',}
|
param={'AccessKeyId':'b17759d3a36fba9a2cf522fbf4cbf177','Timestamp':current_time_utc,'Expires':86400}
|
||||||
print(f'param: {param}')
|
print(f'param: {param}')
|
||||||
url_path = build_query_string(param)
|
url_path = build_query_string(param)
|
||||||
url_param = url_path
|
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_param2: {url_param}')
|
||||||
|
@ -77,10 +77,10 @@ def request_data_signature_post():
|
||||||
print(f'signature: {signature}')
|
print(f'signature: {signature}')
|
||||||
url = f'{url}?{url_path}&Signature={signature}'
|
url = f'{url}?{url_path}&Signature={signature}'
|
||||||
print(f'url: {url}')
|
print(f'url: {url}')
|
||||||
body={'endTime':'2024-01-01 00:00:00','startTime':formatted2_previous_hour(1)}
|
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}')
|
print(f'body: {body}')
|
||||||
dataReqL=requests.post(url,headers=header,params=body)
|
dataReqL=requests.post(url,headers=header,data=json.dumps(body))
|
||||||
i = 0
|
i = 0
|
||||||
while 'error' in dataReqL and i < 5:
|
while 'error' in dataReqL and i < 5:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
Loading…
Reference in New Issue