Commit c254352b authored by liudong1993's avatar liudong1993

1客人咨询

parent e231d1eb
......@@ -240,6 +240,11 @@ namespace Edu.Model.ViewModel.User
/// </summary>
public int OperateType { get; set; }
/// <summary>
/// 课程顾问
/// </summary>
public int ConsultantId { get; set; }
/// <summary>
/// 渠道名称
/// </summary>
......
......@@ -40,6 +40,14 @@ namespace Edu.Module.User
/// 学员续费介绍
/// </summary>
private readonly RB_Student_RenewOrderRepository student_RenewOrderRepository = new RB_Student_RenewOrderRepository();
/// <summary>
/// 服务人员
/// </summary>
private readonly RB_Student_AssistRepository student_AssistRepository = new RB_Student_AssistRepository();
/// <summary>
/// 账户
/// </summary>
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
#region 学员跟进
......@@ -67,6 +75,8 @@ namespace Edu.Module.User
var TotalData = student_OrderGuestRepository.GetStudentFollowUpStat(demodel);
//查询每月续费介绍情况
var ROList = student_RenewOrderRepository.GetStuMonthList(demodel.Group_Id);
//查询课程顾问
var stuAssistList = student_AssistRepository.GetStudentAssistListRepository(new RB_Student_Assist_Extend() { QStuIds = stuIds });
#region 组装数据
int MaxMonth = 2;//最大月份
......@@ -124,12 +134,19 @@ namespace Edu.Module.User
});
}
var AssistId = stuAssistList.Where(x => x.StuId == item.StuId && x.AssistType == AssistTypeEnum.CourseAdviser).FirstOrDefault()?.AssistId ?? 0;
string AssistName = "";
if (AssistId > 0) {
AssistName = accountRepository.GetEmployeeInfo(AssistId)?.EmployeeName ?? "";
}
var StuObj = new
{
item.StuId,
item.StuName,
item.StuTel,
item.StuRealMobile,
AssistId,
AssistName,
ContractSTime = item.followUpTime,
item.CourseName,
JapanBaseInfo = item.JapanBaseInfo.ToName(),
......@@ -194,13 +211,23 @@ namespace Edu.Module.User
string stuIds = string.Join(",", slist.Select(x => x.StuId));
//查询学员最近的一条跟进记录
var flist = followRepository.GetStudentFollowUpLatelyList(stuIds, demodel.Group_Id);
//查询课程顾问
var stuAssistList = student_AssistRepository.GetStudentAssistListRepository(new RB_Student_Assist_Extend() { QStuIds = stuIds });
foreach (var item in slist) {
var fmodel = flist.Where(x => x.StuId == item.StuId).FirstOrDefault();
var AssistId = stuAssistList.Where(x => x.StuId == item.StuId && x.AssistType == AssistTypeEnum.CourseAdviser).FirstOrDefault()?.AssistId ?? 0;
string AssistName = "";
if (AssistId > 0)
{
AssistName = accountRepository.GetEmployeeInfo(AssistId)?.EmployeeName ?? "";
}
RList.Add(new
{
item.StuId,
item.StuName,
AssistId,
AssistName,
item.StuBirthStr,
item.StuTel,
item.StuRealMobile,
......
......@@ -48,9 +48,14 @@ namespace Edu.WebApi.Controllers.User
demodel.CreateBy = userInfo.Id;
}
else {
if (demodel.BelongType == 1) {
if (demodel.BelongType == 1)
{
demodel.BelongType = 0;//暂先查全部
}
if (demodel.BelongType > 1)
{
demodel.CreateBy = userInfo.Id;
}
}
var list = studentStatModule.GetStudentFollowUpPageList(pmodel.PageIndex, pmodel.PageSize, out long count, demodel);
......@@ -78,6 +83,18 @@ namespace Edu.WebApi.Controllers.User
{
demodel.CreateBy = userInfo.Id;
}
else
{
if (demodel.BelongType == 1)
{
demodel.BelongType = 0;//暂先查全部
}
if (demodel.BelongType > 1)
{
demodel.CreateBy = userInfo.Id;
}
}
var list = studentStatModule.GetStudentConsultPageList(pmodel.PageIndex, pmodel.PageSize, out long count, demodel);
pmodel.Count = count;
pmodel.PageData = list;
......
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