- 新增 currencyRate 模块,支持按货币和日期查询汇率信息 - 定义汇率响应结构,包含中间价、现钞卖出价、买入价等字段 - 在 ERP 服务结构体中注册 CurrencyRate 客户端 - 新增收汇水单批量生成接口 Gen,支持按交易明细ID批量生成 - 定义 ArgsReceiptGen 参数结构,包含员工ID和交易明细ID列表
73 lines
2.7 KiB
Go
73 lines
2.7 KiB
Go
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"`
|
|
ReceiptId int64 `json:"receiptId"` // 生成的收汇水单id 0=未生成
|
|
}
|
|
|
|
// 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
|
|
}
|