From d18d57d50d30fc60a920eb55e9dab28d14b5e9f2 Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 18 Aug 2026 14:59:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(shipment):=20=E6=B7=BB=E5=8A=A0=E7=AE=B1?= =?UTF-8?q?=E4=BD=93=E9=87=8D=E9=87=8F=E5=AD=97=E6=AE=B5=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 BoxItem 结构体中添加 GrossWeight、TotalGrossWeight、NetWeight 和 TotalNetWeight 字段 - 在 BoxAdd 结构体中添加 GrossWeight、TotalGrossWeight、NetWeight 和 TotalNetWeight 字段 - 更新结构体字段对齐格式以提高代码可读性 - 支持箱体毛重和净重相关业务功能 --- erp/shipment/mixed/box.go | 62 ++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/erp/shipment/mixed/box.go b/erp/shipment/mixed/box.go index b0c3001..2bd8cbf 100644 --- a/erp/shipment/mixed/box.go +++ b/erp/shipment/mixed/box.go @@ -11,20 +11,24 @@ type box struct { } type BoxItem struct { - Id int64 `json:"id"` - Serial string `json:"serial"` - CustomSerial string `json:"customSerial"` - Po string `json:"po"` - BlEngName string `json:"blEngName"` - InnerNum int64 `json:"innerNum"` - OuterBoxCount int64 `json:"outerBoxCount"` - 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"` - OuterNum int64 `json:"outerNum"` - Products []BoxProduct `json:"products"` + Id int64 `json:"id"` + Serial string `json:"serial"` + CustomSerial string `json:"customSerial"` + Po string `json:"po"` + BlEngName string `json:"blEngName"` + InnerNum int64 `json:"innerNum"` + OuterBoxCount int64 `json:"outerBoxCount"` + 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"` + GrossWeight decimal.Decimal `json:"grossWeight"` + TotalGrossWeight decimal.Decimal `json:"totalGrossWeight"` + NetWeight decimal.Decimal `json:"netWeight"` + TotalNetWeight decimal.Decimal `json:"totalNetWeight"` + OuterNum int64 `json:"outerNum"` + Products []BoxProduct `json:"products"` } type BoxProduct struct { @@ -56,19 +60,23 @@ type ArgsBoxAdd struct { } type BoxAdd struct { - Serial string // 货号 - CustomSerial string // 客户货号 - Po string // PO - BlEngName string // 提单英文名 - InnerNum int64 // 内盒入数 - OuterBoxCount int64 // 箱数 - Length decimal.Decimal // 长 - Width decimal.Decimal // 宽 - Height decimal.Decimal // 高 - Volume decimal.Decimal // 体积 - TotalVolume decimal.Decimal // 总体积 - OuterNum int64 // 外箱入数 - Products []BoxProductItem // 箱内商品 + Serial string // 货号 + CustomSerial string // 客户货号 + Po string // PO + BlEngName string // 提单英文名 + InnerNum int64 // 内盒入数 + OuterBoxCount int64 // 箱数 + Length decimal.Decimal // 长 + Width decimal.Decimal // 宽 + Height decimal.Decimal // 高 + Volume decimal.Decimal // 体积 + TotalVolume decimal.Decimal // 总体积 + GrossWeight decimal.Decimal // 毛重 + TotalGrossWeight decimal.Decimal // 总毛重 + NetWeight decimal.Decimal // 净重 + TotalNetWeight decimal.Decimal // 总净重 + OuterNum int64 // 外箱入数 + Products []BoxProductItem // 箱内商品 } type BoxProductItem struct {