diff --git a/erp/erp.go b/erp/erp.go index 66070be..627def8 100644 --- a/erp/erp.go +++ b/erp/erp.go @@ -19,4 +19,5 @@ type Erp struct { Expense expense Request request Dict dict + Ik3cloud ik3cloud } diff --git a/erp/ik3cloud.go b/erp/ik3cloud.go new file mode 100644 index 0000000..f123142 --- /dev/null +++ b/erp/ik3cloud.go @@ -0,0 +1,27 @@ +package erp + +import ( + "context" + "time" + + client2 "git.kumo.work/shama/service/client" + "github.com/shopspring/decimal" +) + +type ik3cloud struct { +} + +type ArgsGetCurrencyRate struct { + Currency string + Date time.Time +} + +// GetCurrencyRate @TITLE 获取汇率 +func (i *ik3cloud) GetCurrencyRate(ctx context.Context, args ArgsGetCurrencyRate) (rate decimal.Decimal, err error) { + xClient, err := client2.GetClient(i) + if err != nil { + return + } + err = xClient.Call(ctx, "GetCurrencyRate", args, &rate) + return +}