1
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||||
"git.rosy.net.cn/jx-callback/business/partner"
|
"git.rosy.net.cn/jx-callback/business/partner"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -115,7 +116,9 @@ func (c *BaseScheduler) SelfDeliverDelivering(order *model.GoodsOrder, userName
|
|||||||
if /*order.LockStatus == model.OrderStatusUnknown && */ order.Status == model.OrderStatusFinishedPickup {
|
if /*order.LockStatus == model.OrderStatusUnknown && */ order.Status == model.OrderStatusFinishedPickup {
|
||||||
if c.IsReallyCallPlatformAPI {
|
if c.IsReallyCallPlatformAPI {
|
||||||
err = utils.CallFuncLogError(func() error {
|
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)
|
bill, _ := partner.CurOrderManager.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
|
||||||
c.CancelWaybill(bill, partner.CancelWaybillReasonOther, partner.CancelWaybillReasonStrActive)
|
c.CancelWaybill(bill, partner.CancelWaybillReasonOther, partner.CancelWaybillReasonStrActive)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"github.com/astaxie/beego/client/orm"
|
"github.com/astaxie/beego/client/orm"
|
||||||
"github.com/astaxie/beego/server/web"
|
"github.com/astaxie/beego/server/web"
|
||||||
|
"strconv"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Init() {
|
func Init() {
|
||||||
@@ -31,9 +33,9 @@ func Init() {
|
|||||||
// orm.RegisterModel(new(legacymodel.WeiXins))
|
// orm.RegisterModel(new(legacymodel.WeiXins))
|
||||||
// }
|
// }
|
||||||
// 这个注册的2022年之前的表,包括2022年数据
|
// 这个注册的2022年之前的表,包括2022年数据
|
||||||
orm.RegisterModel(new(model.GoodsOrder))
|
//orm.RegisterModel(new(model.GoodsOrder))
|
||||||
// 这个注册的是当前年份下一年的表,实现分表。不包括当前年份。
|
// 这个注册的是当前年份下一年的表,实现分表。不包括当前年份。
|
||||||
//orm.RegisterModelWithSuffix("_"+strconv.Itoa(time.Now().Year()+1), new(model.GoodsOrder))
|
orm.RegisterModelWithSuffix("_"+strconv.Itoa(time.Now().Year()+1), new(model.GoodsOrder))
|
||||||
orm.RegisterModel(new(model.GoodsOrderOriginal))
|
orm.RegisterModel(new(model.GoodsOrderOriginal))
|
||||||
orm.RegisterModel(new(model.TempGoodsOrderMobile))
|
orm.RegisterModel(new(model.TempGoodsOrderMobile))
|
||||||
orm.RegisterModel(new(model.OrderSku))
|
orm.RegisterModel(new(model.OrderSku))
|
||||||
|
|||||||
Reference in New Issue
Block a user