|
|
@ -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 |
|
|
|