package old import ( "context" "git.kumo.work/shama/service/client" "github.com/shopspring/decimal" ) type product struct { } type ProductItem struct { Id int64 `json:"id"` PurchaseProductId int64 `json:"purchaseProductId"` SaleProductId int64 `json:"saleProductId"` Sort int64 `json:"sort"` Serial string `json:"serial"` PiSerial string `json:"piSerial"` CustomSerial string `json:"customSerial"` Name string `json:"name"` CustomsSerial string `json:"customsSerial"` CustomsName string `json:"customsName"` CustomsInvoiceUnit string `json:"customsInvoiceUnit"` CustomsUnit string `json:"customsUnit"` RealCustomsInvoiceUnit string `json:"realCustomsInvoiceUnit"` InvoiceType int64 `json:"invoiceType"` InvoiceCount decimal.Decimal `json:"invoiceCount"` AccountingCount int64 `json:"accountingCount"` OuterNum *int64 `json:"outerNum"` BoxCount int64 `json:"boxCount"` PurchasePrice decimal.Decimal `json:"purchasePrice"` Amount decimal.Decimal `json:"amount"` Volume *decimal.Decimal `json:"volume"` TotalVolume decimal.Decimal `json:"totalVolume"` GrossWeight *decimal.Decimal `json:"grossWeight"` TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"` NetWeight *decimal.Decimal `json:"netWeight"` TotalNetWeight decimal.Decimal `json:"totalNetWeight"` PackageDescription string `json:"packageDescription"` FactoryId int64 `json:"factoryId"` FactoryName string `json:"factoryName"` SaleProductAccountingCount int64 `json:"saleProductAccountingCount"` SaleProductPurchasedCount int64 `json:"saleProductPurchasedCount"` ContainerNumber string `json:"containerNumber"` ContainerNumberBoxCount int64 `json:"containerNumberBoxCount"` } // All @TITLE 获取产品 func (p *product) All(ctx context.Context, accountingId int64) (reply []ProductItem, err error) { xClient, err := client.GetClient(p) if err != nil { return } err = xClient.Call(ctx, "All", accountingId, &reply) return }