部署
This commit is contained in:
@@ -3,6 +3,7 @@ package shipment
|
||||
import (
|
||||
"context"
|
||||
"git.kumo.work/shama/service/client"
|
||||
bean2 "git.kumo.work/shama/service/erp/bean"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
"time"
|
||||
)
|
||||
@@ -81,10 +82,21 @@ func (c *customs) Products(ctx context.Context, customsId int64) (reply []SalePr
|
||||
return
|
||||
}
|
||||
|
||||
// Gifts @TITLE 获取赠品
|
||||
func (c *customs) Gifts(ctx context.Context, customsId int64) (reply []GiftItem, err error) {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Gifts", customsId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsCustomsGen struct {
|
||||
ShipmentId int64 // 订舱id
|
||||
CustomsNo string // 报关单号
|
||||
ShipmentSaleProductIds []int64 // 订舱产品id
|
||||
ShipmentGiftIds []int64 // 订舱赠品id
|
||||
StaffId int64 // 操作员工
|
||||
}
|
||||
|
||||
@@ -109,3 +121,13 @@ func (c *customs) Cancel(ctx context.Context, customsId int64) (err error) {
|
||||
err = xClient.Call(ctx, "Cancel", customsId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
// Customs @TITLE 报关信息
|
||||
func (c *customs) Customs(ctx context.Context, customsId int64) (reply bean2.ReplyCustoms, err error) {
|
||||
xClient, err := client.GetClient(c)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Customs", customsId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -10,6 +10,11 @@ import (
|
||||
type gift struct {
|
||||
}
|
||||
|
||||
type ArgsGiftSearch struct {
|
||||
ShipmentId int64 // 出舱单
|
||||
ShipmentGiftIds []int64 // 出舱单赠品id
|
||||
}
|
||||
|
||||
type GiftItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
@@ -32,16 +37,18 @@ type GiftItem struct {
|
||||
SealNumber string `json:"sealNumber"`
|
||||
Remark string `json:"remark"`
|
||||
Sort int64 `json:"sort"`
|
||||
IsSerial int64 `json:"isSerial"`
|
||||
IsCustoms int64 `json:"isCustoms"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
// All @TITLE 全部赠品
|
||||
func (g *gift) All(ctx context.Context, shipmentId int64) (reply []GiftItem, err error) {
|
||||
func (g *gift) All(ctx context.Context, args ArgsGiftSearch) (reply []GiftItem, err error) {
|
||||
xClient, err := client.GetClient(g)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "All", shipmentId, &reply)
|
||||
err = xClient.Call(ctx, "All", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package shipment
|
||||
import (
|
||||
"context"
|
||||
"git.kumo.work/shama/service/client"
|
||||
bean2 "git.kumo.work/shama/service/erp/bean"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
"time"
|
||||
)
|
||||
@@ -81,10 +82,21 @@ func (s *serial) Products(ctx context.Context, serialId int64) (reply []SaleProd
|
||||
return
|
||||
}
|
||||
|
||||
// Gifts @TITLE 获取赠品
|
||||
func (s *serial) Gifts(ctx context.Context, serialId int64) (reply []GiftItem, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Gifts", serialId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsSerialGen struct {
|
||||
ShipmentId int64 // 订舱id
|
||||
SerialNo string // 商检单号
|
||||
ShipmentSaleProductIds []int64 // 订舱产品id
|
||||
ShipmentGiftIds []int64 // 订舱赠品id
|
||||
StaffId int64 // 操作员工
|
||||
}
|
||||
|
||||
@@ -109,3 +121,13 @@ func (s *serial) Cancel(ctx context.Context, serialId int64) (err error) {
|
||||
err = xClient.Call(ctx, "Cancel", serialId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
// Customs @TITLE 报关信息
|
||||
func (s *serial) Customs(ctx context.Context, customsId int64) (reply bean2.ReplyCustoms, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Customs", customsId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user