feat(transfer): 添加打款单列表查询功能
- 引入 ArgsTransferList 和 ReplyTransferList 结构体定义 - 定义 TransferSearch 搜索条件结构体 - 扩展 TransferItem 结构体包含完整的打款单信息字段 - 实现 List 方法用于调用客户端获取打款单列表 - 添加时间戳和金额等数据类型支持 - 集成分页和搜索功能到打款单查询接口
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user