From 7dcb21ccc0f089ff5dbbff2816a767cf8c50ca3d Mon Sep 17 00:00:00 2001 From: kanade Date: Sat, 10 Oct 2026 16:42:46 +0800 Subject: [PATCH] =?UTF-8?q?feat(transfer):=20=E6=B7=BB=E5=8A=A0=E6=89=93?= =?UTF-8?q?=E6=AC=BE=E5=8D=95=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 引入 ArgsTransferList 和 ReplyTransferList 结构体定义 - 定义 TransferSearch 搜索条件结构体 - 扩展 TransferItem 结构体包含完整的打款单信息字段 - 实现 List 方法用于调用客户端获取打款单列表 - 添加时间戳和金额等数据类型支持 - 集成分页和搜索功能到打款单查询接口 --- erp/transfer.go | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/erp/transfer.go b/erp/transfer.go index 9d56faf..86c89b5 100644 --- a/erp/transfer.go +++ b/erp/transfer.go @@ -2,14 +2,64 @@ package erp import ( "context" + "time" "git.kumo.work/shama/service/client" + "git.kumo.work/shama/service/lib/bean" + "github.com/shopspring/decimal" ) type transfer struct { } +type ArgsTransferList struct { + Page bean.Page + Search TransferSearch +} +type TransferSearch struct { + TransferSerial string // 打款单号 + VoucherNo string // 凭证号 + TransferType string // 打款类型 + BusinessType string // 业务类型 + CreatedStaffId int64 // 创建人 +} +type ReplyTransferList struct { + List []TransferItem `json:"list"` + Total int64 `json:"total"` +} type TransferItem struct { + Id int64 `json:"id"` + TransferSerial string `json:"transferSerial"` + VoucherNo string `json:"voucherNo"` + TransferType string `json:"transferType"` + BusinessId int64 `json:"businessId"` + BusinessType string `json:"businessType"` + BusinessName string `json:"businessName"` + BankAccount string `json:"bankAccount"` + PaymentAccount string `json:"paymentAccount"` + PaymentAccountName string `json:"paymentAccountName"` + Amount decimal.Decimal `json:"amount"` + Purpose string `json:"purpose"` + Status int64 `json:"status"` + TransferAt *time.Time `json:"transferAt"` + Remark string `json:"remark"` + StaffId int64 `json:"staffId"` + ErrMsg string `json:"errMsg"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` +} + +// List @TITLE 列表 +func (t *transfer) List(ctx context.Context, args ArgsTransferList) (reply ReplyTransferList, err error) { + xClient, err := client.GetClient(t) + if err != nil { + return + } + err = xClient.Call(ctx, "List", args, &reply) + return +} + +type TransferTypeItem struct { Key string `json:"key"` Name string `json:"name"` }