|
@ -569,7 +569,7 @@ namespace SiNan.Business |
|
|
var list = new List<GOIBySpu>(); |
|
|
var list = new List<GOIBySpu>(); |
|
|
request.EndTime = request.EndTime.Date.AddDays(1).AddSeconds(-1); |
|
|
request.EndTime = request.EndTime.Date.AddDays(1).AddSeconds(-1); |
|
|
var productSkuList = fsql.Select<ProductSku>().Where(ps => request.SpuIdList.Contains(ps.ProductId)).ToList(); |
|
|
var productSkuList = fsql.Select<ProductSku>().Where(ps => request.SpuIdList.Contains(ps.ProductId)).ToList(); |
|
|
var skuIdList = productSkuList.Select(ps => ps.ProductId).Distinct().ToList(); |
|
|
var skuIdList = productSkuList.Select(ps => ps.Id).Distinct().ToList(); |
|
|
var goiList = StatisticsProductLevelGOI(skuIdList, request.StartTime, request.EndTime); |
|
|
var goiList = StatisticsProductLevelGOI(skuIdList, request.StartTime, request.EndTime); |
|
|
foreach (var spu in request.SpuIdList) |
|
|
foreach (var spu in request.SpuIdList) |
|
|
{ |
|
|
{ |
|
@ -581,6 +581,7 @@ namespace SiNan.Business |
|
|
Cost = currentGoiList.Sum(g => g.Cost), |
|
|
Cost = currentGoiList.Sum(g => g.Cost), |
|
|
Profit = currentGoiList.Sum(g => g.Profit), |
|
|
Profit = currentGoiList.Sum(g => g.Profit), |
|
|
}; |
|
|
}; |
|
|
|
|
|
list.Add(goi); |
|
|
} |
|
|
} |
|
|
return new ListResponse<GOIBySpu>() |
|
|
return new ListResponse<GOIBySpu>() |
|
|
{ |
|
|
{ |
|
|