From 1028da7a3639aecc5301b18f4ad10f431fbb7161 Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 17 Jul 2023 10:39:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/data/count.go | 37 +++++++++++++++++++++++++++++++++++++ supply/data/data.go | 1 + 2 files changed, 38 insertions(+) create mode 100644 supply/data/count.go diff --git a/supply/data/count.go b/supply/data/count.go new file mode 100644 index 0000000..be7b9d8 --- /dev/null +++ b/supply/data/count.go @@ -0,0 +1,37 @@ +package data + +import ( + "context" + "git.oa00.com/supply-chain/service/client" + "github.com/shopspring/decimal" +) + +type count struct { +} + +type ArgsCountSource struct { + StartAt string + EndAt string +} + +type ReplySourceItem struct { + SourceName string `json:"sourceName"` // 供应渠道 + ProduceTotalPrice decimal.Decimal `json:"produceTotalPrice"` // 采购总金额 + ProduceFreightFee decimal.Decimal `json:"ProduceFreightFee"` // 采购应付运费 + ProducePrice decimal.Decimal `json:"producePrice"` // 采购合计金额 + SaleTotalPrice decimal.Decimal `json:"saleTotalPrice"` // 销售总金额 + SaleFreightFee decimal.Decimal `json:"saleFreightFee"` // 销售应收运费 + SalePrice decimal.Decimal `json:"salePrice"` // 销售合计金额 + PlatformRefund decimal.Decimal `json:"platformRefund"` // 平台退款金额 + SupplierRefund decimal.Decimal `json:"supplierRefund"` // 供应商退款金额 +} + +// Source @Title 供应商对账表 +func (c *count) Source(ctx context.Context, args ArgsCountSource) (reply []ReplySourceItem, err error) { + xClient, err := client.GetClient(c) + if err != nil { + return + } + err = xClient.Call(ctx, "Source", args, &reply) + return +} diff --git a/supply/data/data.go b/supply/data/data.go index 2d811bc..5daa11d 100644 --- a/supply/data/data.go +++ b/supply/data/data.go @@ -3,4 +3,5 @@ package data type Data struct { Order order Afs afs + Count count }