From 1b72b89c7dc7c00b5061ea476f1300ed72493ce8 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 8 Jun 2023 16:33:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/data/data.go | 5 ++++ supply/data/order.go | 62 ++++++++++++++++++++++++++++++++++++++++++++ supply/supply.go | 2 ++ 3 files changed, 69 insertions(+) create mode 100644 supply/data/data.go create mode 100644 supply/data/order.go diff --git a/supply/data/data.go b/supply/data/data.go new file mode 100644 index 0000000..7f92dcb --- /dev/null +++ b/supply/data/data.go @@ -0,0 +1,5 @@ +package data + +type Data struct { + Order order +} diff --git a/supply/data/order.go b/supply/data/order.go new file mode 100644 index 0000000..2d56d76 --- /dev/null +++ b/supply/data/order.go @@ -0,0 +1,62 @@ +package data + +import ( + "context" + "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" + "github.com/shopspring/decimal" +) + +type order struct { +} + +type ArgsPayOrderLists struct { + StartLadingBillAt string + EndLadingBillAt string + bean.Page +} + +type ReplyPayOrderLists struct { + Lists []OrderItem `json:"lists"` + Total int64 `json:"total"` +} + +type OrderItem struct { + SourceName string `json:"sourceName"` // 供应渠道 + SourceSonName string `json:"sourceSonName"` // 供应商 + CustomerName string `json:"customerName"` // 客户名 + OrderSn string `json:"orderSn"` // 原始订单号 + OrderSubSn string `json:"orderSubSn"` // 订单号 + SupplierOrderSn string `json:"supplierOrderSn"` // 供应商订单号 + OrderStatus uint `json:"orderStatus"` // 订单状态 + LadingBillAt int64 `json:"ladingBillAt"` // 支付时间 + StockOutAt int64 `json:"stockOutAt"` // 发货时间 + FinishAt int64 `json:"finishAt"` // 确认收货时间 + SkuName string `json:"skuName"` // 商品名称 + SkuUpcCode string `json:"skuUpcCode"` // 商品条码 + Specification string `json:"specification"` // 规格 + Quality uint `json:"quality"` // 数量 + ProduceSupplyPrice decimal.Decimal `json:"produceSupplyPrice"` // 采购单价 + ProduceTotalPrice decimal.Decimal `json:"produceTotalPrice"` // 采购总金额 + ProduceFreightFee decimal.Decimal `json:"ProduceFreightFee"` // 采购应付运费 + ProducePrice decimal.Decimal `json:"producePrice"` // 采购合计金额 + SaleSupplyPrice decimal.Decimal `json:"saleSupplyPrice"` // 销售单价 + SaleTotalPrice decimal.Decimal `json:"saleTotalPrice"` // 销售总金额 + SaleFreightFee decimal.Decimal `json:"saleFreightFee"` // 销售应收运费 + SalePrice decimal.Decimal `json:"salePrice"` // 销售合计金额 + Unit string `json:"unit"` // 单位 + Tax string `json:"tax"` // 税率 + ReceiverName string `json:"receiverName"` // 收件人 + ReceiverPhone string `json:"receiverPhone"` // 收件人手机号 + ReceiverAddress string `json:"receiverAddress"` // 收件人地址 +} + +// Lists @Title 品牌列表 +func (o *order) Lists(ctx context.Context, args ArgsPayOrderLists) (result ReplyPayOrderLists, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + err = xClient.Call(ctx, "Lists", args, &result) + return +} diff --git a/supply/supply.go b/supply/supply.go index 66373ad..2c725fa 100644 --- a/supply/supply.go +++ b/supply/supply.go @@ -2,6 +2,7 @@ package supply import ( "git.oa00.com/supply-chain/service/supply/channel" + "git.oa00.com/supply-chain/service/supply/data" "git.oa00.com/supply-chain/service/supply/setting" ) @@ -16,4 +17,5 @@ type Supply struct { Source sourceRpc AfterService afterService SkuTag skuTag + Data data.Data }