9.18王德鹏/1
This commit is contained in:
242
doc/openapi.yaml
242
doc/openapi.yaml
@@ -370,8 +370,8 @@ paths:
|
||||
$ref: '#/components/schemas/Customer'
|
||||
/api/orders:
|
||||
post:
|
||||
summary: 新建单据(❌ Partially Implemented)
|
||||
description: 前端开单页已提交 payload,后端待实现。
|
||||
summary: 新建单据(✅ Fully Implemented)
|
||||
description: 销售/进货出入库与退货:保存即 approved;后端重算金额并联动库存。
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
@@ -391,6 +391,224 @@ paths:
|
||||
format: int64
|
||||
orderNo:
|
||||
type: string
|
||||
/api/orders:
|
||||
get:
|
||||
summary: 单据列表查询(❌ Partially Implemented)
|
||||
description: 支持按时间范围与关键字筛选;参数 biz=sale|purchase,type=out|in|return;返回 {list:[]}。
|
||||
parameters:
|
||||
- in: query
|
||||
name: biz
|
||||
schema: { type: string }
|
||||
- in: query
|
||||
name: type
|
||||
schema: { type: string }
|
||||
- in: query
|
||||
name: kw
|
||||
schema: { type: string }
|
||||
- in: query
|
||||
name: page
|
||||
schema: { type: integer, default: 1 }
|
||||
- in: query
|
||||
name: size
|
||||
schema: { type: integer, default: 20 }
|
||||
- in: query
|
||||
name: startDate
|
||||
schema: { type: string, format: date }
|
||||
- in: query
|
||||
name: endDate
|
||||
schema: { type: string, format: date }
|
||||
/api/payments/{biz}:
|
||||
post:
|
||||
summary: 创建收款/付款(✅ Fully Implemented)
|
||||
description: biz=sale|purchase;根据 payments 写入多条记录,可选挂单并累加订单已付金额。
|
||||
parameters:
|
||||
- in: path
|
||||
name: biz
|
||||
required: true
|
||||
schema: { type: string }
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/PaymentItem'
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
paymentIds:
|
||||
type: array
|
||||
items: { type: integer, format: int64 }
|
||||
description: 支持按时间范围与关键字筛选;返回 {list:[]}。前端已接入,后端待实现。
|
||||
parameters:
|
||||
- in: query
|
||||
name: kw
|
||||
schema: { type: string }
|
||||
- in: query
|
||||
name: page
|
||||
schema: { type: integer, default: 1 }
|
||||
- in: query
|
||||
name: size
|
||||
schema: { type: integer, default: 20 }
|
||||
- in: query
|
||||
name: startDate
|
||||
schema: { type: string, format: date }
|
||||
- in: query
|
||||
name: endDate
|
||||
schema: { type: string, format: date }
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
list:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id: { type: integer, format: int64 }
|
||||
orderNo: { type: string }
|
||||
orderTime: { type: string, format: date-time }
|
||||
amount: { type: number }
|
||||
customerName: { type: string }
|
||||
|
||||
/api/purchase-orders:
|
||||
get:
|
||||
summary: 进货单列表查询(❌ Partially Implemented)
|
||||
parameters:
|
||||
- in: query
|
||||
name: kw
|
||||
schema: { type: string }
|
||||
- in: query
|
||||
name: page
|
||||
schema: { type: integer, default: 1 }
|
||||
- in: query
|
||||
name: size
|
||||
schema: { type: integer, default: 20 }
|
||||
- in: query
|
||||
name: startDate
|
||||
schema: { type: string, format: date }
|
||||
- in: query
|
||||
name: endDate
|
||||
schema: { type: string, format: date }
|
||||
- in: query
|
||||
name: status
|
||||
schema:
|
||||
type: string
|
||||
enum: [draft, approved, void, returned]
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
list:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id: { type: integer, format: int64 }
|
||||
orderNo: { type: string }
|
||||
orderTime: { type: string, format: date-time }
|
||||
amount: { type: number }
|
||||
supplierName: { type: string }
|
||||
|
||||
/api/payments:
|
||||
get:
|
||||
summary: 收付款流水列表(❌ Partially Implemented)
|
||||
parameters:
|
||||
- in: query
|
||||
name: kw
|
||||
schema: { type: string }
|
||||
- in: query
|
||||
name: page
|
||||
schema: { type: integer, default: 1 }
|
||||
- in: query
|
||||
name: size
|
||||
schema: { type: integer, default: 20 }
|
||||
- in: query
|
||||
name: startDate
|
||||
schema: { type: string, format: date }
|
||||
- in: query
|
||||
name: endDate
|
||||
schema: { type: string, format: date }
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
list:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id: { type: integer, format: int64 }
|
||||
bizType: { type: string }
|
||||
direction: { type: string }
|
||||
payTime: { type: string, format: date-time }
|
||||
amount: { type: number }
|
||||
accountName: { type: string }
|
||||
|
||||
/api/inventories/logs:
|
||||
get:
|
||||
summary: 库存/盘点流水列表(❌ Partially Implemented)
|
||||
parameters:
|
||||
- in: query
|
||||
name: kw
|
||||
schema: { type: string }
|
||||
- in: query
|
||||
name: page
|
||||
schema: { type: integer, default: 1 }
|
||||
- in: query
|
||||
name: size
|
||||
schema: { type: integer, default: 20 }
|
||||
- in: query
|
||||
name: startDate
|
||||
schema: { type: string, format: date }
|
||||
- in: query
|
||||
name: endDate
|
||||
schema: { type: string, format: date }
|
||||
- in: query
|
||||
name: productId
|
||||
schema: { type: integer, format: int64 }
|
||||
- in: query
|
||||
name: reason
|
||||
schema: { type: string }
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
list:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id: { type: integer, format: int64 }
|
||||
bizType: { type: string }
|
||||
txTime: { type: string, format: date-time }
|
||||
amount: { type: number }
|
||||
remark: { type: string }
|
||||
productId: { type: integer, format: int64 }
|
||||
qtyDelta: { type: number }
|
||||
amountDelta: { type: number, nullable: true }
|
||||
/api/attachments:
|
||||
post:
|
||||
summary: 上传附件(✅ Fully Implemented,占位图方案)
|
||||
@@ -633,14 +851,18 @@ components:
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: 'sale.out/sale.return/sale.collect/purchase/income/expense 等'
|
||||
description: 'sale.out/sale.return/sale.collect/purchase.in/purchase.return/purchase.pay'
|
||||
orderTime:
|
||||
type: string
|
||||
format: date
|
||||
format: date-time
|
||||
customerId:
|
||||
type: integer
|
||||
format: int64
|
||||
nullable: true
|
||||
supplierId:
|
||||
type: integer
|
||||
format: int64
|
||||
nullable: true
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
@@ -653,6 +875,18 @@ components:
|
||||
type: number
|
||||
unitPrice:
|
||||
type: number
|
||||
discountRate:
|
||||
type: number
|
||||
amount:
|
||||
type: number
|
||||
payments:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/PaymentItem'
|
||||
PaymentItem:
|
||||
type: object
|
||||
properties:
|
||||
method: { type: string, enum: [cash, bank, wechat] }
|
||||
amount: { type: number }
|
||||
orderId: { type: integer, format: int64, nullable: true }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user