| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- openapi: 3.0.3
- info:
- title: Financial Report Generation - Report API
- version: 1.0.0
- description: 报告管理API
- servers:
- - url: http://localhost:8080/api/v1
- description: 本地开发环境
- - url: https://api.finrep.example.com/api/v1
- description: 生产环境
- tags:
- - name: Report
- description: 报告管理
- paths:
- /tasks/{taskId}/reports:
- get:
- summary: 查询任务报告列表
- tags:
- - Report
- parameters:
- - name: taskId
- in: path
- required: true
- schema:
- type: string
- - name: tenantId
- in: header
- required: true
- schema:
- type: string
- responses:
- '200':
- description: 成功
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/ReportResponse'
- post:
- summary: 创建报告
- tags:
- - Report
- parameters:
- - name: taskId
- in: path
- required: true
- schema:
- type: string
- - name: tenantId
- in: header
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportRequest'
- responses:
- '200':
- description: 成功
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportResponse'
- /reports/{reportId}:
- get:
- summary: 查询报告详情
- tags:
- - Report
- parameters:
- - name: reportId
- in: path
- required: true
- schema:
- type: string
- - name: tenantId
- in: header
- required: true
- schema:
- type: string
- responses:
- '200':
- description: 成功
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportResponse'
- put:
- summary: 更新报告
- tags:
- - Report
- parameters:
- - name: reportId
- in: path
- required: true
- schema:
- type: string
- - name: tenantId
- in: header
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportRequest'
- responses:
- '200':
- description: 成功
- delete:
- summary: 删除报告
- tags:
- - Report
- parameters:
- - name: reportId
- in: path
- required: true
- schema:
- type: string
- - name: tenantId
- in: header
- required: true
- schema:
- type: string
- responses:
- '200':
- description: 成功
- /reports/{reportId}/export:
- post:
- summary: 导出报告
- tags:
- - Report
- parameters:
- - name: reportId
- in: path
- required: true
- schema:
- type: string
- - name: tenantId
- in: header
- required: true
- schema:
- type: string
- - name: format
- in: query
- required: true
- schema:
- type: string
- enum: [PDF, WORD, HTML]
- responses:
- '200':
- description: 成功
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- headers:
- Content-Disposition:
- schema:
- type: string
- description: 文件下载响应头
- components:
- schemas:
- ReportRequest:
- type: object
- required:
- - title
- - format
- properties:
- title:
- type: string
- description: 报告标题
- maxLength: 255
- content:
- type: string
- description: 报告内容
- format:
- type: string
- description: 报告格式
- enum: [PDF, WORD, HTML, MARKDOWN, JSON]
- outlineId:
- type: string
- description: 关联大纲ID
- metadata:
- type: object
- description: 元数据
- ReportResponse:
- type: object
- properties:
- reportId:
- type: string
- description: 报告ID
- taskId:
- type: string
- description: 任务ID
- tenantId:
- type: string
- description: 租户ID
- title:
- type: string
- description: 报告标题
- content:
- type: string
- description: 报告内容
- format:
- type: string
- description: 报告格式
- status:
- type: string
- description: 报告状态
- enum: [DRAFT, GENERATING, COMPLETED, FAILED]
- outlineId:
- type: string
- description: 关联大纲ID
- outlineVersion:
- type: integer
- description: 大纲版本
- fileUrl:
- type: string
- description: 文件URL
- fileSize:
- type: integer
- description: 文件大小
- metadata:
- type: object
- description: 元数据
- reviewerId:
- type: string
- description: 审核人ID
- reviewerName:
- type: string
- description: 审核人名称
- reviewTime:
- type: string
- format: date-time
- description: 审核时间
- createTime:
- type: string
- format: date-time
- description: 创建时间
- updateTime:
- type: string
- format: date-time
- description: 更新时间
|