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

This commit is contained in:
root 2025-02-07 17:18:36 +08:00
parent 13d9d4b152
commit f29f27b070
1 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,7 @@ def build_query_string(params):
) for k, v in sorted_params.items()) ) for k, v in sorted_params.items())
return query_string return query_string
current_end_time = formatted2_previous_hour(0)
def request_data_signature_post(offset, pageSize): def request_data_signature_post(offset, pageSize):
print(f'开始请求工单列表数据:{formatted2_previous_hour(0)}') print(f'开始请求工单列表数据:{formatted2_previous_hour(0)}')
@ -80,7 +81,7 @@ def request_data_signature_post(offset, pageSize):
print(f'url: {url}') print(f'url: {url}')
# body={'endTime':formatted2_previous_hour(0),'startTime':'2024-01-01 00:00:00'} # body={'endTime':formatted2_previous_hour(0),'startTime':'2024-01-01 00:00:00'}
body={'endTime':formatted2_previous_hour(0),'startTime':'1900-01-01 00:00:00','updateTimeStart':formatted2_previous_hour(1),'updateTimeEnd':formatted2_previous_hour(0)} body={'endTime':formatted2_previous_hour(0),'startTime':'1900-01-01 00:00:00','updateTimeStart':formatted2_previous_hour(1),'updateTimeEnd':current_end_time}
jsonData = json.dumps(body) jsonData = json.dumps(body)
print(f'body: {jsonData}') print(f'body: {jsonData}')
dataReqL=requests.post(url,headers=header,data=jsonData) dataReqL=requests.post(url,headers=header,data=jsonData)
@ -181,6 +182,7 @@ if __name__ == "__main__":
print(f'{formatted2_previous_hour(0)}开始请求工单信息') print(f'{formatted2_previous_hour(0)}开始请求工单信息')
offset = 0 offset = 0
pageSize = 100 pageSize = 100
current_end_time = formatted2_previous_hour(0)
resL = request_data_signature_post(offset,pageSize) resL = request_data_signature_post(offset,pageSize)
print(resL) print(resL)
if 'error' in resL: if 'error' in resL: