From 4d6af13af52301d2c1e1b11e66bc12352812a27c Mon Sep 17 00:00:00 2001 From: sanji Date: Thu, 21 Dec 2023 15:49:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AE=A2=E5=8D=95=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Statistics/StatisticsBusiness.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/BBWY.Server.Business/Statistics/StatisticsBusiness.cs b/BBWY.Server.Business/Statistics/StatisticsBusiness.cs index 79677e74..719ecead 100644 --- a/BBWY.Server.Business/Statistics/StatisticsBusiness.cs +++ b/BBWY.Server.Business/Statistics/StatisticsBusiness.cs @@ -372,12 +372,16 @@ namespace BBWY.Server.Business o.OrderState == Enums.OrderState.等待采购 && o.StartTime >= dt).Count(); response.ExceptionCount = fsql.Select().LeftJoin((o, oc) => o.Id == oc.OrderId) - .Where((o, oc) => o.ShopId == shopId && o.StartTime >= dt && + .Where((o, oc) => o.ShopId == shopId && + o.StartTime >= dt && o.IsGift == false && - 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.PingTaiChengDanYouHuiQuan) || - (o.StorageType == null && o.OrderState != Enums.OrderState.等待采购))).Count(); + ((o.OrderState != Enums.OrderState.已取消 && + o.StorageType != Enums.StorageType.SD && + o.StorageType != null && + (oc.PurchaseAmount == 0M || oc.Profit < 0)) || + (o.StorageType == null && + o.OrderState != Enums.OrderState.等待采购 && + o.OrderState != Enums.OrderState.待付款))).Count(); response.WaitOutStoreCount = fsql.Select().Where(o => o.ShopId == shopId && o.OrderState == Enums.OrderState.待出库 && o.StartTime >= dt && o.IsGift == false).Count();