|
@ -7,6 +7,7 @@ using FreeSql; |
|
|
using Microsoft.Extensions.Options; |
|
|
using Microsoft.Extensions.Options; |
|
|
using Newtonsoft.Json; |
|
|
using Newtonsoft.Json; |
|
|
using Newtonsoft.Json.Linq; |
|
|
using Newtonsoft.Json.Linq; |
|
|
|
|
|
using QuanTan.SDK.Model; |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
@ -393,7 +394,7 @@ namespace BBWY.Server.Business |
|
|
private void DeliveryCallbackFrom1688(JObject jObject) |
|
|
private void DeliveryCallbackFrom1688(JObject jObject) |
|
|
{ |
|
|
{ |
|
|
var purchaseOrderId = jObject["data"].Value<string>("orderId"); |
|
|
var purchaseOrderId = jObject["data"].Value<string>("orderId"); |
|
|
Task.Factory.StartNew(() => DeliveryCallback(purchaseOrderId, Enums.Platform.阿里巴巴), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); |
|
|
Task.Factory.StartNew(() => DeliveryCallback(purchaseOrderId, null, Enums.Platform.阿里巴巴), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
@ -407,12 +408,25 @@ namespace BBWY.Server.Business |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 拳探回调
|
|
|
|
|
|
public void QuanTan_SendGoodsCallback(QuanTanSendGoodsNotifyRequest request) |
|
|
|
|
|
{ |
|
|
|
|
|
Task.Factory.StartNew(() => DeliveryCallback(request.OrderId, new WayBillNoResponse() |
|
|
|
|
|
{ |
|
|
|
|
|
LogisticsCompanyId = request.ExpressId, |
|
|
|
|
|
LogisticsCompanyName = request.ExpressName, |
|
|
|
|
|
WayBillNo = request.WayBillNo, |
|
|
|
|
|
}, Enums.Platform.拳探), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.PurchaseOrderCallbackTaskScheduler); |
|
|
|
|
|
} |
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 采购平台发货回调
|
|
|
/// 采购平台发货回调
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <param name="purchaseOrderId"></param>
|
|
|
/// <param name="purchaseOrderId"></param>
|
|
|
|
|
|
/// <param name="wayBillNoResponse"></param>
|
|
|
/// <param name="callbackPlatform"></param>
|
|
|
/// <param name="callbackPlatform"></param>
|
|
|
private void DeliveryCallback(string purchaseOrderId, Enums.Platform callbackPlatform) |
|
|
private void DeliveryCallback(string purchaseOrderId, WayBillNoResponse wayBillNoResponse, Enums.Platform callbackPlatform) |
|
|
{ |
|
|
{ |
|
|
string currentProgress = string.Empty; |
|
|
string currentProgress = string.Empty; |
|
|
string wayBillNoResponseInfo = string.Empty; |
|
|
string wayBillNoResponseInfo = string.Empty; |
|
@ -464,7 +478,9 @@ namespace BBWY.Server.Business |
|
|
OrderId = purchaseOrderId, |
|
|
OrderId = purchaseOrderId, |
|
|
Platform = callbackPlatform |
|
|
Platform = callbackPlatform |
|
|
}; |
|
|
}; |
|
|
var wayBillNoResponse = platformSDKBusinessList.FirstOrDefault(p => p.Platform == callbackPlatform).GetWayBillNoByOrderId(queryOrderWayBillNoRequest); |
|
|
|
|
|
|
|
|
if (wayBillNoResponse == null) |
|
|
|
|
|
wayBillNoResponse = platformSDKBusinessList.FirstOrDefault(p => p.Platform == callbackPlatform).GetWayBillNoByOrderId(queryOrderWayBillNoRequest); |
|
|
|
|
|
|
|
|
wayBillNoResponseInfo = JsonConvert.SerializeObject(new { Request = queryOrderWayBillNoRequest, Result = wayBillNoResponse }); |
|
|
wayBillNoResponseInfo = JsonConvert.SerializeObject(new { Request = queryOrderWayBillNoRequest, Result = wayBillNoResponse }); |
|
|
#endregion
|
|
|
#endregion
|
|
|