From 6210802493193e2e645baf1079e5f506ca4b0e00 Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 23 Sep 2024 16:04:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp/shipment.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/erp/shipment.go b/erp/shipment.go index 493a1ae..2d9b312 100644 --- a/erp/shipment.go +++ b/erp/shipment.go @@ -271,3 +271,34 @@ func (s *shipment) Edit(ctx context.Context, args ArgsShipmentEdit) (err error) err = xClient.Call(ctx, "Edit", args, &reply) return } + +type ReplyCustoms struct { + CostAmount decimal.Decimal `json:"costAmount"` + CustomsCostAmount decimal.Decimal `json:"customsCostAmount"` + SaleTotalAmount decimal.Decimal `json:"saleTotalAmount"` + Products []CustomsProductItem `json:"products"` +} + +type CustomsProductItem struct { + Index int `json:"index"` + Serial string `json:"serial"` + CustomsName string `json:"customsName"` + ShipmentCount int64 `json:"shipmentCount"` + SalePrice decimal.Decimal `json:"salePrice"` + SaleAmount decimal.Decimal `json:"saleAmount"` + CustomsPrice decimal.Decimal `json:"customsPrice"` + CustomsAmount decimal.Decimal `json:"customsAmount"` + AdjustAmount decimal.Decimal `json:"adjustAmount"` + RealCustomsPrice decimal.Decimal `json:"realCustomsPrice"` + RealCustomsAmount decimal.Decimal `json:"realCustomsAmount"` +} + +// Customs @TITLE 报关信息 +func (s *shipment) Customs(ctx context.Context, shipmentId int64) (reply ReplyCustoms, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(ctx, "Customs", shipmentId, &reply) + return +}