1
This commit is contained in:
@@ -93,9 +93,6 @@ func PrintOrderByOrder4Store(ctx *jxcontext.Context, order *model.GoodsOrder, st
|
||||
}
|
||||
|
||||
printResult, err = handler.PrintOrder(ctx, store, storeDetail, order, printType, afs)
|
||||
if storeID == 805216 {
|
||||
globals.SugarLogger.Debugf("805216--------err := %v", err)
|
||||
}
|
||||
if err == nil {
|
||||
dao.SetOrderPrintFlag(db, ctx.GetUserName(), order.VendorOrderID, order.VendorID, true)
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ func (c *PrinterHandler) GetVendorID() int {
|
||||
func (c *PrinterHandler) PrintMsg(ctx *jxcontext.Context, printSn, orderSeq, msgTitle, msgContent string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
if printSn != "" {
|
||||
printSn = strings.Split(printSn, "_")[0]
|
||||
if _, err := api.JxPrintAPI.DoPrint(printSn, msgContent, utils.Str2Int(orderSeq)); err == nil {
|
||||
if _, err = api.JxPrintAPI.DoPrint(printSn, msgContent, utils.Str2Int(orderSeq)); err == nil {
|
||||
return c.GetPrinterStatus(ctx, printSn, "")
|
||||
}
|
||||
}
|
||||
@@ -238,9 +238,6 @@ func (c *PrinterHandler) getOrderContentByTemplate(order *model.GoodsOrder, stor
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, order *model.GoodsOrder, printType string, afs *model.AfsOrder) (printerStatus *partner.PrinterStatus, err error) {
|
||||
if store.ID == 805216 {
|
||||
globals.SugarLogger.Debugf("8052161 :%d", len(order.Skus))
|
||||
}
|
||||
if len(order.Skus) == 0 {
|
||||
return
|
||||
}
|
||||
@@ -268,16 +265,8 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if store.ID == 805216 {
|
||||
globals.SugarLogger.Debugf("8052162 :%s", string(orderPrint))
|
||||
}
|
||||
orderSeq := utils.Int2Str(order.VendorID) + utils.Int2Str(order.OrderSeq)
|
||||
result, err := c.PrintMsg(ctx, store.PrinterSN, orderSeq, "", string(orderPrint))
|
||||
if store.ID == 805216 {
|
||||
globals.SugarLogger.Debugf("8052163 :%v", err)
|
||||
globals.SugarLogger.Debugf("8052164 :%s", utils.Format4Output(result, false))
|
||||
}
|
||||
return result, err
|
||||
return c.PrintMsg(ctx, store.PrinterSN, orderSeq, "", string(orderPrint))
|
||||
}
|
||||
|
||||
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