Commit 51756881 authored by 黄奎's avatar 黄奎

页面修改

parent d2c0f876
......@@ -1381,34 +1381,33 @@ namespace Edu.Module.Customer
});
}
}
var cusIds = string.Join(",", dataList.Where(qitem => qitem.CreateType == StuCreateTypeEnum.CustomerInput).Select(qitem => qitem.StuSourceId));
List<RB_Customer_Extend> customerList = new List<RB_Customer_Extend>();
if (!string.IsNullOrEmpty(cusIds))
{
customerList = customerRepository.GetCustomerListRepository(new RB_Customer_Extend() { CustomerIds = cusIds });
}
var sourceTypeList = dataList?.Where(qitem => qitem.CreateType == StuCreateTypeEnum.CustomerInput)
?.GroupBy(qitem => new { qitem.CustomerType })
?.Select(qitem => new { qitem.Key.CustomerType });
var catetoryTypeList = dataList?.Where(qitem => qitem.CreateType == StuCreateTypeEnum.CustomerInput)
?.GroupBy(qitem => new { qitem.CatetoryType })
?.Select(qitem => new { qitem.Key.CatetoryType });
foreach (var sItem in sourceTypeList)
foreach (var sItem in catetoryTypeList)
{
var sourceIdList = dataList?.Where(qitem => qitem.CreateType == StuCreateTypeEnum.CustomerInput && qitem.CustomerType == sItem.CustomerType)
?.GroupBy(qitem => new { qitem.StuSourceId })
?.Select(qitem => new { qitem.Key.StuSourceId });
var sourceIdList = dataList?.Where(qitem => qitem.CreateType == StuCreateTypeEnum.CustomerInput && qitem.CatetoryType == sItem.CatetoryType)
?.GroupBy(qitem => new { qitem.CategoryId })
?.Select(qitem => new { qitem.Key.CategoryId });
foreach (var subItem in sourceIdList)
{
var tempCusList = dataList?.Where(qitem => qitem.CreateType == StuCreateTypeEnum.CustomerInput && qitem.StuSourceId == subItem.StuSourceId)?.ToList();
var tempCusList = dataList?.Where(qitem => qitem.CreateType == StuCreateTypeEnum.CustomerInput && qitem.CategoryId == subItem.CategoryId)?.ToList();
var tempCustomer = customerList?.FirstOrDefault(qitem => qitem.CategoryId == subItem.CategoryId);
//企业同行
if (sItem.CustomerType == Common.Enum.Customer.CatetoryTypeEnum.Company)
if (sItem.CatetoryType == CatetoryTypeEnum.Company)
{
list.Add(new MarketChannelStaticModel()
{
ChannelName = "(企业)" + (customerList?.FirstOrDefault(qitem => qitem.CustomerId == subItem.StuSourceId)?.CustomerName ?? ""),
ChannelId= subItem.StuSourceId,
CustomerType= sItem.CustomerType,
ChannelName = "(企业)" + (tempCustomer?.CustomerName ?? ""),
ChannelId= subItem.CategoryId,
CustomerType= sItem.CatetoryType,
ChannelType = 2,
ClueCount = tempCusList?.Count()??0,
VisitCount = tempCusList?.Sum(qitem => qitem.VisitCount)??0,
......@@ -1417,13 +1416,13 @@ namespace Edu.Module.Customer
});
}
//校代同行
if (sItem.CustomerType == Common.Enum.Customer.CatetoryTypeEnum.School)
if (sItem.CatetoryType == CatetoryTypeEnum.School)
{
list.Add(new MarketChannelStaticModel()
{
ChannelName = "(校代)" + (customerList?.FirstOrDefault(qitem => qitem.CustomerId == subItem.StuSourceId)?.CustomerName ?? ""),
ChannelId=subItem.StuSourceId,
CustomerType=sItem.CustomerType,
ChannelName = "(校代)" + (tempCustomer?.CustomerName ?? ""),
ChannelId=subItem.CategoryId,
CustomerType=sItem.CatetoryType,
ChannelType = 2,
ClueCount = tempCusList?.Count()??0,
VisitCount = tempCusList?.Sum(qitem => qitem.VisitCount)??0,
......@@ -1434,7 +1433,6 @@ namespace Edu.Module.Customer
}
}
var empIds = string.Join(",", dataList.Where(qitem => qitem.CreateType == StuCreateTypeEnum.InternalIntroduction).Select(qitem => qitem.StuSourceId));
List<Employee_ViewModel> empList = new List<Employee_ViewModel>();
if (!string.IsNullOrEmpty(empIds))
......
......@@ -1088,6 +1088,7 @@ FROM RB_Student AS A
LEFT JOIN rb_customer_category AS E ON D.CategoryId=E.CategoryId
WHERE A.Status=0
");
builder.AppendFormat(" AND A.StuStage<>{0} AND A.AdvisorStatus<>{1} ", 7, 7);
if (query != null)
{
if (query.Group_Id > 0)
......
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