feat(regulatory): 新增法规核查模型与工作流通用字段

This commit is contained in:
2026-06-07 00:23:58 +08:00
parent 665403735a
commit f52dcc197d
8 changed files with 878 additions and 7 deletions

View File

@@ -283,11 +283,12 @@ def export_download(request, export_id: int):
extra={"export_id": exported.pk, "storage_path": exported.storage_path},
)
return JsonResponse({"error": "文件不存在。"}, status=404)
content_type = (
"text/markdown; charset=utf-8"
if exported.export_type == ExportedSummaryFile.ExportType.MARKDOWN
else "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
)
content_types = {
ExportedSummaryFile.ExportType.MARKDOWN: "text/markdown; charset=utf-8",
ExportedSummaryFile.ExportType.EXCEL: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
ExportedSummaryFile.ExportType.JSON: "application/json; charset=utf-8",
}
content_type = content_types.get(exported.export_type, "application/octet-stream")
logger.info(
"Export download started",
extra={