完善保险端的前后端
This commit is contained in:
755
insurance_backend/docs/insurance-application-api.yaml
Normal file
755
insurance_backend/docs/insurance-application-api.yaml
Normal file
@@ -0,0 +1,755 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: 参保申请管理API
|
||||
description: 保险系统参保申请功能相关API接口文档
|
||||
version: 1.0.0
|
||||
contact:
|
||||
name: 开发团队
|
||||
email: dev@example.com
|
||||
|
||||
servers:
|
||||
- url: http://localhost:3000/api
|
||||
description: 开发环境
|
||||
|
||||
paths:
|
||||
/insurance/applications:
|
||||
get:
|
||||
summary: 获取参保申请列表
|
||||
description: 分页获取参保申请列表,支持多种筛选条件
|
||||
tags:
|
||||
- 参保申请
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- name: page
|
||||
in: query
|
||||
description: 页码
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
default: 1
|
||||
minimum: 1
|
||||
- name: limit
|
||||
in: query
|
||||
description: 每页数量
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
default: 10
|
||||
minimum: 1
|
||||
maximum: 100
|
||||
- name: application_no
|
||||
in: query
|
||||
description: 申请单号(模糊搜索)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: name
|
||||
in: query
|
||||
description: 投保人姓名(模糊搜索)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: status
|
||||
in: query
|
||||
description: 申请状态
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum: [pending, initial_approved, under_review, approved, rejected, paid]
|
||||
- name: insurance_type_name
|
||||
in: query
|
||||
description: 参保险种名称(模糊搜索)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: insurance_category
|
||||
in: query
|
||||
description: 参保类型(模糊搜索)
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: dateRange[start]
|
||||
in: query
|
||||
description: 申请时间范围开始
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
- name: dateRange[end]
|
||||
in: query
|
||||
description: 申请时间范围结束
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: true
|
||||
message:
|
||||
type: string
|
||||
example: "获取保险申请列表成功"
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/InsuranceApplication'
|
||||
pagination:
|
||||
$ref: '#/components/schemas/Pagination'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/Forbidden'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
post:
|
||||
summary: 创建参保申请
|
||||
description: 创建新的参保申请
|
||||
tags:
|
||||
- 参保申请
|
||||
security:
|
||||
- bearerAuth: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CreateInsuranceApplicationRequest'
|
||||
responses:
|
||||
'201':
|
||||
description: 创建成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: true
|
||||
message:
|
||||
type: string
|
||||
example: "保险申请创建成功"
|
||||
data:
|
||||
$ref: '#/components/schemas/InsuranceApplication'
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/Forbidden'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
/insurance/applications/{id}:
|
||||
get:
|
||||
summary: 获取参保申请详情
|
||||
description: 根据ID获取单个参保申请的详细信息
|
||||
tags:
|
||||
- 参保申请
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: 申请ID
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: true
|
||||
message:
|
||||
type: string
|
||||
example: "获取保险申请详情成功"
|
||||
data:
|
||||
$ref: '#/components/schemas/InsuranceApplication'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/Forbidden'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
put:
|
||||
summary: 更新参保申请
|
||||
description: 更新参保申请信息
|
||||
tags:
|
||||
- 参保申请
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: 申请ID
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UpdateInsuranceApplicationRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: 更新成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: true
|
||||
message:
|
||||
type: string
|
||||
example: "保险申请更新成功"
|
||||
data:
|
||||
$ref: '#/components/schemas/InsuranceApplication'
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/Forbidden'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
delete:
|
||||
summary: 删除参保申请
|
||||
description: 删除指定的参保申请
|
||||
tags:
|
||||
- 参保申请
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: 申请ID
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: 删除成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: true
|
||||
message:
|
||||
type: string
|
||||
example: "保险申请删除成功"
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/Forbidden'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
/insurance/applications/{id}/review:
|
||||
patch:
|
||||
summary: 审核参保申请
|
||||
description: 对参保申请进行审核操作
|
||||
tags:
|
||||
- 参保申请
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: 申请ID
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ReviewApplicationRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: 审核成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: true
|
||||
message:
|
||||
type: string
|
||||
example: "保险申请审核成功"
|
||||
data:
|
||||
$ref: '#/components/schemas/InsuranceApplication'
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/Forbidden'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
/insurance/applications-stats:
|
||||
get:
|
||||
summary: 获取参保申请统计
|
||||
description: 获取各状态的申请数量统计
|
||||
tags:
|
||||
- 参保申请
|
||||
security:
|
||||
- bearerAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: true
|
||||
message:
|
||||
type: string
|
||||
example: "获取保险申请统计成功"
|
||||
data:
|
||||
type: object
|
||||
properties:
|
||||
pending:
|
||||
type: integer
|
||||
description: 待初审数量
|
||||
example: 10
|
||||
initial_approved:
|
||||
type: integer
|
||||
description: 初审通过待复核数量
|
||||
example: 5
|
||||
under_review:
|
||||
type: integer
|
||||
description: 已支付待复核数量
|
||||
example: 3
|
||||
approved:
|
||||
type: integer
|
||||
description: 已支付数量
|
||||
example: 20
|
||||
rejected:
|
||||
type: integer
|
||||
description: 已拒绝数量
|
||||
example: 2
|
||||
paid:
|
||||
type: integer
|
||||
description: 已支付数量
|
||||
example: 15
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/Forbidden'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
/insurance/categories:
|
||||
get:
|
||||
summary: 获取参保类型选项
|
||||
description: 获取可选的参保类型列表
|
||||
tags:
|
||||
- 参保申请
|
||||
security:
|
||||
- bearerAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: 获取成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: true
|
||||
message:
|
||||
type: string
|
||||
example: "获取参保类型选项成功"
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
example: ["牛", "羊", "猪", "鸡", "鸭", "鹅"]
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/Forbidden'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
bearerFormat: JWT
|
||||
|
||||
schemas:
|
||||
InsuranceApplication:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: 申请ID
|
||||
example: 1
|
||||
application_no:
|
||||
type: string
|
||||
description: 申请单号
|
||||
example: "20230814205416141"
|
||||
customer_name:
|
||||
type: string
|
||||
description: 投保人姓名
|
||||
example: "张三"
|
||||
customer_id_card:
|
||||
type: string
|
||||
description: 身份证号(脱敏显示)
|
||||
example: "420***********0091"
|
||||
customer_phone:
|
||||
type: string
|
||||
description: 电话(脱敏显示)
|
||||
example: "186****2563"
|
||||
customer_address:
|
||||
type: string
|
||||
description: 参保地址
|
||||
example: "哈哈哈哈哈哈"
|
||||
insurance_type_id:
|
||||
type: integer
|
||||
description: 保险类型ID
|
||||
example: 1
|
||||
insurance_category:
|
||||
type: string
|
||||
description: 参保类型
|
||||
example: "牛"
|
||||
application_quantity:
|
||||
type: integer
|
||||
description: 申请数量
|
||||
example: 50
|
||||
application_amount:
|
||||
type: number
|
||||
format: decimal
|
||||
description: 申请金额
|
||||
example: 10000.00
|
||||
status:
|
||||
type: string
|
||||
enum: [pending, initial_approved, under_review, approved, rejected, paid]
|
||||
description: 申请状态
|
||||
example: "pending"
|
||||
remarks:
|
||||
type: string
|
||||
description: 备注
|
||||
example: "无"
|
||||
application_date:
|
||||
type: string
|
||||
format: date-time
|
||||
description: 申请时间
|
||||
example: "2023-08-14T20:54:16.000Z"
|
||||
review_notes:
|
||||
type: string
|
||||
description: 审核备注
|
||||
example: null
|
||||
reviewer_id:
|
||||
type: integer
|
||||
description: 审核人ID
|
||||
example: null
|
||||
review_date:
|
||||
type: string
|
||||
format: date-time
|
||||
description: 审核时间
|
||||
example: null
|
||||
documents:
|
||||
type: array
|
||||
description: 相关文档
|
||||
items:
|
||||
type: string
|
||||
example: []
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: 创建时间
|
||||
example: "2023-08-14T20:54:16.000Z"
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: 更新时间
|
||||
example: "2023-08-14T20:54:16.000Z"
|
||||
insurance_type:
|
||||
$ref: '#/components/schemas/InsuranceType'
|
||||
reviewer:
|
||||
$ref: '#/components/schemas/User'
|
||||
|
||||
InsuranceType:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: 保险类型ID
|
||||
example: 1
|
||||
name:
|
||||
type: string
|
||||
description: 保险类型名称
|
||||
example: "保险清示产品"
|
||||
description:
|
||||
type: string
|
||||
description: 保险类型描述
|
||||
example: "保险产品描述"
|
||||
|
||||
User:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: 用户ID
|
||||
example: 1
|
||||
real_name:
|
||||
type: string
|
||||
description: 真实姓名
|
||||
example: "李四"
|
||||
username:
|
||||
type: string
|
||||
description: 用户名
|
||||
example: "admin"
|
||||
|
||||
CreateInsuranceApplicationRequest:
|
||||
type: object
|
||||
required:
|
||||
- customer_name
|
||||
- customer_id_card
|
||||
- customer_phone
|
||||
- customer_address
|
||||
- insurance_type_id
|
||||
properties:
|
||||
customer_name:
|
||||
type: string
|
||||
description: 投保人姓名
|
||||
example: "张三"
|
||||
minLength: 2
|
||||
maxLength: 100
|
||||
customer_id_card:
|
||||
type: string
|
||||
description: 身份证号
|
||||
example: "420106199001010091"
|
||||
pattern: '^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[0-9Xx]$'
|
||||
customer_phone:
|
||||
type: string
|
||||
description: 电话号码
|
||||
example: "18612345678"
|
||||
pattern: '^1[3-9]\d{9}$'
|
||||
customer_address:
|
||||
type: string
|
||||
description: 参保地址
|
||||
example: "北京市北京市北京市测试区"
|
||||
minLength: 5
|
||||
maxLength: 255
|
||||
insurance_type_id:
|
||||
type: integer
|
||||
description: 保险类型ID
|
||||
example: 1
|
||||
insurance_category:
|
||||
type: string
|
||||
description: 参保类型
|
||||
example: "牛"
|
||||
maxLength: 50
|
||||
application_quantity:
|
||||
type: integer
|
||||
description: 申请数量
|
||||
example: 50
|
||||
minimum: 1
|
||||
application_amount:
|
||||
type: number
|
||||
format: decimal
|
||||
description: 申请金额
|
||||
example: 10000.00
|
||||
minimum: 0
|
||||
remarks:
|
||||
type: string
|
||||
description: 备注
|
||||
example: "特殊说明"
|
||||
|
||||
UpdateInsuranceApplicationRequest:
|
||||
type: object
|
||||
properties:
|
||||
customer_name:
|
||||
type: string
|
||||
description: 投保人姓名
|
||||
example: "张三"
|
||||
minLength: 2
|
||||
maxLength: 100
|
||||
customer_id_card:
|
||||
type: string
|
||||
description: 身份证号
|
||||
example: "420106199001010091"
|
||||
pattern: '^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[0-9Xx]$'
|
||||
customer_phone:
|
||||
type: string
|
||||
description: 电话号码
|
||||
example: "18612345678"
|
||||
pattern: '^1[3-9]\d{9}$'
|
||||
customer_address:
|
||||
type: string
|
||||
description: 参保地址
|
||||
example: "北京市北京市北京市测试区"
|
||||
minLength: 5
|
||||
maxLength: 255
|
||||
insurance_type_id:
|
||||
type: integer
|
||||
description: 保险类型ID
|
||||
example: 1
|
||||
insurance_category:
|
||||
type: string
|
||||
description: 参保类型
|
||||
example: "牛"
|
||||
maxLength: 50
|
||||
application_quantity:
|
||||
type: integer
|
||||
description: 申请数量
|
||||
example: 50
|
||||
minimum: 1
|
||||
application_amount:
|
||||
type: number
|
||||
format: decimal
|
||||
description: 申请金额
|
||||
example: 10000.00
|
||||
minimum: 0
|
||||
remarks:
|
||||
type: string
|
||||
description: 备注
|
||||
example: "特殊说明"
|
||||
|
||||
ReviewApplicationRequest:
|
||||
type: object
|
||||
required:
|
||||
- status
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum: [initial_approved, under_review, approved, rejected, paid]
|
||||
description: 审核后的状态
|
||||
example: "initial_approved"
|
||||
review_notes:
|
||||
type: string
|
||||
description: 审核备注
|
||||
example: "审核通过"
|
||||
|
||||
Pagination:
|
||||
type: object
|
||||
properties:
|
||||
page:
|
||||
type: integer
|
||||
description: 当前页码
|
||||
example: 1
|
||||
limit:
|
||||
type: integer
|
||||
description: 每页数量
|
||||
example: 10
|
||||
total:
|
||||
type: integer
|
||||
description: 总记录数
|
||||
example: 100
|
||||
totalPages:
|
||||
type: integer
|
||||
description: 总页数
|
||||
example: 10
|
||||
|
||||
responses:
|
||||
BadRequest:
|
||||
description: 请求参数错误
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: false
|
||||
message:
|
||||
type: string
|
||||
example: "请求参数错误"
|
||||
|
||||
Unauthorized:
|
||||
description: 未授权
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: false
|
||||
message:
|
||||
type: string
|
||||
example: "未授权访问"
|
||||
|
||||
Forbidden:
|
||||
description: 权限不足
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: false
|
||||
message:
|
||||
type: string
|
||||
example: "权限不足"
|
||||
|
||||
NotFound:
|
||||
description: 资源不存在
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: false
|
||||
message:
|
||||
type: string
|
||||
example: "资源不存在"
|
||||
|
||||
InternalServerError:
|
||||
description: 服务器内部错误
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: false
|
||||
message:
|
||||
type: string
|
||||
example: "服务器内部错误"
|
||||
869
insurance_backend/docs/swagger/regulatory-task-completion.yaml
Normal file
869
insurance_backend/docs/swagger/regulatory-task-completion.yaml
Normal file
@@ -0,0 +1,869 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: 监管任务结项API
|
||||
description: |
|
||||
保险端监管任务结项管理系统API接口文档
|
||||
|
||||
## 功能概述
|
||||
- 监管任务结项记录的增删改查
|
||||
- 任务审核流程管理
|
||||
- 附件上传和管理
|
||||
- 操作日志记录
|
||||
- 统计数据查询
|
||||
|
||||
## 认证方式
|
||||
使用JWT Bearer Token进行身份认证
|
||||
|
||||
## 响应格式
|
||||
所有API响应都遵循统一的格式:
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"message": "success",
|
||||
"data": {},
|
||||
"timestamp": "2025-01-19T10:00:00Z"
|
||||
}
|
||||
```
|
||||
version: 1.0.0
|
||||
contact:
|
||||
name: 开发团队
|
||||
email: dev@example.com
|
||||
license:
|
||||
name: MIT
|
||||
url: https://opensource.org/licenses/MIT
|
||||
|
||||
servers:
|
||||
- url: http://localhost:3000/api
|
||||
description: 开发环境
|
||||
- url: https://api.example.com/api
|
||||
description: 生产环境
|
||||
|
||||
security:
|
||||
- bearerAuth: []
|
||||
|
||||
paths:
|
||||
/regulatory-task-completion:
|
||||
get:
|
||||
tags:
|
||||
- 监管任务结项
|
||||
summary: 获取监管任务结项列表
|
||||
description: 分页查询监管任务结项记录,支持多条件筛选
|
||||
parameters:
|
||||
- name: application_no
|
||||
in: query
|
||||
description: 申请编号(模糊查询)
|
||||
schema:
|
||||
type: string
|
||||
example: "APP20250119"
|
||||
- name: policy_no
|
||||
in: query
|
||||
description: 保单号(模糊查询)
|
||||
schema:
|
||||
type: string
|
||||
example: "POL20250119"
|
||||
- name: product_name
|
||||
in: query
|
||||
description: 产品名称(模糊查询)
|
||||
schema:
|
||||
type: string
|
||||
example: "养殖保险"
|
||||
- name: customer_name
|
||||
in: query
|
||||
description: 客户名称(模糊查询)
|
||||
schema:
|
||||
type: string
|
||||
example: "张三"
|
||||
- name: completion_date
|
||||
in: query
|
||||
description: 结项日期
|
||||
schema:
|
||||
type: string
|
||||
format: date
|
||||
example: "2025-01-19"
|
||||
- name: status
|
||||
in: query
|
||||
description: 状态筛选
|
||||
schema:
|
||||
type: string
|
||||
enum: [pending, approved, rejected, completed]
|
||||
example: "pending"
|
||||
- name: reviewer_name
|
||||
in: query
|
||||
description: 审核人员(模糊查询)
|
||||
schema:
|
||||
type: string
|
||||
example: "审核员"
|
||||
- name: page
|
||||
in: query
|
||||
description: 页码
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
default: 1
|
||||
example: 1
|
||||
- name: limit
|
||||
in: query
|
||||
description: 每页数量
|
||||
schema:
|
||||
type: integer
|
||||
minimum: 1
|
||||
maximum: 100
|
||||
default: 10
|
||||
example: 10
|
||||
responses:
|
||||
'200':
|
||||
description: 查询成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
example: 200
|
||||
message:
|
||||
type: string
|
||||
example: "success"
|
||||
data:
|
||||
type: object
|
||||
properties:
|
||||
list:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/RegulatoryTaskCompletion'
|
||||
pagination:
|
||||
$ref: '#/components/schemas/Pagination'
|
||||
timestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2025-01-19T10:00:00Z"
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
post:
|
||||
tags:
|
||||
- 监管任务结项
|
||||
summary: 创建监管任务结项记录
|
||||
description: 创建新的监管任务结项记录
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CreateRegulatoryTaskCompletionRequest'
|
||||
responses:
|
||||
'201':
|
||||
description: 创建成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
example: 201
|
||||
message:
|
||||
type: string
|
||||
example: "success"
|
||||
data:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
example: 1
|
||||
message:
|
||||
type: string
|
||||
example: "监管任务结项记录创建成功"
|
||||
timestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2025-01-19T10:00:00Z"
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
/regulatory-task-completion/{id}:
|
||||
get:
|
||||
tags:
|
||||
- 监管任务结项
|
||||
summary: 获取监管任务结项详情
|
||||
description: 根据ID获取监管任务结项记录详情,包含附件和操作日志
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: 记录ID
|
||||
schema:
|
||||
type: integer
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: 查询成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
example: 200
|
||||
message:
|
||||
type: string
|
||||
example: "success"
|
||||
data:
|
||||
$ref: '#/components/schemas/RegulatoryTaskCompletionDetail'
|
||||
timestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2025-01-19T10:00:00Z"
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
put:
|
||||
tags:
|
||||
- 监管任务结项
|
||||
summary: 更新监管任务结项记录
|
||||
description: 更新指定ID的监管任务结项记录
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: 记录ID
|
||||
schema:
|
||||
type: integer
|
||||
example: 1
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UpdateRegulatoryTaskCompletionRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: 更新成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
example: 200
|
||||
message:
|
||||
type: string
|
||||
example: "success"
|
||||
data:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
example: "监管任务结项记录更新成功"
|
||||
timestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2025-01-19T10:00:00Z"
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
delete:
|
||||
tags:
|
||||
- 监管任务结项
|
||||
summary: 删除监管任务结项记录
|
||||
description: 删除指定ID的监管任务结项记录及相关数据
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: 记录ID
|
||||
schema:
|
||||
type: integer
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: 删除成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
example: 200
|
||||
message:
|
||||
type: string
|
||||
example: "success"
|
||||
data:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
example: "监管任务结项记录删除成功"
|
||||
timestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2025-01-19T10:00:00Z"
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
/regulatory-task-completion/{id}/review:
|
||||
patch:
|
||||
tags:
|
||||
- 监管任务结项
|
||||
summary: 审核监管任务结项记录
|
||||
description: 对指定ID的监管任务结项记录进行审核
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: 记录ID
|
||||
schema:
|
||||
type: integer
|
||||
example: 1
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ReviewRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: 审核成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
example: 200
|
||||
message:
|
||||
type: string
|
||||
example: "success"
|
||||
data:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
example: "监管任务结项记录审核成功"
|
||||
timestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2025-01-19T10:00:00Z"
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
/regulatory-task-completion/stats:
|
||||
get:
|
||||
tags:
|
||||
- 监管任务结项
|
||||
summary: 获取监管任务结项统计数据
|
||||
description: 获取监管任务结项的统计分析数据
|
||||
responses:
|
||||
'200':
|
||||
description: 查询成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
example: 200
|
||||
message:
|
||||
type: string
|
||||
example: "success"
|
||||
data:
|
||||
$ref: '#/components/schemas/StatisticsData'
|
||||
timestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
example: "2025-01-19T10:00:00Z"
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalServerError'
|
||||
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
bearerFormat: JWT
|
||||
|
||||
schemas:
|
||||
RegulatoryTaskCompletion:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: 记录ID
|
||||
example: 1
|
||||
application_no:
|
||||
type: string
|
||||
description: 申请编号
|
||||
example: "APP20250119001"
|
||||
policy_no:
|
||||
type: string
|
||||
description: 保单号
|
||||
example: "POL20250119001"
|
||||
product_name:
|
||||
type: string
|
||||
description: 产品名称
|
||||
example: "养殖保险"
|
||||
customer_name:
|
||||
type: string
|
||||
description: 客户名称
|
||||
example: "张三"
|
||||
customer_phone:
|
||||
type: string
|
||||
description: 客户电话
|
||||
example: "13800138000"
|
||||
insurance_amount:
|
||||
type: number
|
||||
format: decimal
|
||||
description: 保险金额
|
||||
example: 100000.00
|
||||
premium_amount:
|
||||
type: number
|
||||
format: decimal
|
||||
description: 保费金额
|
||||
example: 5000.00
|
||||
start_date:
|
||||
type: string
|
||||
format: date
|
||||
description: 保险起期
|
||||
example: "2025-01-01"
|
||||
end_date:
|
||||
type: string
|
||||
format: date
|
||||
description: 保险止期
|
||||
example: "2025-12-31"
|
||||
completion_date:
|
||||
type: string
|
||||
format: date
|
||||
description: 结项日期
|
||||
example: "2025-01-19"
|
||||
status:
|
||||
type: string
|
||||
enum: [pending, approved, rejected, completed]
|
||||
description: 状态
|
||||
example: "pending"
|
||||
reviewer_name:
|
||||
type: string
|
||||
description: 审核人员
|
||||
example: "审核员张三"
|
||||
review_comments:
|
||||
type: string
|
||||
description: 审核意见
|
||||
example: "审核通过"
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: 创建时间
|
||||
example: "2025-01-19T10:00:00Z"
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: 更新时间
|
||||
example: "2025-01-19T10:00:00Z"
|
||||
|
||||
RegulatoryTaskCompletionDetail:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/RegulatoryTaskCompletion'
|
||||
- type: object
|
||||
properties:
|
||||
attachments:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Attachment'
|
||||
operation_logs:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/OperationLog'
|
||||
|
||||
Attachment:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: 附件ID
|
||||
example: 1
|
||||
file_name:
|
||||
type: string
|
||||
description: 文件名
|
||||
example: "保单文件.pdf"
|
||||
file_path:
|
||||
type: string
|
||||
description: 文件路径
|
||||
example: "/uploads/documents/policy_001.pdf"
|
||||
file_size:
|
||||
type: integer
|
||||
description: 文件大小(字节)
|
||||
example: 1024000
|
||||
file_type:
|
||||
type: string
|
||||
description: 文件类型
|
||||
example: "application/pdf"
|
||||
upload_time:
|
||||
type: string
|
||||
format: date-time
|
||||
description: 上传时间
|
||||
example: "2025-01-19T10:00:00Z"
|
||||
|
||||
OperationLog:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: 日志ID
|
||||
example: 1
|
||||
operation_type:
|
||||
type: string
|
||||
description: 操作类型
|
||||
example: "create"
|
||||
operation_description:
|
||||
type: string
|
||||
description: 操作描述
|
||||
example: "创建监管任务结项记录"
|
||||
operator_name:
|
||||
type: string
|
||||
description: 操作人员
|
||||
example: "系统管理员"
|
||||
operation_time:
|
||||
type: string
|
||||
format: date-time
|
||||
description: 操作时间
|
||||
example: "2025-01-19T10:00:00Z"
|
||||
ip_address:
|
||||
type: string
|
||||
description: IP地址
|
||||
example: "192.168.1.100"
|
||||
|
||||
CreateRegulatoryTaskCompletionRequest:
|
||||
type: object
|
||||
required:
|
||||
- application_no
|
||||
- policy_no
|
||||
- product_name
|
||||
- customer_name
|
||||
properties:
|
||||
application_no:
|
||||
type: string
|
||||
description: 申请编号
|
||||
example: "APP20250119002"
|
||||
policy_no:
|
||||
type: string
|
||||
description: 保单号
|
||||
example: "POL20250119002"
|
||||
product_name:
|
||||
type: string
|
||||
description: 产品名称
|
||||
example: "养殖保险"
|
||||
customer_name:
|
||||
type: string
|
||||
description: 客户名称
|
||||
example: "李四"
|
||||
customer_phone:
|
||||
type: string
|
||||
description: 客户电话
|
||||
example: "13800138001"
|
||||
insurance_amount:
|
||||
type: number
|
||||
format: decimal
|
||||
description: 保险金额
|
||||
example: 150000.00
|
||||
premium_amount:
|
||||
type: number
|
||||
format: decimal
|
||||
description: 保费金额
|
||||
example: 7500.00
|
||||
start_date:
|
||||
type: string
|
||||
format: date
|
||||
description: 保险起期
|
||||
example: "2025-01-01"
|
||||
end_date:
|
||||
type: string
|
||||
format: date
|
||||
description: 保险止期
|
||||
example: "2025-12-31"
|
||||
completion_date:
|
||||
type: string
|
||||
format: date
|
||||
description: 结项日期
|
||||
example: "2025-01-19"
|
||||
status:
|
||||
type: string
|
||||
enum: [pending, approved, rejected, completed]
|
||||
description: 状态
|
||||
default: "pending"
|
||||
example: "pending"
|
||||
review_comments:
|
||||
type: string
|
||||
description: 审核意见
|
||||
example: "待审核"
|
||||
attachments:
|
||||
type: array
|
||||
description: 附件列表
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
file_name:
|
||||
type: string
|
||||
example: "保单文件.pdf"
|
||||
file_path:
|
||||
type: string
|
||||
example: "/uploads/documents/policy_002.pdf"
|
||||
file_size:
|
||||
type: integer
|
||||
example: 1024000
|
||||
file_type:
|
||||
type: string
|
||||
example: "application/pdf"
|
||||
|
||||
UpdateRegulatoryTaskCompletionRequest:
|
||||
type: object
|
||||
properties:
|
||||
application_no:
|
||||
type: string
|
||||
description: 申请编号
|
||||
example: "APP20250119002"
|
||||
policy_no:
|
||||
type: string
|
||||
description: 保单号
|
||||
example: "POL20250119002"
|
||||
product_name:
|
||||
type: string
|
||||
description: 产品名称
|
||||
example: "养殖保险(更新)"
|
||||
customer_name:
|
||||
type: string
|
||||
description: 客户名称
|
||||
example: "李四"
|
||||
customer_phone:
|
||||
type: string
|
||||
description: 客户电话
|
||||
example: "13800138001"
|
||||
insurance_amount:
|
||||
type: number
|
||||
format: decimal
|
||||
description: 保险金额
|
||||
example: 160000.00
|
||||
premium_amount:
|
||||
type: number
|
||||
format: decimal
|
||||
description: 保费金额
|
||||
example: 8000.00
|
||||
start_date:
|
||||
type: string
|
||||
format: date
|
||||
description: 保险起期
|
||||
example: "2025-01-01"
|
||||
end_date:
|
||||
type: string
|
||||
format: date
|
||||
description: 保险止期
|
||||
example: "2025-12-31"
|
||||
completion_date:
|
||||
type: string
|
||||
format: date
|
||||
description: 结项日期
|
||||
example: "2025-01-19"
|
||||
status:
|
||||
type: string
|
||||
enum: [pending, approved, rejected, completed]
|
||||
description: 状态
|
||||
example: "pending"
|
||||
review_comments:
|
||||
type: string
|
||||
description: 审核意见
|
||||
example: "信息已更新"
|
||||
|
||||
ReviewRequest:
|
||||
type: object
|
||||
required:
|
||||
- status
|
||||
- reviewer_name
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum: [approved, rejected]
|
||||
description: 审核状态
|
||||
example: "approved"
|
||||
review_comments:
|
||||
type: string
|
||||
description: 审核意见
|
||||
example: "审核通过,符合监管要求"
|
||||
reviewer_name:
|
||||
type: string
|
||||
description: 审核人员
|
||||
example: "审核员张三"
|
||||
|
||||
StatisticsData:
|
||||
type: object
|
||||
properties:
|
||||
statusStats:
|
||||
type: array
|
||||
description: 状态统计
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
example: "pending"
|
||||
count:
|
||||
type: integer
|
||||
example: 5
|
||||
monthlyStats:
|
||||
type: array
|
||||
description: 月度统计
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
month:
|
||||
type: string
|
||||
example: "2025-01"
|
||||
count:
|
||||
type: integer
|
||||
example: 10
|
||||
total_amount:
|
||||
type: number
|
||||
format: decimal
|
||||
example: 1000000.00
|
||||
productStats:
|
||||
type: array
|
||||
description: 产品统计
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
product_name:
|
||||
type: string
|
||||
example: "养殖保险"
|
||||
count:
|
||||
type: integer
|
||||
example: 20
|
||||
total_amount:
|
||||
type: number
|
||||
format: decimal
|
||||
example: 2000000.00
|
||||
|
||||
Pagination:
|
||||
type: object
|
||||
properties:
|
||||
current:
|
||||
type: integer
|
||||
description: 当前页码
|
||||
example: 1
|
||||
pageSize:
|
||||
type: integer
|
||||
description: 每页数量
|
||||
example: 10
|
||||
total:
|
||||
type: integer
|
||||
description: 总记录数
|
||||
example: 100
|
||||
totalPages:
|
||||
type: integer
|
||||
description: 总页数
|
||||
example: 10
|
||||
|
||||
ErrorResponse:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
description: 错误码
|
||||
message:
|
||||
type: string
|
||||
description: 错误信息
|
||||
timestamp:
|
||||
type: string
|
||||
format: date-time
|
||||
description: 时间戳
|
||||
|
||||
responses:
|
||||
BadRequest:
|
||||
description: 请求参数错误
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
code: 400
|
||||
message: "申请编号、保单号、产品名称、客户名称为必填项"
|
||||
timestamp: "2025-01-19T10:00:00Z"
|
||||
|
||||
Unauthorized:
|
||||
description: 未授权访问
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
code: 401
|
||||
message: "未授权访问"
|
||||
timestamp: "2025-01-19T10:00:00Z"
|
||||
|
||||
Forbidden:
|
||||
description: 权限不足
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
code: 403
|
||||
message: "权限不足"
|
||||
timestamp: "2025-01-19T10:00:00Z"
|
||||
|
||||
NotFound:
|
||||
description: 资源不存在
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
code: 404
|
||||
message: "监管任务结项记录不存在"
|
||||
timestamp: "2025-01-19T10:00:00Z"
|
||||
|
||||
InternalServerError:
|
||||
description: 服务器内部错误
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
example:
|
||||
code: 500
|
||||
message: "服务器内部错误"
|
||||
timestamp: "2025-01-19T10:00:00Z"
|
||||
|
||||
tags:
|
||||
- name: 监管任务结项
|
||||
description: 监管任务结项管理相关接口
|
||||
Reference in New Issue
Block a user