1
This commit is contained in:
@@ -24,9 +24,6 @@ var (
|
||||
)
|
||||
|
||||
func (s *DefScheduler) OnAfsOrderNew(order *model.AfsOrder, isPending bool) (err error) {
|
||||
if order.VendorOrderID == "3301223263215186716" {
|
||||
globals.SugarLogger.Debugf("-----------OnAfsOrderNew := %s", utils.Format4Output(order, false))
|
||||
}
|
||||
if order.Status == model.AfsOrderStatusWait4Approve {
|
||||
if !isPending {
|
||||
if isAutoRejectAfsOrder(order) {
|
||||
@@ -54,12 +51,20 @@ func (s *DefScheduler) OnAfsOrderNew(order *model.AfsOrder, isPending bool) (err
|
||||
if order.Status == model.AfsOrderStatusWait4Approve || order.Status == model.AfsOrderStatusFinished || order.Status == model.AfsOrderStatusNew {
|
||||
// 京西云打印机打印数据-如果门店使用京西打印机才使用如下代码块
|
||||
store, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
|
||||
if order.VendorOrderID == "3301223263215186716" {
|
||||
globals.SugarLogger.Debugf("-----------OnAfsOrderNew order:= %s", utils.Format4Output(order, false))
|
||||
globals.SugarLogger.Debugf("-----------OnAfsOrderNew store:= %s", utils.Format4Output(store, false))
|
||||
globals.SugarLogger.Debugf("-----------OnAfsOrderNew bool:= %s", utils.Format4Output(err == nil && store.PrinterVendorID == model.VendorIDJxprint && store.IsPrintCancelOrder == model.YES, false))
|
||||
}
|
||||
if err == nil && store.PrinterVendorID == model.VendorIDJxprint && store.IsPrintCancelOrder == model.YES {
|
||||
if handler := partner.GetPurchaseOrderHandlerFromVendorID(order.VendorID); handler != nil {
|
||||
orderObj, err2 := handler.GetOrder(order.VendorOrgCode, order.VendorOrderID, "")
|
||||
if err2 != nil {
|
||||
return err
|
||||
}
|
||||
if order.VendorOrderID == "3301223263215186716" {
|
||||
globals.SugarLogger.Debugf("-----------OnAfsOrderNew orderObj:= %s", utils.Format4Output(orderObj, false))
|
||||
}
|
||||
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, orderObj, model.PrintAfsOrder, order)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user