From a5f552c6770e5249fece86c0710c2b97805dcb7e Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 22 Aug 2022 11:22:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=A0=E9=81=93=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=87=A0=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/order.go | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/supply/channel/order.go b/supply/channel/order.go index 6e3a5aa..4a6d991 100644 --- a/supply/channel/order.go +++ b/supply/channel/order.go @@ -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 +}