From cdd0ebe7339659adfd3519b5933d9df5a8063c51 Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 9 Apr 2026 16:56:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(shipment):=20=E6=B7=BB=E5=8A=A0=E7=88=B6?= =?UTF-8?q?=E7=BA=A7=E8=B4=A7=E8=BF=90=E9=94=80=E5=94=AE=E4=BA=A7=E5=93=81?= =?UTF-8?q?ID=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在SaleProductItem结构体中新增ParentShipmentSaleProductId字段 - 用于关联父级货运销售产品关系 - 保持原有数据结构完整性 - 更新两个相关文件中的结构体定义 --- erp/shipment/modify/saleProduct.go | 159 +++++++++++++++-------------- erp/shipment/saleProduct.go | 159 +++++++++++++++-------------- 2 files changed, 160 insertions(+), 158 deletions(-) diff --git a/erp/shipment/modify/saleProduct.go b/erp/shipment/modify/saleProduct.go index fd2ef19..dbebfb5 100644 --- a/erp/shipment/modify/saleProduct.go +++ b/erp/shipment/modify/saleProduct.go @@ -13,85 +13,86 @@ type saleProduct struct { } type SaleProductItem struct { - Id int64 `json:"id"` - Mold int64 `json:"mold"` - MoldCount int64 `json:"moldCount"` - ParentSaleProductId int64 `json:"parentSaleProductId"` - SaleProductId int64 `json:"saleProductId"` - PiSerial string `json:"piSerial"` - Sort int64 `json:"sort"` - Po string `json:"po"` - Serial string `json:"serial"` - ImgFilePaths []string `json:"imgFilePaths"` - CustomSerial string `json:"customSerial"` - PackageDescription string `json:"packageDescription"` - PackageEngDescription string `json:"packageEngDescription"` - PackageWeight decimal.Decimal `json:"packageWeight"` - EngName string `json:"engName"` - Name string `json:"name"` - CustomsName string `json:"customsName"` - CustomsSerial string `json:"customsSerial"` - CustomsMeasureUnit string `json:"customsMeasureUnit"` - CustomsInvoiceUnit string `json:"customsInvoiceUnit"` - CustomsDetail string `json:"customsDetail"` - BlEngName string `json:"blEngName"` - BoxCount int64 `json:"boxCount"` - InnerNum int64 `json:"innerNum"` - InnerBoxCount *int64 `json:"innerBoxCount"` - BoxNumUnit string `json:"boxNumUnit"` - OuterNum int64 `json:"outerNum"` - ShipmentCount int64 `json:"shipmentCount"` - ShipmentCountUnit string `json:"shipmentCountUnit"` - Length decimal.Decimal `json:"length"` - Width decimal.Decimal `json:"width"` - Height decimal.Decimal `json:"height"` - Volume decimal.Decimal `json:"volume"` - TotalVolume decimal.Decimal `json:"totalVolume"` - NetGrossVolume int64 `json:"netGrossVolume"` - GrossWeight decimal.Decimal `json:"grossWeight"` - TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"` - NetWeight decimal.Decimal `json:"netWeight"` - TotalNetWeight decimal.Decimal `json:"totalNetWeight"` - CustomsVolume decimal.Decimal `json:"customsVolume"` - TotalCustomsVolume decimal.Decimal `json:"totalCustomsVolume"` - CustomsNetWeight decimal.Decimal `json:"customsNetWeight"` - TotalCustomsNetWeight decimal.Decimal `json:"totalCustomsNetWeight"` - CustomsGrossWeight decimal.Decimal `json:"customsGrossWeight"` - TotalCustomsGrossWeight decimal.Decimal `json:"totalCustomsGrossWeight"` - SalePrice decimal.Decimal `json:"salePrice"` - SaleAmount decimal.Decimal `json:"saleAmount"` - CustomsPrice decimal.Decimal `json:"customsPrice"` - CustomsAmount decimal.Decimal `json:"customsAmount"` - FactoryName string `json:"factoryName"` - CurrencyRate decimal.Decimal `json:"currencyRate"` - Brand string `json:"brand"` - DomesticSupply string `json:"domesticSupply"` - EpmNo string `json:"epmNo"` - HsSerial int64 `json:"hsSerial"` - TaxExemption string `json:"taxExemption"` - ItemNumber string `json:"itemNumber"` - Texture string `json:"texture"` - EngTexture string `json:"engTexture"` - Remark1 string `json:"remark1"` - Remark2 string `json:"remark2"` - Remark3 string `json:"remark3"` - Remark4 string `json:"remark4"` - Remark5 string `json:"remark5"` - Remark6 string `json:"remark6"` - ExchangeSettlementRemark string `json:"exchangeSettlementRemark"` - RemarkImg string `json:"remarkImg"` - ContainerNumber string `json:"containerNumber"` - SealNumber string `json:"sealNumber"` - PurchasePrice decimal.Decimal `json:"purchasePrice"` - PurchaseAmount decimal.Decimal `json:"purchaseAmount"` - IsSerial int64 `json:"isSerial"` - IsCustoms int64 `json:"isCustoms"` - IsExchangeSettlement int64 `json:"isExchangeSettlement"` - CreatedAt *time.Time `json:"createdAt"` - UpdatedAt *time.Time `json:"updatedAt"` - Children []*SaleProductItem `json:"children"` - ShipmentPurchaseProducts []PurchaseProductItem `json:"shipmentPurchaseProducts"` - AllPurchaseProducts []sale2.PurchaseProduct `json:"allPurchaseProducts"` + Id int64 `json:"id"` + Mold int64 `json:"mold"` + MoldCount int64 `json:"moldCount"` + ParentSaleProductId int64 `json:"parentSaleProductId"` + ParentShipmentSaleProductId int64 `json:"parentShipmentSaleProductId"` + SaleProductId int64 `json:"saleProductId"` + PiSerial string `json:"piSerial"` + Sort int64 `json:"sort"` + Po string `json:"po"` + Serial string `json:"serial"` + ImgFilePaths []string `json:"imgFilePaths"` + CustomSerial string `json:"customSerial"` + PackageDescription string `json:"packageDescription"` + PackageEngDescription string `json:"packageEngDescription"` + PackageWeight decimal.Decimal `json:"packageWeight"` + EngName string `json:"engName"` + Name string `json:"name"` + CustomsName string `json:"customsName"` + CustomsSerial string `json:"customsSerial"` + CustomsMeasureUnit string `json:"customsMeasureUnit"` + CustomsInvoiceUnit string `json:"customsInvoiceUnit"` + CustomsDetail string `json:"customsDetail"` + BlEngName string `json:"blEngName"` + BoxCount int64 `json:"boxCount"` + InnerNum int64 `json:"innerNum"` + InnerBoxCount *int64 `json:"innerBoxCount"` + BoxNumUnit string `json:"boxNumUnit"` + OuterNum int64 `json:"outerNum"` + ShipmentCount int64 `json:"shipmentCount"` + ShipmentCountUnit string `json:"shipmentCountUnit"` + Length decimal.Decimal `json:"length"` + Width decimal.Decimal `json:"width"` + Height decimal.Decimal `json:"height"` + Volume decimal.Decimal `json:"volume"` + TotalVolume decimal.Decimal `json:"totalVolume"` + NetGrossVolume int64 `json:"netGrossVolume"` + GrossWeight decimal.Decimal `json:"grossWeight"` + TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"` + NetWeight decimal.Decimal `json:"netWeight"` + TotalNetWeight decimal.Decimal `json:"totalNetWeight"` + CustomsVolume decimal.Decimal `json:"customsVolume"` + TotalCustomsVolume decimal.Decimal `json:"totalCustomsVolume"` + CustomsNetWeight decimal.Decimal `json:"customsNetWeight"` + TotalCustomsNetWeight decimal.Decimal `json:"totalCustomsNetWeight"` + CustomsGrossWeight decimal.Decimal `json:"customsGrossWeight"` + TotalCustomsGrossWeight decimal.Decimal `json:"totalCustomsGrossWeight"` + SalePrice decimal.Decimal `json:"salePrice"` + SaleAmount decimal.Decimal `json:"saleAmount"` + CustomsPrice decimal.Decimal `json:"customsPrice"` + CustomsAmount decimal.Decimal `json:"customsAmount"` + FactoryName string `json:"factoryName"` + CurrencyRate decimal.Decimal `json:"currencyRate"` + Brand string `json:"brand"` + DomesticSupply string `json:"domesticSupply"` + EpmNo string `json:"epmNo"` + HsSerial int64 `json:"hsSerial"` + TaxExemption string `json:"taxExemption"` + ItemNumber string `json:"itemNumber"` + Texture string `json:"texture"` + EngTexture string `json:"engTexture"` + Remark1 string `json:"remark1"` + Remark2 string `json:"remark2"` + Remark3 string `json:"remark3"` + Remark4 string `json:"remark4"` + Remark5 string `json:"remark5"` + Remark6 string `json:"remark6"` + ExchangeSettlementRemark string `json:"exchangeSettlementRemark"` + RemarkImg string `json:"remarkImg"` + ContainerNumber string `json:"containerNumber"` + SealNumber string `json:"sealNumber"` + PurchasePrice decimal.Decimal `json:"purchasePrice"` + PurchaseAmount decimal.Decimal `json:"purchaseAmount"` + IsSerial int64 `json:"isSerial"` + IsCustoms int64 `json:"isCustoms"` + IsExchangeSettlement int64 `json:"isExchangeSettlement"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + Children []*SaleProductItem `json:"children"` + ShipmentPurchaseProducts []PurchaseProductItem `json:"shipmentPurchaseProducts"` + AllPurchaseProducts []sale2.PurchaseProduct `json:"allPurchaseProducts"` } type PurchaseProductItem struct { ShipmentPurchaseProductId int64 `json:"shipmentPurchaseProductId"` diff --git a/erp/shipment/saleProduct.go b/erp/shipment/saleProduct.go index 14bd9dd..8984166 100644 --- a/erp/shipment/saleProduct.go +++ b/erp/shipment/saleProduct.go @@ -13,85 +13,86 @@ type saleProduct struct { } type SaleProductItem struct { - Id int64 `json:"id"` - Mold int64 `json:"mold"` - MoldCount int64 `json:"moldCount"` - ParentSaleProductId int64 `json:"parentSaleProductId"` - SaleProductId int64 `json:"saleProductId"` - PiSerial string `json:"piSerial"` - Sort int64 `json:"sort"` - Po string `json:"po"` - Serial string `json:"serial"` - ImgFilePaths []string `json:"imgFilePaths"` - CustomSerial string `json:"customSerial"` - PackageDescription string `json:"packageDescription"` - PackageEngDescription string `json:"packageEngDescription"` - PackageWeight decimal.Decimal `json:"packageWeight"` - EngName string `json:"engName"` - Name string `json:"name"` - CustomsName string `json:"customsName"` - CustomsSerial string `json:"customsSerial"` - CustomsMeasureUnit string `json:"customsMeasureUnit"` - CustomsInvoiceUnit string `json:"customsInvoiceUnit"` - CustomsDetail string `json:"customsDetail"` - BlEngName string `json:"blEngName"` - BoxCount int64 `json:"boxCount"` - InnerNum int64 `json:"innerNum"` - InnerBoxCount *int64 `json:"innerBoxCount"` - BoxNumUnit string `json:"boxNumUnit"` - OuterNum int64 `json:"outerNum"` - ShipmentCount int64 `json:"shipmentCount"` - ShipmentCountUnit string `json:"shipmentCountUnit"` - Length decimal.Decimal `json:"length"` - Width decimal.Decimal `json:"width"` - Height decimal.Decimal `json:"height"` - Volume decimal.Decimal `json:"volume"` - TotalVolume decimal.Decimal `json:"totalVolume"` - NetGrossVolume int64 `json:"netGrossVolume"` - GrossWeight decimal.Decimal `json:"grossWeight"` - TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"` - NetWeight decimal.Decimal `json:"netWeight"` - TotalNetWeight decimal.Decimal `json:"totalNetWeight"` - CustomsVolume decimal.Decimal `json:"customsVolume"` - TotalCustomsVolume decimal.Decimal `json:"totalCustomsVolume"` - CustomsNetWeight decimal.Decimal `json:"customsNetWeight"` - TotalCustomsNetWeight decimal.Decimal `json:"totalCustomsNetWeight"` - CustomsGrossWeight decimal.Decimal `json:"customsGrossWeight"` - TotalCustomsGrossWeight decimal.Decimal `json:"totalCustomsGrossWeight"` - SalePrice decimal.Decimal `json:"salePrice"` - SaleAmount decimal.Decimal `json:"saleAmount"` - CustomsPrice decimal.Decimal `json:"customsPrice"` - CustomsAmount decimal.Decimal `json:"customsAmount"` - FactoryName string `json:"factoryName"` - CurrencyRate decimal.Decimal `json:"currencyRate"` - Brand string `json:"brand"` - DomesticSupply string `json:"domesticSupply"` - EpmNo string `json:"epmNo"` - HsSerial int64 `json:"hsSerial"` - TaxExemption string `json:"taxExemption"` - ItemNumber string `json:"itemNumber"` - Texture string `json:"texture"` - EngTexture string `json:"engTexture"` - Remark1 string `json:"remark1"` - Remark2 string `json:"remark2"` - Remark3 string `json:"remark3"` - Remark4 string `json:"remark4"` - Remark5 string `json:"remark5"` - Remark6 string `json:"remark6"` - ExchangeSettlementRemark string `json:"exchangeSettlementRemark"` - RemarkImg string `json:"remarkImg"` - ContainerNumber string `json:"containerNumber"` - SealNumber string `json:"sealNumber"` - PurchasePrice decimal.Decimal `json:"purchasePrice"` - PurchaseAmount decimal.Decimal `json:"purchaseAmount"` - IsSerial int64 `json:"isSerial"` - IsCustoms int64 `json:"isCustoms"` - IsExchangeSettlement int64 `json:"isExchangeSettlement"` - CreatedAt *time.Time `json:"createdAt"` - UpdatedAt *time.Time `json:"updatedAt"` - Children []*SaleProductItem `json:"children"` - ShipmentPurchaseProducts []PurchaseProductItem `json:"shipmentPurchaseProducts"` - AllPurchaseProducts []sale2.PurchaseProduct `json:"allPurchaseProducts"` + Id int64 `json:"id"` + Mold int64 `json:"mold"` + MoldCount int64 `json:"moldCount"` + ParentSaleProductId int64 `json:"parentSaleProductId"` + ParentShipmentSaleProductId int64 `json:"parentShipmentSaleProductId"` + SaleProductId int64 `json:"saleProductId"` + PiSerial string `json:"piSerial"` + Sort int64 `json:"sort"` + Po string `json:"po"` + Serial string `json:"serial"` + ImgFilePaths []string `json:"imgFilePaths"` + CustomSerial string `json:"customSerial"` + PackageDescription string `json:"packageDescription"` + PackageEngDescription string `json:"packageEngDescription"` + PackageWeight decimal.Decimal `json:"packageWeight"` + EngName string `json:"engName"` + Name string `json:"name"` + CustomsName string `json:"customsName"` + CustomsSerial string `json:"customsSerial"` + CustomsMeasureUnit string `json:"customsMeasureUnit"` + CustomsInvoiceUnit string `json:"customsInvoiceUnit"` + CustomsDetail string `json:"customsDetail"` + BlEngName string `json:"blEngName"` + BoxCount int64 `json:"boxCount"` + InnerNum int64 `json:"innerNum"` + InnerBoxCount *int64 `json:"innerBoxCount"` + BoxNumUnit string `json:"boxNumUnit"` + OuterNum int64 `json:"outerNum"` + ShipmentCount int64 `json:"shipmentCount"` + ShipmentCountUnit string `json:"shipmentCountUnit"` + Length decimal.Decimal `json:"length"` + Width decimal.Decimal `json:"width"` + Height decimal.Decimal `json:"height"` + Volume decimal.Decimal `json:"volume"` + TotalVolume decimal.Decimal `json:"totalVolume"` + NetGrossVolume int64 `json:"netGrossVolume"` + GrossWeight decimal.Decimal `json:"grossWeight"` + TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"` + NetWeight decimal.Decimal `json:"netWeight"` + TotalNetWeight decimal.Decimal `json:"totalNetWeight"` + CustomsVolume decimal.Decimal `json:"customsVolume"` + TotalCustomsVolume decimal.Decimal `json:"totalCustomsVolume"` + CustomsNetWeight decimal.Decimal `json:"customsNetWeight"` + TotalCustomsNetWeight decimal.Decimal `json:"totalCustomsNetWeight"` + CustomsGrossWeight decimal.Decimal `json:"customsGrossWeight"` + TotalCustomsGrossWeight decimal.Decimal `json:"totalCustomsGrossWeight"` + SalePrice decimal.Decimal `json:"salePrice"` + SaleAmount decimal.Decimal `json:"saleAmount"` + CustomsPrice decimal.Decimal `json:"customsPrice"` + CustomsAmount decimal.Decimal `json:"customsAmount"` + FactoryName string `json:"factoryName"` + CurrencyRate decimal.Decimal `json:"currencyRate"` + Brand string `json:"brand"` + DomesticSupply string `json:"domesticSupply"` + EpmNo string `json:"epmNo"` + HsSerial int64 `json:"hsSerial"` + TaxExemption string `json:"taxExemption"` + ItemNumber string `json:"itemNumber"` + Texture string `json:"texture"` + EngTexture string `json:"engTexture"` + Remark1 string `json:"remark1"` + Remark2 string `json:"remark2"` + Remark3 string `json:"remark3"` + Remark4 string `json:"remark4"` + Remark5 string `json:"remark5"` + Remark6 string `json:"remark6"` + ExchangeSettlementRemark string `json:"exchangeSettlementRemark"` + RemarkImg string `json:"remarkImg"` + ContainerNumber string `json:"containerNumber"` + SealNumber string `json:"sealNumber"` + PurchasePrice decimal.Decimal `json:"purchasePrice"` + PurchaseAmount decimal.Decimal `json:"purchaseAmount"` + IsSerial int64 `json:"isSerial"` + IsCustoms int64 `json:"isCustoms"` + IsExchangeSettlement int64 `json:"isExchangeSettlement"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + Children []*SaleProductItem `json:"children"` + ShipmentPurchaseProducts []PurchaseProductItem `json:"shipmentPurchaseProducts"` + AllPurchaseProducts []sale2.PurchaseProduct `json:"allPurchaseProducts"` } type PurchaseProductItem struct {