Commit f7f676b8 authored by 黄奎's avatar 黄奎

页面修改

parent cfec307d
...@@ -34,5 +34,10 @@ namespace Edu.Model.ViewModel.Customer ...@@ -34,5 +34,10 @@ namespace Edu.Model.ViewModel.Customer
/// 是否查询全部 /// 是否查询全部
/// </summary> /// </summary>
public int IsQueryAll { get; set; } public int IsQueryAll { get; set; }
/// <summary>
/// 创建人
/// </summary>
public string CreateByName { get; set; }
} }
} }
...@@ -521,6 +521,15 @@ namespace Edu.Module.Customer ...@@ -521,6 +521,15 @@ namespace Edu.Module.Customer
if (list != null && list.Count > 0) if (list != null && list.Count > 0)
{ {
string Ids = string.Join(",", list.Select(qitem => qitem.CategoryId)); string Ids = string.Join(",", list.Select(qitem => qitem.CategoryId));
string userIds = string.Join(",", list.Where(qitem => qitem.CreateBy > 0).Select(qitem => qitem.CreateBy));
var empList = new List<Employee_ViewModel>();
if (!string.IsNullOrEmpty(userIds))
{
empList= accountRepository.GetEmployeeListRepository(new Employee_ViewModel()
{
QIds = userIds
});
}
List<RB_Customer_Extend> customerLinkList = new List<RB_Customer_Extend>(); List<RB_Customer_Extend> customerLinkList = new List<RB_Customer_Extend>();
List<RB_Customer_Extend> StuNumList = new List<RB_Customer_Extend>(); List<RB_Customer_Extend> StuNumList = new List<RB_Customer_Extend>();
List<RB_Customer_Extend> OrderNumList = new List<RB_Customer_Extend>(); List<RB_Customer_Extend> OrderNumList = new List<RB_Customer_Extend>();
...@@ -551,6 +560,7 @@ namespace Edu.Module.Customer ...@@ -551,6 +560,7 @@ namespace Edu.Module.Customer
item.OrderCount = orderList?.Sum(qitem => qitem.OrderNum) ?? 0; item.OrderCount = orderList?.Sum(qitem => qitem.OrderNum) ?? 0;
item.OrderSales= orderList?.Sum(qitem => qitem.OrderSales) ?? 0; item.OrderSales= orderList?.Sum(qitem => qitem.OrderSales) ?? 0;
item.StudentCount = stuList?.Sum(qitem=>qitem.StuNum)??0; item.StudentCount = stuList?.Sum(qitem=>qitem.StuNum)??0;
item.CreateByName = empList?.FirstOrDefault(qitem => qitem.Id == item.CreateBy)?.EmployeeName ?? "";
} }
} }
return list; return list;
......
...@@ -923,12 +923,12 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -923,12 +923,12 @@ namespace Edu.WebApi.Controllers.Customer
List<object> result = new List<object>(); List<object> result = new List<object>();
foreach (var item in list) foreach (var item in list)
{ {
string CreateByName = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "";
result.Add(new result.Add(new
{ {
item.CategoryId, item.CategoryId,
item.CategoryName, item.CategoryName,
CreateByName, CreateByName=item.CreateByName,
item.CatetoryType, item.CatetoryType,
item.LinkManCount, item.LinkManCount,
item.StudentCount, item.StudentCount,
...@@ -993,7 +993,7 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -993,7 +993,7 @@ namespace Edu.WebApi.Controllers.Customer
new ExcelColumn(item.StudentCount.ToString()), new ExcelColumn(item.StudentCount.ToString()),
new ExcelColumn(item.OrderCount.ToString()), new ExcelColumn(item.OrderCount.ToString()),
new ExcelColumn(Common.ConvertHelper.FormatTime(item.CreateTime)), new ExcelColumn(Common.ConvertHelper.FormatTime(item.CreateTime)),
new ExcelColumn(UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? ""), new ExcelColumn(item.CreateByName),
} }
}; };
slist.Add(dataRow); slist.Add(dataRow);
......
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