feat(service): 添加应收款项海关产品信息字段

- 在 ReplyReceivableInfo 结构体中新增 CustomsProducts 字段
- 定义 ReceivableCustomsProductItem 结构体用于存储海关产品信息
- 添加海关产品的基本信息如名称、数量、开票单位等字段
- 包含税务相关字段如增值税率、不含税金额、税额等
- 支持退税相关的退税率、退税额、退税差额计算
This commit is contained in:
2026-06-02 15:07:48 +08:00
parent a48f5754d6
commit ea47045eba

View File

@@ -82,6 +82,7 @@ type ReplyReceivableInfo struct {
CreatedAt *time.Time `json:"createdAt"` CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"` UpdatedAt *time.Time `json:"updatedAt"`
Products []ReceivableProductItem `json:"products"` Products []ReceivableProductItem `json:"products"`
CustomsProducts []ReceivableCustomsProductItem `json:"customsProducts"`
} }
type ReceivableProductItem struct { type ReceivableProductItem struct {
@@ -103,6 +104,22 @@ type ReceivableProductItem struct {
MinusTaxAmount decimal.Decimal `json:"minusTaxAmount"` MinusTaxAmount decimal.Decimal `json:"minusTaxAmount"`
MinusTaxDifference decimal.Decimal `json:"minusTaxDifference"` 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 详情 // Info @TITLE 详情
func (r *receivable) Info(ctx context.Context, receivableId int64) (reply ReplyReceivableInfo, err error) { func (r *receivable) Info(ctx context.Context, receivableId int64) (reply ReplyReceivableInfo, err error) {