- fk
This commit is contained in:
@@ -153,8 +153,8 @@ func init() {
|
||||
}
|
||||
}
|
||||
if isAcceptIt {
|
||||
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order)
|
||||
utils.CallFuncAsync(func() {
|
||||
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order)
|
||||
weixinmsg.NotifyNewOrder(order)
|
||||
})
|
||||
msghub.OnNewOrder(order)
|
||||
@@ -230,8 +230,8 @@ func (s *DefScheduler) OnOrderNew(order *model.GoodsOrder, isPending bool) (err
|
||||
if order.Status >= model.OrderStatusNew {
|
||||
s.resetTimer(savedOrderInfo, nil, isPending)
|
||||
if !isPending && order.Status >= model.OrderStatusAccepted { // 有订单消息错序,先收到接单消息,再收到新订单消息,导致接单TIMER不动作,这里补一下
|
||||
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order)
|
||||
utils.CallFuncAsync(func() {
|
||||
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order)
|
||||
weixinmsg.NotifyNewOrder(order)
|
||||
})
|
||||
msghub.OnNewOrder(order)
|
||||
|
||||
@@ -116,9 +116,11 @@ func (c *PrinterHandler) PrintMsg(ctx *jxcontext.Context, id1, id2, msg string)
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) GetPrinterStatus(ctx *jxcontext.Context, printerSN, printerKey string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
if printerStatus.PrinterStatus, err = api.FeieAPI.QueryPrinterStatus(printerSN); err == nil {
|
||||
tmpStatus, err := api.FeieAPI.QueryPrinterStatus(printerSN)
|
||||
if err == nil {
|
||||
printerStatus = &partner.PrinterStatus{
|
||||
PrintResult: partner.PrintResultSuccess,
|
||||
PrinterStatus: tmpStatus,
|
||||
PrintResult: partner.PrintResultSuccess,
|
||||
}
|
||||
printerStatus.Printed, printerStatus.Waiting, err = api.FeieAPI.QueryOrderInfoByDate(printerSN, time.Now())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user