feat(shipment): 添加混装功能模块
- 在 shipment 结构体中新增 Mixed 类型字段 - 创建 mixed 包及其相关结构体定义 - 实现混装列表查询、生成等功能接口 - 添加混装箱体和产品的数据模型及操作方法 - 集成客户端调用逻辑并实现 RPC 接口 - 定义混装相关的参数结构体和返回值类型
This commit is contained in:
59
erp/shipment/mixed.go
Normal file
59
erp/shipment/mixed.go
Normal file
@@ -0,0 +1,59 @@
|
||||
package shipment
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
mixed2 "git.kumo.work/shama/service/erp/shipment/mixed"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
)
|
||||
|
||||
type mixed struct {
|
||||
Mixed mixed2.Mixed
|
||||
}
|
||||
|
||||
type ArgsMixedList struct {
|
||||
Page bean.Page
|
||||
Search MixedSearch
|
||||
}
|
||||
type MixedSearch struct {
|
||||
InvoiceSerial string // 出运发票号
|
||||
CreatedStaffIds []int64 // 业务员筛选
|
||||
}
|
||||
type ReplyMixedList struct {
|
||||
List []MixedItem `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
type MixedItem struct {
|
||||
Id int64 `json:"id"`
|
||||
ShipmentId int64 `json:"shipmentId"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
// List @TITLE 列表
|
||||
func (m *mixed) List(ctx context.Context, args ArgsMixedList) (reply ReplyMixedList, err error) {
|
||||
xClient, err := client.GetClient(m)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "List", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsMixedGen struct {
|
||||
ShipmentId int64 // 订舱单id
|
||||
StaffId int64 // 业务员id
|
||||
}
|
||||
|
||||
// Gen @TITLE 生成
|
||||
func (m *mixed) Gen(ctx context.Context, args ArgsMixedGen) error {
|
||||
xClient, err := client.GetClient(m)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Gen", args, &reply)
|
||||
}
|
||||
Reference in New Issue
Block a user