This commit is contained in:
邹宗楠
2023-03-21 16:12:58 +08:00
parent 5e2bca840d
commit 1c44b0a8f1
3 changed files with 8 additions and 3 deletions

View File

@@ -378,12 +378,14 @@ func Init() {
func (s *DefScheduler) OnOrderNew(order *model.GoodsOrder, isPending bool, isAuto bool) (err error) {
savedOrderInfo := s.loadSavedOrderFromMap(model.Order2Status(order), false)
savedOrderInfo.SetOrder(order)
globals.SugarLogger.Debugf("===order========:%s", utils.Format4Output(order, false))
if order.VendorID == model.VendorIDEBAI { //饿百订单待接单的时候就推所有东西
if order.Status == model.OrderStatusWaitAccepted || order.Status == model.OrderStatusNew || order.Status >= model.OrderStatusFinishedPickup { //错序
s.resetTimer(savedOrderInfo, nil, isPending)
if order.Flag&model.OrderFlagMaskFake == 0 {
utils.CallFuncAsync(func() {
// order = setFakeActualPayPrice(order)
globals.SugarLogger.Debugf("===order2========:%s", utils.Format4Output(order, false))
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order, model.PrintTypeOrder, nil)
//目前暂且认为AdjustCount > 0 就是调整单
if order.AdjustCount > 0 {

View File

@@ -16,9 +16,9 @@ import (
)
const (
SoundsFileNewOrder = "newOrder.mp4"
SoundsFileNewAfsOrder = "newAfsOrder.mp4"
SoundsFileNewCancelOrder = "newCancelOrder.mp4"
SoundsFileNewOrder = "pushsound.caf"
SoundsFileNewAfsOrder = "pushsound.caf"
SoundsFileNewCancelOrder = "pushsound.caf"
)
// NotifyNewOrder 推送新订单

View File

@@ -265,6 +265,9 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
}
orderSel := utils.Int2Str(order.VendorID) + utils.Int2Str(order.OrderSeq)
globals.SugarLogger.Debugf("=store.PrinterSN=====:%s", store.PrinterSN)
globals.SugarLogger.Debugf("=store.orderSel=====:%s", orderSel)
globals.SugarLogger.Debugf("string(orderPrint)======%s", string(orderPrint))
return c.PrintMsg(ctx, store.PrinterSN, orderSel, "", string(orderPrint))
}