diff --git a/erp/transfer.go b/erp/transfer.go index 867705e..4cc7448 100644 --- a/erp/transfer.go +++ b/erp/transfer.go @@ -5,11 +5,13 @@ import ( "time" "git.kumo.work/shama/service/client" + transfer2 "git.kumo.work/shama/service/erp/transfer" "git.kumo.work/shama/service/lib/bean" "github.com/shopspring/decimal" ) type transfer struct { + transfer2.Transfer } type ArgsTransferList struct { diff --git a/erp/transfer/statement.go b/erp/transfer/statement.go new file mode 100644 index 0000000..37875ab --- /dev/null +++ b/erp/transfer/statement.go @@ -0,0 +1,71 @@ +package transfer + +import ( + "context" + "time" + + "git.kumo.work/shama/service/client" + "git.kumo.work/shama/service/lib/bean" + "github.com/shopspring/decimal" +) + +type statement struct { +} + +type ArgsStatementList struct { + Page bean.Page + Search StatementSearch +} +type StatementSearch struct { + Type string // 类型 + VoucherNo string // 凭证号 + TransactionDirection int64 // 收支方向 1=收入 2=支出 + AccountType int64 // 对公对私 1=对公 2=对私 + Bank string // 银行 + BankAccount string // 银行账号 + BankAccountName string // 银行账号名称 + OppBank string // 对方银行 + OppBankAccount string // 对方银行账号 + OppBankAccountName string // 对方银行账号名称 +} +type ReplyStatementList struct { + List []StatementItem `json:"list"` + Total int64 `json:"total"` +} +type StatementItem struct { + Id int64 `json:"Id"` + Type string `json:"Type"` + Name string `json:"Name"` + TransferSerial string `json:"TransferSerial"` + VoucherNo string `json:"VoucherNo"` + TransactionDirection int64 `json:"TransactionDirection"` + Bank string `json:"Bank"` + BankAccount string `json:"BankAccount"` + BankAccountName string `json:"BankAccountName"` + OppBank string `json:"OppBank"` + OppBankAccount string `json:"OppBankAccount"` + OppBankAccountName string `json:"OppBankAccountName"` + Amount decimal.Decimal `json:"Amount"` + Currency string `json:"Currency"` + CurrencyName string `json:"CurrencyName"` + CurrencySymbol string `json:"CurrencySymbol"` + SrcCurrency string `json:"SrcCurrency"` + AccountType int64 `json:"AccountType"` + Purpose string `json:"Purpose"` + TransactionAt time.Time `json:"TransactionAt"` + RecAt time.Time `json:"RecAt"` + Remark string `json:"Remark"` + FeeInfo string `json:"FeeInfo"` + CreatedAt *time.Time `json:"CreatedAt"` + UpdatedAt *time.Time `json:"UpdatedAt"` +} + +// List @TITLE 列表 +func (s *statement) List(ctx context.Context, args ArgsStatementList) (reply ReplyStatementList, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(ctx, "List", args, &reply) + return +} diff --git a/erp/transfer/transfer.go b/erp/transfer/transfer.go new file mode 100644 index 0000000..6bd026d --- /dev/null +++ b/erp/transfer/transfer.go @@ -0,0 +1,5 @@ +package transfer + +type Transfer struct { + Statement statement +}