|
@ -382,7 +382,8 @@ namespace BBWY.Server.Business |
|
|
SkuAmount = purchaseOrderSimpleInfo.ProductAmount, |
|
|
SkuAmount = purchaseOrderSimpleInfo.ProductAmount, |
|
|
PurchaseFreight = purchaseOrderSimpleInfo.FreightAmount, |
|
|
PurchaseFreight = purchaseOrderSimpleInfo.FreightAmount, |
|
|
PurchaseOrderId = createOrderResponse.PurchaseOrderId, |
|
|
PurchaseOrderId = createOrderResponse.PurchaseOrderId, |
|
|
PurchasePlatform = createOnlinePurchaseOrderRequest.Platform |
|
|
PurchasePlatform = createOnlinePurchaseOrderRequest.Platform, |
|
|
|
|
|
ShopId = dbOrder.ShopId |
|
|
}; |
|
|
}; |
|
|
insertOrderDropShipping = fsql.Insert(orderDropShipping); |
|
|
insertOrderDropShipping = fsql.Insert(orderDropShipping); |
|
|
#endregion
|
|
|
#endregion
|
|
@ -455,6 +456,7 @@ namespace BBWY.Server.Business |
|
|
string logisticsCompanyListInfo = string.Empty; |
|
|
string logisticsCompanyListInfo = string.Empty; |
|
|
string logisticsCompanyId = string.Empty; |
|
|
string logisticsCompanyId = string.Empty; |
|
|
string orderId = string.Empty; |
|
|
string orderId = string.Empty; |
|
|
|
|
|
long? shopId = null; |
|
|
OutStockRequest outStockRequest = null; |
|
|
OutStockRequest outStockRequest = null; |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
@ -466,11 +468,25 @@ namespace BBWY.Server.Business |
|
|
orderId = orderDropshipping.OrderId; |
|
|
orderId = orderDropshipping.OrderId; |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 查询订单
|
|
|
|
|
|
if (orderDropshipping.ShopId == null) |
|
|
|
|
|
{ |
|
|
|
|
|
var order = fsql.Select<Order>(orderId).ToOne(); |
|
|
|
|
|
if (order == null) |
|
|
|
|
|
throw new Exception("未查询到订单"); |
|
|
|
|
|
shopId = order.ShopId; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
shopId = orderDropshipping.ShopId.Value; |
|
|
|
|
|
} |
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
#region 查询采购账号
|
|
|
#region 查询采购账号
|
|
|
currentProgress = "查询采购账号"; |
|
|
currentProgress = "查询采购账号"; |
|
|
var purchaseAccount = fsql.Select<PurchaseAccount>().WhereIf(orderDropshipping.PurchaseAccountId != 0, pa => pa.Id == orderDropshipping.PurchaseAccountId) |
|
|
var purchaseAccount = fsql.Select<PurchaseAccount>().WhereIf(orderDropshipping.PurchaseAccountId != 0, pa => pa.Id == orderDropshipping.PurchaseAccountId) |
|
|
.WhereIf(orderDropshipping.PurchaseAccountId == 0, pa => pa.AccountName == orderDropshipping.BuyerAccount) |
|
|
.WhereIf(orderDropshipping.PurchaseAccountId == 0, pa => pa.AccountName == orderDropshipping.BuyerAccount) |
|
|
.Where(pa => pa.PurchasePlatformId == callbackPlatform).ToOne(); |
|
|
.Where(pa => pa.PurchasePlatformId == callbackPlatform && pa.ShopId == shopId.Value).ToOne(); |
|
|
if (purchaseAccount == null) |
|
|
if (purchaseAccount == null) |
|
|
throw new Exception($"未查询到采购账号{orderDropshipping.BuyerAccount}"); |
|
|
throw new Exception($"未查询到采购账号{orderDropshipping.BuyerAccount}"); |
|
|
#endregion
|
|
|
#endregion
|
|
|