diff --git a/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs b/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs
index a8a5b56e..c2ba10c9 100644
--- a/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs
+++ b/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs
@@ -419,11 +419,18 @@ namespace BBWY.Server.Business
LogisticsCompanyName = request.ExpressName,
WayBillNo = request.WayBillNo,
}, Enums.Platform.拳探), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler);
+
+ //Task.Factory.StartNew(() => DeliveryCallbackForPurchaseOrder(request.OrderId, new WayBillNoResponse()
+ //{
+ // LogisticsCompanyId = request.ExpressId,
+ // LogisticsCompanyName = request.ExpressName,
+ // WayBillNo = request.WayBillNo,
+ //}, Enums.Platform.拳探), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler);
}
#endregion
///
- /// 采购平台发货回调
+ /// 采购平台发货回调(一件代发)
///
///
///
@@ -535,26 +542,29 @@ namespace BBWY.Server.Business
}
}
- /////
- ///// 物流公司翻译, 将发货平台的物流公司翻译为店铺平台的物流公司
- /////
- /////
- /////
- /////
- /////
- //private string ConvertLogisticsCompanyId(string sourceLogisticsCompanyName, IList targetLogisticsList, Enums.Platform tagetLogisticsPlatform)
- //{
- // var match = Regex.Match(sourceLogisticsCompanyName, "(中通|圆通|申通|顺丰|韵达|邮政快递包裹|平邮|EMS|德邦|百世|天天|优速)");
- // if (match.Success)
- // {
- // var sname = match.Groups[1].Value;
- // var targetLogistics = targetLogisticsList.FirstOrDefault(t => t.Name.Contains(sname));
- // if (targetLogistics != null)
- // return targetLogistics.Id;
- // }
- // return deliverySelfDic[tagetLogisticsPlatform];
- //}
+ ///
+ /// 采购平台发货回调(采购单)
+ ///
+ ///
+ ///
+ ///
+ private void DeliveryCallbackForPurchaseOrder(string purchaseOrderId, WayBillNoResponse wayBillNoResponse, Enums.Platform callbackPlatform)
+ {
+ var msg = $"DeliveryCallbackForPurchaseOrder purchaseOrderId:{purchaseOrderId},wayBillNoResponse:{JsonConvert.SerializeObject(wayBillNoResponse)},callbackPlatform:{callbackPlatform}";
+ try
+ {
+ nLogManager.Default().Info(msg);
+
+ var purchaseOrderV2 = fsql.Select(purchaseOrderId).ToOne();
+ if (purchaseOrderV2 == null)
+ throw new Exception("未查询到采购单信息");
+ }
+ catch (Exception ex)
+ {
+ nLogManager.Default().Error(ex, msg);
+ }
+ }
///
/// 采购平台改价回调
diff --git a/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs b/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
index 4166ce8f..6a6d27e3 100644
--- a/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
+++ b/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
@@ -3,7 +3,6 @@ using BBWY.Server.Model;
using BBWY.Server.Model.Db;
using BBWY.Server.Model.Dto;
using FreeSql;
-using Jd.Api.Domain;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
@@ -11,7 +10,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yitter.IdGenerator;
-using static System.Net.Mime.MediaTypeNames;
namespace BBWY.Server.Business
{