chore: finalize backend feature scope

This commit is contained in:
刘金宝
2026-06-11 16:19:07 +08:00
parent d855ecab82
commit ec515d5453
43 changed files with 680 additions and 712 deletions
+1 -13
View File
@@ -7,7 +7,7 @@ from sqlalchemy.orm import Session
from app.core.response import ApiResponse, ok
from app.core.user_context import UserContext, get_user_context
from app.db.session import get_db
from app.schemas.evaluation import EvaluationDetailResponse, EvaluationListResponse, ExportPdfResponse
from app.schemas.evaluation import EvaluationDetailResponse, EvaluationListResponse
from app.services.evaluation_service import EvaluationService
from app.services.pdf_export_service import PdfExportService
@@ -35,18 +35,6 @@ def get_evaluation_detail(
return ok(EvaluationService(db).get_detail(evaluation_id, ctx.user_id))
@router.post("/{evaluation_id}/export-pdf", response_model=ApiResponse[ExportPdfResponse])
def export_pdf(
evaluation_id: int,
ctx: UserContext = Depends(get_user_context),
db: Session = Depends(get_db),
):
"""PDF 导出:生成评价报告 PDF 并保存导出记录。"""
export = PdfExportService(db).export(evaluation_id, ctx.user_id)
db.commit()
return ok(ExportPdfResponse(export_id=export.id, file_path=export.file_path))
@router.get("/{evaluation_id}/download-pdf", response_class=FileResponse)
def download_pdf(
evaluation_id: int,