From 6ed889105a148b5ac507c129b11274b48465d720 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 4 Feb 2026 09:50:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(erp):=20=E6=B7=BB=E5=8A=A0=E6=94=B6?= =?UTF-8?q?=E4=BB=98=E6=AC=BE=E5=8D=95=E6=8D=AE=E7=BB=9F=E8=AE=A1=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在ReplyReceiptList中增加Count字段返回收据统计数据 - 新增ReceiptCount结构体包含EntryAmount、ReceivableFxAmount和ClaimAmount字段 - 在ReplyRequestList中增加Count字段返回请求统计数据 - 新增RequestCount结构体包含PrepaidAmount、Amount和PaidAmount字段 - 为收付款列表接口提供金额汇总统计支持 --- erp/receipt.go | 7 +++++++ erp/request.go | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/erp/receipt.go b/erp/receipt.go index 12d4dff..72eafff 100644 --- a/erp/receipt.go +++ b/erp/receipt.go @@ -39,6 +39,7 @@ type ReceiptSearch struct { type ReplyReceiptList struct { List []ReceiptItem `json:"list"` Total int64 `json:"total"` + Count ReceiptCount `json:"count"` } type ReceiptItem struct { Id int64 `json:"id"` @@ -68,6 +69,12 @@ type ReceiptItem struct { 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 列表 func (r *receipt) List(ctx context.Context, args ArgsReceiptList) (reply ReplyReceiptList, err error) { xClient, err := client.GetClient(r) diff --git a/erp/request.go b/erp/request.go index 6c74657..30a9f8c 100644 --- a/erp/request.go +++ b/erp/request.go @@ -41,6 +41,7 @@ type RequestSearch struct { type ReplyRequestList struct { List []RequestItem `json:"list"` Total int64 `json:"total"` + Count RequestCount `json:"count"` } type RequestItem struct { Id int64 `json:"id"` @@ -75,6 +76,11 @@ type RequestItem struct { CreatedAt *time.Time `json:"createdAt"` 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 列表 func (r *request) List(ctx context.Context, args ArgsRequestList) (reply ReplyRequestList, err error) {