feat(govdoc): 补 structure/outline API 端点

This commit is contained in:
wren
2026-05-13 15:25:13 +08:00
parent eb5acc8da9
commit b532ffc3b9
5 changed files with 71 additions and 0 deletions
@@ -181,6 +181,24 @@ class GovdocController(BaseController):
result = await self.GovdocService.GetRunEntities(runId=runId)
return Result.success(data=result)
@self.router.get("/runs/{runId}/structure")
async def GetRunStructure(
runId: int,
payload: dict[str, Any] = Depends(verify_access_token),
):
"""获取文档结构统计(结构面板数据)。"""
result = await self.GovdocService.GetRunStructure(runId=runId)
return Result.success(data=result)
@self.router.get("/runs/{runId}/outline")
async def GetRunOutline(
runId: int,
payload: dict[str, Any] = Depends(verify_access_token),
):
"""获取文档大纲树(大纲面板数据)。"""
result = await self.GovdocService.GetRunOutline(runId=runId)
return Result.success(data=result)
@self.router.get("/runs/{runId}/paragraphs")
async def GetRunParagraphs(
runId: int,