From ea47045eba7796c8052427332fff8ccc56093552 Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 2 Jun 2026 15:07:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(service):=20=E6=B7=BB=E5=8A=A0=E5=BA=94?= =?UTF-8?q?=E6=94=B6=E6=AC=BE=E9=A1=B9=E6=B5=B7=E5=85=B3=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 ReplyReceivableInfo 结构体中新增 CustomsProducts 字段 - 定义 ReceivableCustomsProductItem 结构体用于存储海关产品信息 - 添加海关产品的基本信息如名称、数量、开票单位等字段 - 包含税务相关字段如增值税率、不含税金额、税额等 - 支持退税相关的退税率、退税额、退税差额计算 --- erp/receivable.go | 61 ++++++++++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/erp/receivable.go b/erp/receivable.go index b287d7b..08146fa 100644 --- a/erp/receivable.go +++ b/erp/receivable.go @@ -60,28 +60,29 @@ func (r *receivable) List(ctx context.Context, args ArgsReceivableList) (reply R } type ReplyReceivableInfo struct { - Id int64 `json:"id"` - ReceivableSerial string `json:"receivableSerial"` - CustomName string `json:"customName"` - InvoiceSerial string `json:"invoiceSerial"` - ReceivableAmount decimal.Decimal `json:"receivableAmount"` - ReceivedAmount decimal.Decimal `json:"receivedAmount"` - OutstandingAmount decimal.Decimal `json:"outstandingAmount"` - Currency string `json:"currency"` - CurrencyName string `json:"currencyName"` - CurrencyRate decimal.Decimal `json:"currencyRate"` - CurrencySymbol string `json:"currencySymbol"` - DomesticShippingCost decimal.Decimal `json:"domesticShippingCost"` - ForeignShippingCost decimal.Decimal `json:"foreignShippingCost"` - ForeignCommission decimal.Decimal `json:"foreignCommission"` - Consignee string `json:"consignee"` - CreatedStaffID int64 `json:"createdStaffID"` - Ik3cloudStatus int64 `json:"ik3CloudStatus"` - Ik3cloudErrMsg string `json:"ik3CloudErrMsg"` - Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"` - CreatedAt *time.Time `json:"createdAt"` - UpdatedAt *time.Time `json:"updatedAt"` - Products []ReceivableProductItem `json:"products"` + Id int64 `json:"id"` + ReceivableSerial string `json:"receivableSerial"` + CustomName string `json:"customName"` + InvoiceSerial string `json:"invoiceSerial"` + ReceivableAmount decimal.Decimal `json:"receivableAmount"` + ReceivedAmount decimal.Decimal `json:"receivedAmount"` + OutstandingAmount decimal.Decimal `json:"outstandingAmount"` + Currency string `json:"currency"` + CurrencyName string `json:"currencyName"` + CurrencyRate decimal.Decimal `json:"currencyRate"` + CurrencySymbol string `json:"currencySymbol"` + DomesticShippingCost decimal.Decimal `json:"domesticShippingCost"` + ForeignShippingCost decimal.Decimal `json:"foreignShippingCost"` + ForeignCommission decimal.Decimal `json:"foreignCommission"` + Consignee string `json:"consignee"` + CreatedStaffID int64 `json:"createdStaffID"` + Ik3cloudStatus int64 `json:"ik3CloudStatus"` + Ik3cloudErrMsg string `json:"ik3CloudErrMsg"` + Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + Products []ReceivableProductItem `json:"products"` + CustomsProducts []ReceivableCustomsProductItem `json:"customsProducts"` } type ReceivableProductItem struct { @@ -103,6 +104,22 @@ type ReceivableProductItem struct { MinusTaxAmount decimal.Decimal `json:"minusTaxAmount"` MinusTaxDifference decimal.Decimal `json:"minusTaxDifference"` } +type ReceivableCustomsProductItem struct { + Id int64 `json:"id"` + Name string `json:"name"` // 中文品名 + Count decimal.Decimal `json:"count"` // 数量 + InvoiceUnit string `json:"invoiceUnit"` // 开票单位 + AddTaxRate decimal.Decimal `json:"addTaxRate"` // 增值税率 + UnitPrice decimal.Decimal `json:"unitPrice"` // 含税单价 + ExTaxUnitPrice decimal.Decimal `json:"exTaxUnitPrice"` // 不含税单价 + UnitAmount decimal.Decimal `json:"unitAmount"` // 价税合计 + ExTaxUnitAmount decimal.Decimal `json:"exTaxUnitAmount"` // 不含税金额 + TaxAmount decimal.Decimal `json:"taxAmount"` // 税额 + ExportCost decimal.Decimal `json:"exportCost"` // 外销成本 + MinusTaxRate decimal.Decimal `json:"minusTaxRate"` // 退税率 + MinusTaxAmount decimal.Decimal `json:"minusTaxAmount"` // 退税额 + MinusTaxDifference decimal.Decimal `json:"minusTaxDifference"` // 退税差额 +} // Info @TITLE 详情 func (r *receivable) Info(ctx context.Context, receivableId int64) (reply ReplyReceivableInfo, err error) {