|
|
|
@ -10,6 +10,17 @@ import (
|
|
|
|
|
const (
|
|
|
|
|
ReplyOrderFreightFeeErrCodeNone = 0 // 无错误
|
|
|
|
|
ReplyOrderFreightFeeErrCodeErr = 1 // 有错误
|
|
|
|
|
|
|
|
|
|
OrderStatusLock = 1 // 锁单待确认
|
|
|
|
|
OrderStatusLadingBill = 2 // 提单
|
|
|
|
|
OrderStatusClose = 3 // 关闭
|
|
|
|
|
|
|
|
|
|
OrderSubStatusLock = 1 // 锁单
|
|
|
|
|
OrderSubStatusLadingBill = 2 // 提单
|
|
|
|
|
OrderSubStatusSendOutGoods = 3 // 出库/发货
|
|
|
|
|
OrderSubStatusDelivered = 4 // 妥投
|
|
|
|
|
OrderSubStatusFinal = 5 // 完成
|
|
|
|
|
OrderSubStatusCancel = 6 // 取消
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type order struct {
|
|
|
|
@ -82,3 +93,26 @@ func (o *order) Submit(ctx context.Context, channelId string, args ArgsOrderSubm
|
|
|
|
|
err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Submit", args, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// LadingBill @Title 提单
|
|
|
|
|
func (o *order) LadingBill(ctx context.Context, channelId string, args ArgsOrderSubmit) (reply ReplyOrderSubmit, err error) {
|
|
|
|
|
xClient, err := client.GetClient(o)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Submit", args, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ArgsOrderClose struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Close @Title 关闭
|
|
|
|
|
func (o *order) Close(ctx context.Context, channelId string, args ArgsOrderSubmit) (reply ReplyOrderSubmit, err error) {
|
|
|
|
|
xClient, err := client.GetClient(o)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Submit", args, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|