|
@ -207,8 +207,10 @@ namespace BBWY.Server.Business |
|
|
public BatchCreareOrderResponse BatchCreateOrder(BatchPurchaseCreateOrderRequest request) |
|
|
public BatchCreareOrderResponse BatchCreateOrder(BatchPurchaseCreateOrderRequest request) |
|
|
{ |
|
|
{ |
|
|
/* |
|
|
/* |
|
|
下单报价日志 |
|
|
下单日志 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
var loggerName = $"批量采购-{request.ShopName}"; |
|
|
|
|
|
nLogManager.GetLogger(loggerName).Info(JsonConvert.SerializeObject(request)); |
|
|
|
|
|
|
|
|
if (request.ProductParamList == null || request.ProductParamList.Count() == 0) |
|
|
if (request.ProductParamList == null || request.ProductParamList.Count() == 0) |
|
|
throw new BusinessException("缺少商品参数"); |
|
|
throw new BusinessException("缺少商品参数"); |
|
@ -250,13 +252,18 @@ namespace BBWY.Server.Business |
|
|
|
|
|
|
|
|
#region 处理JD SKU和拳探SKU的对应关系
|
|
|
#region 处理JD SKU和拳探SKU的对应关系
|
|
|
var belongSkus_mappingList = new List<JObject>(); |
|
|
var belongSkus_mappingList = new List<JObject>(); |
|
|
foreach (var belongSkuGroup in belongSkuGroups) |
|
|
if (purchasePlatform == Enums.Platform.拳探) |
|
|
{ |
|
|
{ |
|
|
var firstProductParam = belongSkuGroup.FirstOrDefault(); |
|
|
foreach (var belongSkuGroup in belongSkuGroups) |
|
|
if (!belongSkus_mappingList.Any(j => j.Value<string>("BelongSkuId") == firstProductParam.BelongSkuId)) |
|
|
|
|
|
{ |
|
|
{ |
|
|
belongSkus_mappingList.Add(JObject.FromObject(new { firstProductParam.BelongSkuId, SkuId = firstProductParam.PurchaseSkuId })); |
|
|
var firstProductParam = belongSkuGroup.FirstOrDefault(); |
|
|
|
|
|
if (!belongSkus_mappingList.Any(j => j.Value<string>("BelongSkuId") == firstProductParam.BelongSkuId)) |
|
|
|
|
|
{ |
|
|
|
|
|
belongSkus_mappingList.Add(JObject.FromObject(new { firstProductParam.BelongSkuId, SkuId = firstProductParam.PurchaseSkuId })); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (belongSkus_mappingList.Count() == 0) |
|
|
|
|
|
throw new BusinessException("缺少来源SKU信息"); |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|