From 884a27fbff0cd934e9500523077785f73068c6e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 25 Aug 2022 16:23:09 +0800 Subject: [PATCH] 1 --- business/jxcallback/scheduler/defsch/defsch.go | 2 +- business/partner/printer/jxprint/jxprint_const.go | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index a617bce2d..3a5f2c8bf 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -500,7 +500,7 @@ func (s *DefScheduler) OnOrderStatusChanged(order *model.GoodsOrder, status *mod msghub.OnKeyOrderStatusChanged(savedOrderInfo.order) } - // 京西云打印机打印数据 + // 京西云打印机打印数据-如果门店使用京西打印机才使用如下代码块 //netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order, model.PrintTypeOrder) } } diff --git a/business/partner/printer/jxprint/jxprint_const.go b/business/partner/printer/jxprint/jxprint_const.go index bfeea439c..7fad4e35b 100644 --- a/business/partner/printer/jxprint/jxprint_const.go +++ b/business/partner/printer/jxprint/jxprint_const.go @@ -114,11 +114,13 @@ func ManagerOrderPrint(order *model.GoodsOrder, storeTel string, storeDetail *da printOrder[StoreTel] = storeTel printOrder[OfficialName] = globals.StoreName - bill, _ := partner.CurOrderManager.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID) - //printOrder[StoreStatus] = utils.Int2Str(storeDetail.Status) - printOrder[RiderVendorId] = utils.Int2Str(bill.WaybillVendorID) - printOrder[RiderName] = bill.CourierName - printOrder[RiderPhone] = bill.CourierMobile + if order.WaybillVendorID != -1 && order.VendorWaybillID != "" { + bill, _ := partner.CurOrderManager.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID) + //printOrder[StoreStatus] = utils.Int2Str(storeDetail.Status) + printOrder[RiderVendorId] = utils.Int2Str(bill.WaybillVendorID) + printOrder[RiderName] = bill.CourierName + printOrder[RiderPhone] = bill.CourierMobile + } return printOrder }