Browse Source

1

AddValidOverTime
shanji 2 years ago
parent
commit
ffa9cd871c
  1. 50
      BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs
  2. 2
      BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs

50
BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs

@ -419,11 +419,18 @@ namespace BBWY.Server.Business
LogisticsCompanyName = request.ExpressName, LogisticsCompanyName = request.ExpressName,
WayBillNo = request.WayBillNo, WayBillNo = request.WayBillNo,
}, Enums.Platform.), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); }, 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 #endregion
/// <summary> /// <summary>
/// 采购平台发货回调 /// 采购平台发货回调(一件代发)
/// </summary> /// </summary>
/// <param name="purchaseOrderId"></param> /// <param name="purchaseOrderId"></param>
/// <param name="wayBillNoResponse"></param> /// <param name="wayBillNoResponse"></param>
@ -535,26 +542,29 @@ namespace BBWY.Server.Business
} }
} }
///// <summary> /// <summary>
///// 物流公司翻译, 将发货平台的物流公司翻译为店铺平台的物流公司 /// 采购平台发货回调(采购单)
///// </summary> /// </summary>
///// <param name="sourceLogisticsCompanyName"></param> /// <param name="purchaseOrderId"></param>
///// <param name="targetLogisticsList"></param> /// <param name="wayBillNoResponse"></param>
///// <param name="tagetLogisticsPlatform"></param> /// <param name="callbackPlatform"></param>
///// <returns></returns> private void DeliveryCallbackForPurchaseOrder(string purchaseOrderId, WayBillNoResponse wayBillNoResponse, Enums.Platform callbackPlatform)
//private string ConvertLogisticsCompanyId(string sourceLogisticsCompanyName, IList<LogisticsResponse> targetLogisticsList, Enums.Platform tagetLogisticsPlatform) {
//{ var msg = $"DeliveryCallbackForPurchaseOrder purchaseOrderId:{purchaseOrderId},wayBillNoResponse:{JsonConvert.SerializeObject(wayBillNoResponse)},callbackPlatform:{callbackPlatform}";
// var match = Regex.Match(sourceLogisticsCompanyName, "(中通|圆通|申通|顺丰|韵达|邮政快递包裹|平邮|EMS|德邦|百世|天天|优速)"); try
// if (match.Success) {
// { nLogManager.Default().Info(msg);
// var sname = match.Groups[1].Value;
// var targetLogistics = targetLogisticsList.FirstOrDefault(t => t.Name.Contains(sname));
// if (targetLogistics != null)
// return targetLogistics.Id;
// }
// return deliverySelfDic[tagetLogisticsPlatform];
//}
var purchaseOrderV2 = fsql.Select<PurchaseOrderV2>(purchaseOrderId).ToOne();
if (purchaseOrderV2 == null)
throw new Exception("未查询到采购单信息");
}
catch (Exception ex)
{
nLogManager.Default().Error(ex, msg);
}
}
/// <summary> /// <summary>
/// 采购平台改价回调 /// 采购平台改价回调

2
BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs

@ -3,7 +3,6 @@ using BBWY.Server.Model;
using BBWY.Server.Model.Db; using BBWY.Server.Model.Db;
using BBWY.Server.Model.Dto; using BBWY.Server.Model.Dto;
using FreeSql; using FreeSql;
using Jd.Api.Domain;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System; using System;
@ -11,7 +10,6 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Yitter.IdGenerator; using Yitter.IdGenerator;
using static System.Net.Mime.MediaTypeNames;
namespace BBWY.Server.Business namespace BBWY.Server.Business
{ {

Loading…
Cancel
Save