openapi: 3.0.3 info: title: Financial Report Generation - Data Package 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: Data Package description: 数据包管理 paths: /tasks/{taskId}/data-packages: get: summary: 查询任务数据包列表 tags: - Data Package 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/DataPackageResponse' post: summary: 创建数据包 tags: - Data Package 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/DataPackageRequest' responses: '200': description: 成功 content: application/json: schema: $ref: '#/components/schemas/DataPackageResponse' /data-packages/{packageId}: get: summary: 查询数据包详情 tags: - Data Package parameters: - name: packageId 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/DataPackageResponse' put: summary: 更新数据包 tags: - Data Package parameters: - name: packageId 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/DataPackageRequest' responses: '200': description: 成功 /data-packages/{packageId}/confirm: post: summary: 确认数据包 tags: - Data Package parameters: - name: packageId in: path required: true schema: type: string - name: tenantId in: header required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: confirmerId: type: string description: 确认人ID confirmerName: type: string description: 确认人名称 responses: '200': description: 成功 components: schemas: DataPackageRequest: type: object required: - knowledgeUnitId properties: knowledgeUnitId: type: string description: 知识单元ID status: type: string description: 数据状态 enum: [PENDING, FETCHING, READY, CONFIRMED, FAILED] autoData: type: object description: 自动取数结果 manualData: type: string description: 人工补录数据 dataSources: type: object description: 数据来源配置 DataPackageResponse: type: object properties: packageId: type: string description: 数据包ID taskId: type: string description: 任务ID tenantId: type: string description: 租户ID knowledgeUnitId: type: string description: 知识单元ID status: type: string description: 数据状态 autoData: type: object description: 自动取数结果 manualData: type: string description: 人工补录数据 mergedData: type: object description: 合并后的数据 dataSources: type: object description: 数据来源配置 confirmed: type: boolean description: 确认状态 confirmerId: type: string description: 确认人ID confirmerName: type: string description: 确认人名称 confirmTime: type: string format: date-time description: 确认时间 createTime: type: string format: date-time description: 创建时间 updateTime: type: string format: date-time description: 更新时间