openapi: 3.0.3 info: title: 柏悦头程履约 API description: 业务成功和失败均使用 HTTP 200;仅响应体 code 为字符串 "200" 时表示成功,其他 code 表示失败。 version: 1.1.0 security: - bearerAuth: [] paths: /api/platform/v1/first-leg/tasks: get: summary: 分页查询履约任务 description: 需要 platform:firstleg:task:list 权限 parameters: - $ref: '#/components/parameters/TenantId' - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/Size' - {name: keyword, in: query, schema: {type: string, maxLength: 64}} - {name: status, in: query, schema: {type: string, enum: [PENDING_ASSIGNMENT, ASSIGNED, PROCESSING, COMPLETED, CANCELLED]}} - {name: assigneeId, in: query, schema: {type: integer, format: int64}} responses: '200': {description: 成功或业务失败,按响应体 code 判断} '403': {description: 无查询权限} /api/platform/v1/first-leg/tasks/{taskId}: get: summary: 查询履约任务详情 description: 需要 platform:firstleg:task:view 权限 parameters: - $ref: '#/components/parameters/TenantId' - $ref: '#/components/parameters/TaskId' responses: '200': {description: 成功或业务失败,按响应体 code 判断} '403': {description: 无查看权限} /api/platform/v1/first-leg/tasks/by-order/{orderId}: get: summary: 按订单查询履约任务 description: 需要 platform:firstleg:task:view 权限 parameters: - $ref: '#/components/parameters/TenantId' - {name: orderId, in: path, required: true, schema: {type: integer, format: int64}} responses: '200': {description: 成功或业务失败,按响应体 code 判断} '403': {description: 无查看权限} /api/platform/v1/first-leg/tasks/{taskId}/assignment-history: get: summary: 分页查询任务分配历史 description: 需要 platform:firstleg:assignment:history 权限 parameters: - $ref: '#/components/parameters/TenantId' - $ref: '#/components/parameters/TaskId' - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/Size' responses: '200': {description: 成功或业务失败,按响应体 code 判断} '403': {description: 无历史查看权限} /api/platform/v1/first-leg/tasks/{taskId}/assignment: post: summary: 分配或改派履约任务 description: 需要 platform:firstleg:assignment:assign 权限 parameters: - $ref: '#/components/parameters/TenantId' - $ref: '#/components/parameters/TaskId' requestBody: required: true content: application/json: schema: {$ref: '#/components/schemas/AssignRequest'} responses: '200': {description: 成功或业务失败,按响应体 code 判断} '403': {description: 无分配权限} components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT parameters: TenantId: name: tenantId in: query required: true schema: {type: integer, format: int64, minimum: 1} TaskId: name: taskId in: path required: true schema: {type: integer, format: int64} Page: name: page in: query schema: {type: integer, format: int64, minimum: 1, default: 1} Size: name: size in: query schema: {type: integer, format: int64, minimum: 1, maximum: 200, default: 20} schemas: AssignRequest: type: object required: [assigneeId, assigneeName] properties: assigneeId: {type: integer, format: int64} assigneeName: {type: string, maxLength: 64} reason: {type: string, maxLength: 500}