Browse Source

修改合格率计算公式

master
feng 3 years ago
parent
commit
a84bfb9d55
  1. 27
      src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs
  2. 2
      客户端/齐越慧眼/齐越慧眼/MainWindow.xaml

27
src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs

@ -354,8 +354,8 @@ namespace Coldairarrow.Business.HuiYan
FailedCount = list.Count(c => c.IsPass==false), FailedCount = list.Count(c => c.IsPass==false),
}; };
if (list.Count > 0) { if (model.OverCount > 0) {
model.PassRate = Math.Round(((decimal)model.PassCount / list.Count) * 100, 2); model.PassRate = Math.Round(((decimal)model.PassCount / model.OverCount) * 100, 2);
} }
return model; return model;
} }
@ -389,10 +389,15 @@ namespace Coldairarrow.Business.HuiYan
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); 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(); 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<Func<TaskInfoDto, userdepartment, TaskInfoDto>> select2 = (a, b) => new TaskInfoDto Expression<Func<TaskInfoDto, userdepartment, TaskInfoDto>> 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<PriceTaskInfo>(); var fbList= new List<PriceTaskInfo>();
@ -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); fbList.Add(price);
@ -489,9 +494,9 @@ namespace Coldairarrow.Business.HuiYan
NeedWorkCount = sonList.Count(c => c.State != PriceTaskState.) 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); bjList.Add(price);
@ -502,9 +507,9 @@ namespace Coldairarrow.Business.HuiYan
var result = new 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<PriceTaskInfo>() { jtInfo }, JT=new List<PriceTaskInfo>() { jtInfo },
FB=fbList, FB=fbList,
BJ=bjList BJ=bjList

2
客户端/齐越慧眼/齐越慧眼/MainWindow.xaml

@ -11,7 +11,7 @@
WindowStartupLocation="CenterScreen" WindowStartupLocation="CenterScreen"
ActiveGlowColor="{DynamicResource PrimaryColor}" ActiveGlowColor="{DynamicResource PrimaryColor}"
Height="780" Height="780"
Title="慧眼 V1.0.0.3" Title="慧眼 V1.0.0.4"
Width="1468" Icon="/icon.ico" Width="1468" Icon="/icon.ico"
> >
<Border Padding="0 10" Background="#EEEEEE"> <Border Padding="0 10" Background="#EEEEEE">

Loading…
Cancel
Save