diff --git a/BBWY.Server.Business/Statistics/StatisticsBusiness.cs b/BBWY.Server.Business/Statistics/StatisticsBusiness.cs index 76abb29b..df054738 100644 --- a/BBWY.Server.Business/Statistics/StatisticsBusiness.cs +++ b/BBWY.Server.Business/Statistics/StatisticsBusiness.cs @@ -263,14 +263,11 @@ namespace BBWY.Server.Business o.OrderState == Enums.OrderState.等待采购).Count(); response.ExceptionCount = fsql.Select().LeftJoin((o, oc) => o.Id == oc.OrderId) - .Where((o, oc) => o.ShopId == shopId && o.StartTime >= startDate && - o.StartTime <= endDate && - o.StorageType != null && o.StorageType != Enums.StorageType.SD && - (oc.PurchaseAmount == 0M || - oc.PurchaseAmount + - oc.DeliveryExpressFreight > - o.OrderSellerPrice + - o.FreightPrice)).Count(); + .Where((o, oc) => o.ShopId == shopId && o.StartTime >= startDate && o.StartTime <= endDate && + o.OrderState != Enums.OrderState.已取消 && + ((o.StorageType != Enums.StorageType.SD && o.StorageType != null && oc.PurchaseAmount == 0M) || + (o.StorageType != Enums.StorageType.SD && oc.PurchaseAmount + oc.DeliveryExpressFreight > o.OrderSellerPrice + o.FreightPrice) || + (o.StorageType == null && o.OrderState != Enums.OrderState.等待采购))).Count(); return response; } }