From a84bfb9d551205bdacac8e3bcdb9affa9378dfa2 Mon Sep 17 00:00:00 2001 From: feng <279202647@qq.com> Date: Thu, 26 May 2022 14:32:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=88=E6=A0=BC=E7=8E=87?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HuiYan/teamitemsBusiness.cs | 29 +++++++++++-------- .../齐越慧眼/齐越慧眼/MainWindow.xaml | 2 +- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs b/src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs index dd0fb79..3776035 100644 --- a/src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs +++ b/src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs @@ -354,8 +354,8 @@ namespace Coldairarrow.Business.HuiYan FailedCount = list.Count(c => c.IsPass==false), }; - if (list.Count > 0) { - model.PassRate = Math.Round(((decimal)model.PassCount / list.Count) * 100, 2); + if (model.OverCount > 0) { + model.PassRate = Math.Round(((decimal)model.PassCount / model.OverCount) * 100, 2); } return model; } @@ -386,13 +386,18 @@ namespace Coldairarrow.Business.HuiYan var where = LinqHelper.True(); - start=new DateTime(start.Year, start.Month, start.Day); + start = new DateTime(start.Year, start.Month, start.Day); end = new DateTime(end.Year, end.Month, end.Day, 23, 59, 59); - where = where.And(c => c.PriceTaskCreateDate >= start && c.PriceTaskCreateDate <= end); + //where = where.And(c => c.PriceTaskCreateDate >= start && c.PriceTaskCreateDate <= end); var list = q.Where(where).ToList(); + int waitOver = list.Count(c => c.TeamItemState == TeamItemState.已发布比价 && !string.IsNullOrEmpty(c.PriceTaskUserId) && c.State != PriceTaskState.比价完成); + int waitCheck = list.Count(c => c.TeamItemState == TeamItemState.已发布比价 && string.IsNullOrEmpty(c.PriceTaskUserId)); + + + list = list.Where(c => c.PriceTaskCreateDate >= start && c.PriceTaskCreateDate <= end).ToList(); Expression> select2 = (a, b) => new TaskInfoDto { @@ -438,9 +443,9 @@ namespace Coldairarrow.Business.HuiYan }; - if (list.Count > 0) + if (jtInfo.OverCount > 0) { - jtInfo.PassRate = Math.Round(((decimal)jtInfo.PassCount / list.Count) * 100, 2); + jtInfo.PassRate = Math.Round(((decimal)jtInfo.PassCount / jtInfo.OverCount) * 100, 2); } var fbList= new List(); @@ -463,9 +468,9 @@ namespace Coldairarrow.Business.HuiYan - if (sonList.Count > 0) + if (price.OverCount > 0) { - price.PassRate = Math.Round(((decimal)price.PassCount / sonList.Count) * 100, 2); + price.PassRate = Math.Round(((decimal)price.PassCount / price.OverCount) * 100, 2); } fbList.Add(price); @@ -489,9 +494,9 @@ namespace Coldairarrow.Business.HuiYan NeedWorkCount = sonList.Count(c => c.State != PriceTaskState.比价完成) }; - if (sonList.Count > 0) + if (price.OverCount > 0) { - price.PassRate = Math.Round(((decimal)price.PassCount / sonList.Count) * 100, 2); + price.PassRate = Math.Round(((decimal)price.PassCount / price.OverCount) * 100, 2); } bjList.Add(price); @@ -502,9 +507,9 @@ namespace Coldairarrow.Business.HuiYan var result = new { //待完成 - WaitOver = list.Count(c => c.TeamItemState == TeamItemState.已发布比价 &&!string.IsNullOrEmpty( c.PriceTaskUserId)&& c.State != PriceTaskState.比价完成), + WaitOver = waitOver, //待接入 - WaitCheck= list.Count(c => c.TeamItemState == TeamItemState.已发布比价 && string.IsNullOrEmpty(c.PriceTaskUserId) ), + WaitCheck= waitCheck, JT=new List() { jtInfo }, FB=fbList, BJ=bjList diff --git a/客户端/齐越慧眼/齐越慧眼/MainWindow.xaml b/客户端/齐越慧眼/齐越慧眼/MainWindow.xaml index 02eb719..989da58 100644 --- a/客户端/齐越慧眼/齐越慧眼/MainWindow.xaml +++ b/客户端/齐越慧眼/齐越慧眼/MainWindow.xaml @@ -11,7 +11,7 @@ WindowStartupLocation="CenterScreen" ActiveGlowColor="{DynamicResource PrimaryColor}" Height="780" - Title="慧眼 V1.0.0.3" + Title="慧眼 V1.0.0.4" Width="1468" Icon="/icon.ico" >