Browse Source

修改合格率计算公式

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

29
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<TaskInfoDto>();
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<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>();
@ -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<PriceTaskInfo>() { jtInfo },
FB=fbList,
BJ=bjList

2
客户端/齐越慧眼/齐越慧眼/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"
>
<Border Padding="0 10" Background="#EEEEEE">

Loading…
Cancel
Save