Compare commits

..

No commits in common. "c7ddf94011c39d2d5079db29a1c923af6605a40a" and "9ce6a041b08b2f48221973b9e92bf00e9bda8d3c" have entirely different histories.

1 changed files with 2 additions and 6 deletions

View File

@ -86,7 +86,7 @@ def gen_cross_compare_report(params):
# 验证文件是否已经存在
cos_client = get_client()
folder_manager = CosFolderManager(cos_client, g_cos_bucket)
download_url = g_cos_root + f"/user/cross_doctor/platform_report/{nodeid}/{area_id}/cross_compare_report/" + file_name
download_url = g_cos_root + "/user/cross_doctor/export_files/cross_compare_files/" + file_name
if folder_manager.file_exists(download_url):
res = make_common_res(0, 'ok')
res['data'] = {
@ -97,7 +97,6 @@ def gen_cross_compare_report(params):
'file_name': file_name,
'gen_report_date': gen_report_date,
'date_range': data_range,
'weekdays': weekdays,
'compare_date_range': compare_date_range,
'weekday_str': gen_weekday_str(weekdays),
'download_url': download_url
@ -247,7 +246,7 @@ def gen_cross_compare_report(params):
doc1.build_template('')
doc1.doc.save(file_stream)
file_stream.seek(0)
cos_path = f'user/cross_doctor/platform_report/{nodeid}/{area_id}/cross_compare_report'
cos_path = f'user/cross_doctor/task_file'
folder_manager.ensure_folder(cos_path)
cos_key = f"{cos_path}/{cross_static_info['name']}路口优化对比报告.docx"
cos_client.put_object(Bucket=g_cos_bucket, Key=cos_key, Body=file_stream)
@ -261,7 +260,6 @@ def gen_cross_compare_report(params):
'file_name': file_name,
'gen_report_date': gen_report_date,
'date_range': data_range,
'weekdays': weekdays,
'compare_date_range': compare_date_range,
'weekday_str': gen_weekday_str(weekdays),
'download_url': download_url
@ -595,8 +593,6 @@ def query_collect_report_record(params):
return json.dumps(make_common_res(7, '缺少报告类型,请刷新后重试'))
report_type = int(report_type)
records = db_tmnet.query_collect_report_records(nodeid, area_id, report_type)
for item in records:
item['create_time'] = item['create_time'].strftime('%Y-%m-%d %H:%M:%S')
res = make_common_res(0, 'ok')
res['data'] = records
return json.dumps(res, ensure_ascii=False)