Files
service/erp/shipment/mixed/product.go
kanade c66dd7f963 feat(erp): 添加单箱金额字段并移除清关总价字段
- 在销售产品、出货产品等多个结构体中添加 BoxAmount(单箱金额)字段
- 移除出货产品结构体中的 ClearanceAmount(清关总价)字段
- 涉及 sale/product、shipment/saleProduct、shipment/modify/saleProduct、shipment/mixed/product 等模块
2026-10-28 09:28:37 +08:00

59 lines
2.7 KiB
Go

package mixed
import (
"context"
"git.kumo.work/shama/service/client"
"github.com/shopspring/decimal"
)
type product struct {
}
type ProductItem struct {
Id int64 `json:"id"`
MixedFlag int64 `json:"mixedFlag"`
Mold int64 `json:"mold"`
ParentShipmentSaleProductID int64 `json:"parentShipmentSaleProductID"`
Serial string `json:"serial"`
CustomSerial string `json:"customSerial"`
Po string `json:"po"`
Name string `json:"name"`
BlEngName string `json:"blEngName"`
ShipmentCount int64 `json:"shipmentCount"`
InnerNum *int64 `json:"innerNum"`
InnerBoxCount *int64 `json:"innerBoxCount"`
OuterNum *int64 `json:"outerNum"`
OuterBoxCount int64 `json:"outerBoxCount"`
CustomsSerial string `json:"customsSerial"`
CustomsName string `json:"customsName"`
CustomsDetail string `json:"customsDetail"`
CustomsMeasureUnit string `json:"customsMeasureUnit"`
ShipmentCountUnit string `json:"shipmentCountUnit"`
CustomsGrossWeight decimal.Decimal `json:"customsGrossWeight"`
TotalCustomsGrossWeight decimal.Decimal `json:"totalCustomsGrossWeight"`
CustomsNetWeight decimal.Decimal `json:"customsNetWeight"`
TotalCustomsNetWeight decimal.Decimal `json:"totalCustomsNetWeight"`
DomesticSupply string `json:"domesticSupply"`
FactoryName string `json:"factoryName"`
SalePrice decimal.Decimal `json:"salePrice"`
SaleAmount decimal.Decimal `json:"saleAmount"`
BoxAmount decimal.Decimal `json:"boxAmount"`
CustomsPrice decimal.Decimal `json:"customsPrice"`
CustomsAmount decimal.Decimal `json:"customsAmount"`
OuterLength *decimal.Decimal `json:"outerLength"`
OuterWidth *decimal.Decimal `json:"outerWidth"`
OuterHeight *decimal.Decimal `json:"outerHeight"`
OuterVolume *decimal.Decimal `json:"outerVolume"`
}
// All @TITLE 获取全部产品
func (p *product) All(ctx context.Context, mixedId int64) (reply []ProductItem, err error) {
xClient, err := client.GetClient(p)
if err != nil {
return
}
err = xClient.Call(ctx, "All", mixedId, &reply)
return
}