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) (mixedId int64, err error) { xClient, err := client.GetClient(m) if err != nil { return mixedId, err } err = xClient.Call(ctx, "Gen", args, &mixedId) return } // Delete @TITLE 删除 func (m *mixed) Delete(ctx context.Context, mixedId int64) (err error) { xClient, err := client.GetClient(m) if err != nil { return } reply := 0 return xClient.Call(ctx, "Delete", mixedId, &reply) }