1
This commit is contained in:
@@ -501,7 +501,10 @@ func (s *DefScheduler) OnOrderStatusChanged(order *model.GoodsOrder, status *mod
|
||||
}
|
||||
|
||||
// 京西云打印机打印数据-如果门店使用京西打印机才使用如下代码块
|
||||
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order, model.PrintTypeOrder)
|
||||
store, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
|
||||
if err == nil && store.PrinterVendorID == model.VendorIDJxprint {
|
||||
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order, model.PrintTypeOrder)
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
|
||||
@@ -3,9 +3,11 @@ package defsch
|
||||
import (
|
||||
"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/netprinter"
|
||||
push "git.rosy.net.cn/jx-callback/business/jxutils/unipush"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/weixinmsg"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/msghub"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
@@ -34,12 +36,18 @@ func (s *DefScheduler) OnAfsOrderNew(order *model.AfsOrder, isPending bool) (err
|
||||
weixinmsg.NotifyAfsOrderStatus(order)
|
||||
push.NotifyAfsOrder(order)
|
||||
|
||||
// 打印通知
|
||||
//if handler := partner.GetPurchaseOrderHandlerFromVendorID(order.VendorID); handler != nil {
|
||||
// if orderObj, err2 := handler.GetOrder(order.VendorOrgCode, order.VendorOrderID, ""); err2 == nil && order != nil {
|
||||
// netprinter.PrintOrderByOrder(jxcontext.AdminCtx, orderObj, model.PrintTypeOrder)
|
||||
// }
|
||||
//}
|
||||
// 京西云打印机打印数据-如果门店使用京西打印机才使用如下代码块
|
||||
store, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
|
||||
if err == nil && store.PrinterVendorID == model.VendorIDJxprint {
|
||||
if handler := partner.GetPurchaseOrderHandlerFromVendorID(order.VendorID); handler != nil {
|
||||
orderObj, err2 := handler.GetOrder(order.VendorOrgCode, order.VendorOrderID, "")
|
||||
if err2 != nil {
|
||||
return err
|
||||
}
|
||||
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, orderObj, model.PrintTypeOrder)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user