添加京西云打印机
This commit is contained in:
@@ -265,7 +265,7 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
|
||||
return c.PrintMsg(ctx, store.PrinterSN, store.PrinterKey, order.VendorOrderID, content)
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, printType string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, vendorId int) (printerStatus *partner.PrinterStatus, err error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -236,6 +236,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) (printerStatus *partner.PrinterStatus, err error) {
|
||||
globals.SugarLogger.Debugf("jxprint PrintOrderByOrder orderID:%s, storeID:%d", order.VendorOrderID, store.ID)
|
||||
if storeDetail.PrinterVendorID != model.VendorIDJxprint {
|
||||
return nil, nil
|
||||
}
|
||||
if len(order.Skus) == 0 {
|
||||
return
|
||||
}
|
||||
@@ -268,13 +271,18 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
|
||||
return c.PrintMsg(ctx, store.PrinterSN, order.VendorOrderID, "", string(orderPrint))
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, printType string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
// PrintStore 打印门店
|
||||
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, vendorCode int) (printerStatus *partner.PrinterStatus, err error) {
|
||||
data := make(map[string]interface{}, 0)
|
||||
data[StoreStatus] = utils.Int2Str(store.Status) // 门店状态
|
||||
data[StoreStatus] = utils.Int2Str(store.Status) // 门店状态
|
||||
data[StoreStatus] = utils.Int2Str(store.Status) // 门店状态
|
||||
data[StoreStatus] = utils.Int2Str(store.Status)
|
||||
data[StoreName] = storeDetail.VendorStoreName
|
||||
data[VendorName] = model.VendorChineseNames[vendorCode]
|
||||
orderPrint, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return nil, err
|
||||
return c.PrintMsg(ctx, store.PrinterSN, "", "", 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) {
|
||||
|
||||
@@ -307,7 +307,7 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
|
||||
return c.PrintMsg(ctx, store.PrinterSN, store.PrinterKey, order.VendorOrderID, content)
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, printType string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, vendorId int) (printerStatus *partner.PrinterStatus, err error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -419,7 +419,7 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, printType string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, vendorId int) (printerStatus *partner.PrinterStatus, err error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
|
||||
return c.PrintMsg(ctx, store.PrinterSN, store.PrinterKey, order.VendorOrderID, content)
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, printType string) (printerStatus *partner.PrinterStatus, err error) {
|
||||
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, vendorId int) (printerStatus *partner.PrinterStatus, err error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user