diff --git a/app/api/router.py b/app/api/router.py index 98f5f2f..4d8070d 100644 --- a/app/api/router.py +++ b/app/api/router.py @@ -136,7 +136,7 @@ async def upload_file(files: List[UploadFile] = File(...)): summary="生成日报", description="生成日报,将生成的简报和日报文档转成html返回前端", ) -async def generate_report(background_tasks: BackgroundTasks): +async def generate_report(background_tasks: BackgroundTasks, time_type: int = 0): global data_dict try: logger.info("开始生成日报") @@ -148,7 +148,7 @@ async def generate_report(background_tasks: BackgroundTasks): # 存储文件的路径 fold_path = str(Path(UPLOAD_DIR).resolve()).replace("\\", "/") - data_dict = deal_docx(fold_path, DOWNLOAD_DIR) + data_dict = deal_docx(fold_path, DOWNLOAD_DIR,time_type=time_type) # 判断是否生成日报成功,如果成功,则转成html返回前端 report_sim_html = docx2html(data_dict["daily_repo_simple"]) diff --git a/app/templates/日报模板-2025-07-10.docx b/app/templates/日报模板-2025-07-10.docx new file mode 100644 index 0000000..cac5541 Binary files /dev/null and b/app/templates/日报模板-2025-07-10.docx differ diff --git a/app/templates/日报模板.docx b/app/templates/日报模板.docx index cac5541..fc33d89 100644 Binary files a/app/templates/日报模板.docx and b/app/templates/日报模板.docx differ