1
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package defsch
|
package defsch
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/netprinter"
|
"git.rosy.net.cn/jx-callback/business/jxutils/netprinter"
|
||||||
@@ -53,12 +52,11 @@ func (s *DefScheduler) OnAfsOrderNew(order *model.AfsOrder, isPending bool) (err
|
|||||||
store, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
|
store, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
|
||||||
if err == nil && store.PrinterVendorID == model.VendorIDJxprint && store.IsPrintCancelOrder == model.YES {
|
if err == nil && store.PrinterVendorID == model.VendorIDJxprint && store.IsPrintCancelOrder == model.YES {
|
||||||
orderObj, _ := partner.CurOrderManager.LoadOrder(order.VendorOrderID, order.VendorID)
|
orderObj, _ := partner.CurOrderManager.LoadOrder(order.VendorOrderID, order.VendorID)
|
||||||
if order.VendorOrderID == "3301223263215186716" {
|
if orderObj != nil {
|
||||||
globals.SugarLogger.Debugf("-----------OnAfsOrderNew orderObj:= %s", utils.Format4Output(orderObj, false))
|
|
||||||
}
|
|
||||||
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, orderObj, model.PrintAfsOrder, order)
|
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, orderObj, model.PrintAfsOrder, order)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -266,16 +266,8 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
orderSel := utils.Int2Str(order.VendorID) + utils.Int2Str(order.OrderSeq)
|
orderSeq := utils.Int2Str(order.VendorID) + utils.Int2Str(order.OrderSeq)
|
||||||
if order.VendorOrderID == "3301223263215186716" {
|
return c.PrintMsg(ctx, store.PrinterSN, orderSeq, "", string(orderPrint))
|
||||||
globals.SugarLogger.Debugf("----------------:%s", string(orderPrint))
|
|
||||||
}
|
|
||||||
dataSuls, err := c.PrintMsg(ctx, store.PrinterSN, orderSel, "", string(orderPrint))
|
|
||||||
if order.VendorOrderID == "3301223263215186716" {
|
|
||||||
globals.SugarLogger.Debugf("----------------:%s", utils.Format4Output(dataSuls, false))
|
|
||||||
globals.SugarLogger.Debugf("----------------:%v", err)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *PrinterHandler) PrintCancelOrRefundOrder(ctx *jxcontext.Context, printType int, store *model.Store, storeDetail *dao.StoreDetail, order *model.GoodsOrder) (printerStatus *partner.PrinterStatus, err error) {
|
func (c *PrinterHandler) PrintCancelOrRefundOrder(ctx *jxcontext.Context, printType int, store *model.Store, storeDetail *dao.StoreDetail, order *model.GoodsOrder) (printerStatus *partner.PrinterStatus, err error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user