Commit 6745d148 authored by 黄奎's avatar 黄奎

页面修改

parent 13bb1c74
......@@ -40,6 +40,11 @@ namespace Edu.Model.ViewModel.Customer
/// </summary>
public int FollowCount { get; set; }
/// <summary>
/// 单资源回访平均数
/// </summary>
public decimal FollowEffectiveCount { get; set; }
/// <summary>
/// 单资源回访平均数~~~就是一条资源跟进了几次 【平均】
/// </summary>
......
......@@ -457,27 +457,27 @@ namespace Edu.Module.Customer
{
if (sItem.Key == "today")
{
model.AgFollow = sItem.Value?.Where(qitem => qitem.CreateBy == item.Id)?.FirstOrDefault()?.FollowCount ?? 0;
model.AgFollow = sItem.Value?.FirstOrDefault()?.FollowEffectiveCount ?? 0;
}
else if (sItem.Key == "yestoday")
{
model.YestodayAgFollow = sItem.Value?.Where(qitem => qitem.CreateBy == item.Id)?.FirstOrDefault()?.FollowCount ?? 0;
model.YestodayAgFollow = sItem.Value?.FirstOrDefault()?.FollowEffectiveCount ?? 0;
}
else if (sItem.Key == "currentWeek")
{
model.CurWeekAgFollow = sItem.Value?.Where(qitem => qitem.CreateBy == item.Id)?.FirstOrDefault()?.FollowCount ?? 0;
model.CurWeekAgFollow = sItem.Value?.FirstOrDefault()?.FollowEffectiveCount ?? 0;
}
else if (sItem.Key == "lastWeek")
{
model.LastWeekAgFollow = sItem.Value?.Where(qitem => qitem.CreateBy == item.Id)?.FirstOrDefault()?.FollowCount ?? 0;
model.LastWeekAgFollow = sItem.Value?.FirstOrDefault()?.FollowEffectiveCount ?? 0;
}
else if (sItem.Key == "curMonth")
{
model.CurMonthAgFollow = sItem.Value?.Where(qitem => qitem.CreateBy == item.Id)?.FirstOrDefault()?.FollowCount ?? 0;
model.CurMonthAgFollow = sItem.Value?.FirstOrDefault()?.FollowEffectiveCount ?? 0;
}
else if (sItem.Key == "lastMonth")
{
model.LastMonthAgFollow = sItem.Value?.Where(qitem => qitem.CreateBy == item.Id)?.FirstOrDefault()?.FollowCount ?? 0;
model.LastMonthAgFollow = sItem.Value?.FirstOrDefault()?.FollowEffectiveCount ?? 0;
}
}
}
......@@ -700,12 +700,12 @@ namespace Edu.Module.Customer
CurMonthFollow = yesDataList?.Sum(qitem => qitem.CurMonthFollow) ?? 0,
LastMonthFollow = yesDataList?.Sum(qitem => qitem.LastMonthFollow) ?? 0,
AgFollow = yesDataList?.Sum(qitem => qitem.AgFollow) ?? 0,
YestodayAgFollow = yesDataList?.Sum(qitem => qitem.YestodayAgFollow) ?? 0,
CurWeekAgFollow = yesDataList?.Sum(qitem => qitem.CurWeekAgFollow) ?? 0,
LastWeekAgFollow = yesDataList?.Sum(qitem => qitem.LastWeekAgFollow) ?? 0,
CurMonthAgFollow = yesDataList?.Sum(qitem => qitem.CurMonthAgFollow) ?? 0,
LastMonthAgFollow = yesDataList?.Sum(qitem => qitem.LastMonthAgFollow) ?? 0,
AgFollow = yesDataList?.Average(qitem => qitem.AgFollow) ?? 0,
YestodayAgFollow = yesDataList?.Average(qitem => qitem.YestodayAgFollow) ?? 0,
CurWeekAgFollow = yesDataList?.Average(qitem => qitem.CurWeekAgFollow) ?? 0,
LastWeekAgFollow = yesDataList?.Average(qitem => qitem.LastWeekAgFollow) ?? 0,
CurMonthAgFollow = yesDataList?.Average(qitem => qitem.CurMonthAgFollow) ?? 0,
LastMonthAgFollow = yesDataList?.Average(qitem => qitem.LastMonthAgFollow) ?? 0,
CurWeekOrderNum = yesDataList?.Sum(qitem => qitem.CurWeekOrderNum) ?? 0,
LastWeekOrderNum = yesDataList?.Sum(qitem => qitem.LastWeekOrderNum) ?? 0,
......
......@@ -373,7 +373,7 @@ WHERE A.Status=0 {0}
whereStr += string.Format(" AND CreateBy={0} ", query.CreateBy);
}
string sql = @"
SELECT Avg(FollowCount) AS AgFollow FROM
SELECT Avg(FollowCount) AS FollowEffectiveCount FROM
(
SELECT A.StuId,COUNT(1) AS FollowCount
FROM rb_student_follow AS A
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment