feat(shipment): 添加混装功能模块
- 在 shipment 结构体中新增 Mixed 类型字段 - 创建 mixed 包及其相关结构体定义 - 实现混装列表查询、生成等功能接口 - 添加混装箱体和产品的数据模型及操作方法 - 集成客户端调用逻辑并实现 RPC 接口 - 定义混装相关的参数结构体和返回值类型
This commit is contained in:
55
erp/shipment/mixed/product.go
Normal file
55
erp/shipment/mixed/product.go
Normal file
@@ -0,0 +1,55 @@
|
||||
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"`
|
||||
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"`
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user