diff --git a/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs b/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs index d86c16c..b341cf9 100644 --- a/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs +++ b/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs @@ -35,6 +35,7 @@ namespace BBWYB.Server.Business private Lazy restApiServiceLazy; private Lazy jdBusinessLazy; private Lazy opPlatformClientFactoryLazy; + private Lazy venderBusinessLazy; private PP_PlatformClientFactory ppPlatformClientFactory => pplatformClientFactoryLazy.Value; private TaskSchedulerManager taskSchedulerManager => taskSchedulerManagerLazy.Value; @@ -45,6 +46,7 @@ namespace BBWYB.Server.Business private QiKuManager qiKuManager => qiKuManagerLazy.Value; private RestApiService restApiService => restApiServiceLazy.Value; private OP_PlatformClientFactory opPlatformClientFactory => opPlatformClientFactoryLazy.Value; + private VenderBusiness venderBusiness => venderBusinessLazy.Value; private JDBusiness jdBusiness => jdBusinessLazy.Value; @@ -65,7 +67,7 @@ namespace BBWYB.Server.Business restApiServiceLazy = new Lazy(() => serviceProvider.GetService()); jdBusinessLazy = new Lazy(() => serviceProvider.GetService()); opPlatformClientFactoryLazy = new Lazy(() => serviceProvider.GetService()); - + venderBusinessLazy = new Lazy(() => serviceProvider.GetService()); cantPurchaseOrderStateList = new List() { Enums.OrderState.已取消, @@ -2588,12 +2590,13 @@ namespace BBWYB.Server.Business if (isNotifyDingDingWhenInOrderFail && inStoreResponse != null) { #region 入库单查询有误,通知钉钉 + var shop = venderBusiness.GetShopList(order.ShopId).FirstOrDefault(); var dingdingMsg = new StringBuilder(); - if (inStoreResponse.Data == null || inStoreResponse.Data.Count() == 0) { foreach (var opi in currentPurchaseOrderList) { + dingdingMsg.AppendLine($"店铺名称:{shop?.ShopName}"); dingdingMsg.AppendLine($"拳探订单号:{order.OrderSn}"); dingdingMsg.AppendLine($"采购平台:{opi.PurchasePlatform}"); dingdingMsg.AppendLine($"采购单号:{opi.PurchaseOrderId}"); @@ -2605,6 +2608,7 @@ namespace BBWYB.Server.Business { foreach (var opi in currentPurchaseOrderList) { + dingdingMsg.AppendLine($"店铺名称:{shop?.ShopName}"); dingdingMsg.AppendLine($"拳探订单号:{order.OrderSn}"); dingdingMsg.AppendLine($"采购平台:{opi.PurchasePlatform}"); dingdingMsg.AppendLine($"采购单号:{opi.PurchaseOrderId}"); @@ -2637,6 +2641,7 @@ namespace BBWYB.Server.Business break; } + dingdingMsg.AppendLine($"店铺名称:{shop?.ShopName}"); dingdingMsg.AppendLine($"拳探订单号:{order.OrderSn}"); dingdingMsg.AppendLine($"采购平台:{opi.PurchasePlatform}"); dingdingMsg.AppendLine($"采购单号:{opi.PurchaseOrderId}");