This commit is contained in:
邹宗楠
2022-06-17 18:01:34 +08:00
parent 20841b7096
commit 1dc993a9ac
2 changed files with 8 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ import (
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/business/partner"
"git.rosy.net.cn/jx-callback/globals"
"strings"
)
var (
@@ -115,7 +116,9 @@ func (c *BaseScheduler) SelfDeliverDelivering(order *model.GoodsOrder, userName
if /*order.LockStatus == model.OrderStatusUnknown && */ order.Status == model.OrderStatusFinishedPickup {
if c.IsReallyCallPlatformAPI {
err = utils.CallFuncLogError(func() error {
if err := partner.GetPurchaseOrderHandlerFromVendorID(order.VendorID).SelfDeliverDelivering(order, userName); err != nil {
// 下面这个写法暂存,可能会有问题
//if err := partner.GetPurchaseOrderHandlerFromVendorID(order.VendorID).SelfDeliverDelivering(order, userName); err != nil && err != scheduler.ErrOrderStatusAlreadySatisfyCurOperation {
if err := partner.GetPurchaseOrderHandlerFromVendorID(order.VendorID).SelfDeliverDelivering(order, userName); err != nil && (err != scheduler.ErrOrderStatusAlreadySatisfyCurOperation && !strings.Contains(err.Error(), "1047") && !strings.Contains(err.Error(), "301251")) {
bill, _ := partner.CurOrderManager.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
c.CancelWaybill(bill, partner.CancelWaybillReasonOther, partner.CancelWaybillReasonStrActive)
}