1
This commit is contained in:
@@ -79,6 +79,7 @@ func PrintOrderByOrder4Store(ctx *jxcontext.Context, order *model.GoodsOrder, st
|
||||
if err == nil {
|
||||
handler, err := GetHandlerFromStore(store)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("805216--------err := %v", err)
|
||||
return &partner.PrinterStatus{
|
||||
PrintResult: partner.PrintResultNoPrinter,
|
||||
}, nil
|
||||
@@ -93,6 +94,9 @@ 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)
|
||||
}
|
||||
|
||||
@@ -231,7 +231,6 @@ func ReadMsgFromVendor(vendorID int, elmAppID string, msg []byte) error {
|
||||
UserID: utils.Int2Str(PushContentReq.OpenUserID),
|
||||
LatestMsg: PushContentReq.MsgContent,
|
||||
LatestTime: PushContentReq.Cts,
|
||||
OrderID: "",
|
||||
}
|
||||
vendorStoreID = PushContentReq.AppPoiCode
|
||||
if PushContentReq.OrderID != 0 {
|
||||
|
||||
@@ -238,6 +238,9 @@ 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
|
||||
}
|
||||
@@ -265,9 +268,16 @@ 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)
|
||||
return c.PrintMsg(ctx, store.PrinterSN, orderSeq, "", string(orderPrint))
|
||||
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
|
||||
}
|
||||
|
||||
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