From ba884153d029592ac41d0ab04b17d964c4118e26 Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 1 Jun 2026 11:54:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(erp):=20=E6=B7=BB=E5=8A=A0=E5=BA=94?= =?UTF-8?q?=E4=BB=98=E8=B4=A6=E6=AC=BE=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 - 在 ReplyPayableInfo 结构体中添加 CustomsProducts 字段 - 新增 PayableCustomsProductItem 结构体定义 - 为海关产品项添加工厂名称、报关单号、报关名称等字段 - 包含报关发票单位、实际报关发票单位、发票数量等信息 - 添加金额字段用于海关产品项的金额计算 --- erp/payable.go | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/erp/payable.go b/erp/payable.go index a217b80..cf1dbc2 100644 --- a/erp/payable.go +++ b/erp/payable.go @@ -60,24 +60,25 @@ func (p *payable) List(ctx context.Context, args ArgsPayableList) (reply ReplyPa } type ReplyPayableInfo struct { - Id int64 `json:"id"` - PayableSerial string `json:"payableSerial"` - AccountingSerial string `json:"accountingSerial"` - InvoiceSerial string `json:"invoiceSerial"` - Amount decimal.Decimal `json:"amount"` - Currency string `json:"currency"` - CurrencyName string `json:"currencyName"` - CurrencyRate decimal.Decimal `json:"currencyRate"` - CurrencySymbol string `json:"currencySymbol"` - PurchaseStaffId int64 `json:"purchaseStaffId"` - IsConfirm int64 `json:"isConfirm"` - Ik3cloudStatus int64 `json:"ik3CloudStatus"` - Ik3cloudErrMsg string `json:"ik3CloudErrMsg"` - Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"` - CreatedAt *time.Time `json:"createdAt"` - UpdatedAt *time.Time `json:"updatedAt"` - Products []PayableProductItem `json:"products"` - Costs []PayableCostItem `json:"costs"` + Id int64 `json:"id"` + PayableSerial string `json:"payableSerial"` + AccountingSerial string `json:"accountingSerial"` + InvoiceSerial string `json:"invoiceSerial"` + Amount decimal.Decimal `json:"amount"` + Currency string `json:"currency"` + CurrencyName string `json:"currencyName"` + CurrencyRate decimal.Decimal `json:"currencyRate"` + CurrencySymbol string `json:"currencySymbol"` + PurchaseStaffId int64 `json:"purchaseStaffId"` + IsConfirm int64 `json:"isConfirm"` + Ik3cloudStatus int64 `json:"ik3CloudStatus"` + Ik3cloudErrMsg string `json:"ik3CloudErrMsg"` + Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + Products []PayableProductItem `json:"products"` + Costs []PayableCostItem `json:"costs"` + CustomsProducts []PayableCustomsProductItem `json:"customsProducts"` } type PayableProductItem struct { @@ -96,6 +97,17 @@ type PayableProductItem struct { ExTaxUnitAmount decimal.Decimal `json:"exTaxUnitAmount"` TaxAmount decimal.Decimal `json:"taxAmount"` } +type PayableCustomsProductItem struct { + Id int64 `json:"id"` + FactoryName string `json:"factoryName"` + CustomsSerial string `json:"customsSerial"` + CustomsName string `json:"customsName"` + CustomsInvoiceUnit string `json:"customsInvoiceUnit"` + CustomsUnit string `json:"customsUnit"` + RealCustomsInvoiceUnit string `json:"realCustomsInvoiceUnit"` + InvoiceCount decimal.Decimal `json:"invoiceCount"` + Amount decimal.Decimal `json:"amount"` +} type PayableCostItem struct { Id int64 `json:"id"`