|
|
@ -21,10 +21,12 @@ namespace BBWYB.Server.Business |
|
|
|
{ |
|
|
|
private OP_PlatformClientFactory opPlatformClientFactory; |
|
|
|
private RestApiService restApiService; |
|
|
|
private IList<Enums.PackConfigState?> waitConfigStateList; |
|
|
|
public OrderBusiness(IFreeSql fsql, NLogManager nLogManager, IIdGenerator idGenerator, OP_PlatformClientFactory opPlatformClientFactory, RestApiService restApiService) : base(fsql, nLogManager, idGenerator) |
|
|
|
{ |
|
|
|
this.opPlatformClientFactory = opPlatformClientFactory; |
|
|
|
this.restApiService = restApiService; |
|
|
|
waitConfigStateList = new List<Enums.PackConfigState?>() { Enums.PackConfigState.待配置, Enums.PackConfigState.需修改 }; |
|
|
|
} |
|
|
|
|
|
|
|
private ISelect<Order, OrderConsignee, OrderCost> GetOrderListQueryConditions(QueryOrderRequest request) |
|
|
@ -47,7 +49,7 @@ namespace BBWYB.Server.Business |
|
|
|
.WhereIf(!string.IsNullOrEmpty(request.Sku), osku => osku.SkuId == request.Sku) |
|
|
|
.WhereIf(!string.IsNullOrEmpty(request.SourceSku), osku => osku.BelongSkuId == request.SourceSku) |
|
|
|
.WhereIf(!string.IsNullOrEmpty(request.ProductId), osku => osku.ProductId == request.ProductId) |
|
|
|
.WhereIf(request.IsWaitConfig, osku => osku.PackConfigState == Enums.PackConfigState.待配置 || osku.PackConfigState == null); |
|
|
|
.WhereIf(request.IsWaitConfig, osku => waitConfigStateList.Contains(osku.PackConfigState) || osku.PackConfigState == null); |
|
|
|
select = select.WhereIf(request.IsWaitConfig, (o, ocs, oct) => o.OrderState != Enums.OrderState.已取消) |
|
|
|
.WhereIf(request.IsWaitConfig, (o, ocs, oct) => o.IntoStoreType == Enums.IntoStoreType.发回齐越) |
|
|
|
.WhereIf(request.IsWaitConfig, (o, ocs, oct) => o.IsPurchased == true) |
|
|
@ -640,7 +642,7 @@ namespace BBWYB.Server.Business |
|
|
|
OrderCount = g.Count() |
|
|
|
}); |
|
|
|
|
|
|
|
var childSelect = fsql.Select<OrderSku>().As("osku").Where(osku => osku.PackConfigState == Enums.PackConfigState.待配置 || osku.PackConfigState == null); |
|
|
|
var childSelect = fsql.Select<OrderSku>().As("osku").Where(osku => waitConfigStateList.Contains(osku.PackConfigState) || osku.PackConfigState == null); |
|
|
|
var waitConfigCount = fsql.Select<Order>().Where(o => o.ShopId == shopId) |
|
|
|
.Where(o => !noOrderStateList.Contains(o.OrderState.Value)) |
|
|
|
.Where(o => o.IntoStoreType == Enums.IntoStoreType.发回齐越) |
|
|
@ -662,5 +664,14 @@ namespace BBWYB.Server.Business |
|
|
|
WaitConfigCount = waitConfigCount, |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 齐库推送sku配置状态
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="request"></param>
|
|
|
|
public void QikuPublishOrderSkuPackConfigState(QikuPublishOrderSkuPackConfigStateRequest request) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|