feat(erp): 添加收付款单据统计功能

- 在ReplyReceiptList中增加Count字段返回收据统计数据
- 新增ReceiptCount结构体包含EntryAmount、ReceivableFxAmount和ClaimAmount字段
- 在ReplyRequestList中增加Count字段返回请求统计数据
- 新增RequestCount结构体包含PrepaidAmount、Amount和PaidAmount字段
- 为收付款列表接口提供金额汇总统计支持
This commit is contained in:
2026-02-04 09:50:04 +08:00
parent 134fadf47c
commit 6ed889105a
2 changed files with 13 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ type ReceiptSearch struct {
type ReplyReceiptList struct { type ReplyReceiptList struct {
List []ReceiptItem `json:"list"` List []ReceiptItem `json:"list"`
Total int64 `json:"total"` Total int64 `json:"total"`
Count ReceiptCount `json:"count"`
} }
type ReceiptItem struct { type ReceiptItem struct {
Id int64 `json:"id"` Id int64 `json:"id"`
@@ -68,6 +69,12 @@ type ReceiptItem struct {
UpdatedAt *time.Time `json:"updatedAt"` UpdatedAt *time.Time `json:"updatedAt"`
} }
type ReceiptCount struct {
EntryAmount decimal.Decimal `json:"entryAmount"`
ReceivableFxAmount decimal.Decimal `json:"receivableFxAmount"`
ClaimAmount decimal.Decimal `json:"claimAmount"`
}
// List @TITLE 列表 // List @TITLE 列表
func (r *receipt) List(ctx context.Context, args ArgsReceiptList) (reply ReplyReceiptList, err error) { func (r *receipt) List(ctx context.Context, args ArgsReceiptList) (reply ReplyReceiptList, err error) {
xClient, err := client.GetClient(r) xClient, err := client.GetClient(r)

View File

@@ -41,6 +41,7 @@ type RequestSearch struct {
type ReplyRequestList struct { type ReplyRequestList struct {
List []RequestItem `json:"list"` List []RequestItem `json:"list"`
Total int64 `json:"total"` Total int64 `json:"total"`
Count RequestCount `json:"count"`
} }
type RequestItem struct { type RequestItem struct {
Id int64 `json:"id"` Id int64 `json:"id"`
@@ -75,6 +76,11 @@ type RequestItem struct {
CreatedAt *time.Time `json:"createdAt"` CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"` UpdatedAt *time.Time `json:"updatedAt"`
} }
type RequestCount struct {
PrepaidAmount decimal.Decimal `json:"prepaidAmount"`
Amount decimal.Decimal `json:"amount"`
PaidAmount decimal.Decimal `json:"paidAmount"`
}
// List @TITLE 列表 // List @TITLE 列表
func (r *request) List(ctx context.Context, args ArgsRequestList) (reply ReplyRequestList, err error) { func (r *request) List(ctx context.Context, args ArgsRequestList) (reply ReplyRequestList, err error) {