Commit fa6a10b6 authored by 黄奎's avatar 黄奎

学员跟进调整

parent 6be708bc
...@@ -114,6 +114,11 @@ namespace Edu.Model.ViewModel.DataStatistics ...@@ -114,6 +114,11 @@ namespace Edu.Model.ViewModel.DataStatistics
/// </summary> /// </summary>
public bool IsShowFollowAll { get; set; } public bool IsShowFollowAll { get; set; }
/// <summary>
/// 最新约课情况
/// </summary>
public string NewLesson { get; set; }
/// <summary> /// <summary>
/// 续费订单 /// 续费订单
/// </summary> /// </summary>
......
...@@ -11,6 +11,11 @@ namespace Edu.Model.ViewModel.Scroll ...@@ -11,6 +11,11 @@ namespace Edu.Model.ViewModel.Scroll
[Serializable] [Serializable]
public class RB_Scroll_Appointment_ViewModel : RB_Scroll_Appointment public class RB_Scroll_Appointment_ViewModel : RB_Scroll_Appointment
{ {
/// <summary>
/// 最新章节
/// </summary>
public string ChapterName { get; set; }
/// <summary> /// <summary>
/// 开始时间 /// 开始时间
/// </summary> /// </summary>
......
...@@ -500,5 +500,10 @@ namespace Edu.Model.ViewModel.User ...@@ -500,5 +500,10 @@ namespace Edu.Model.ViewModel.User
/// 分配给我的线索 /// 分配给我的线索
/// </summary> /// </summary>
public int IsQueryMyClue { get; set; } public int IsQueryMyClue { get; set; }
/// <summary>
/// 毕业状态(1-未毕业,2-已毕业);
/// </summary>
public int QGuestState { get; set; }
} }
} }
\ No newline at end of file
...@@ -7,6 +7,7 @@ using Edu.Model.ViewModel.Customer; ...@@ -7,6 +7,7 @@ using Edu.Model.ViewModel.Customer;
using Edu.Model.ViewModel.DataStatistics; using Edu.Model.ViewModel.DataStatistics;
using Edu.Model.ViewModel.User; using Edu.Model.ViewModel.User;
using Edu.Repository.Customer; using Edu.Repository.Customer;
using Edu.Repository.Scroll;
using Edu.Repository.System; using Edu.Repository.System;
using Edu.Repository.User; using Edu.Repository.User;
using System; using System;
...@@ -79,6 +80,8 @@ namespace Edu.Module.User ...@@ -79,6 +80,8 @@ namespace Edu.Module.User
/// </summary> /// </summary>
private readonly RB_Student_CompanyRepository student_CompanyRepository = new RB_Student_CompanyRepository(); private readonly RB_Student_CompanyRepository student_CompanyRepository = new RB_Student_CompanyRepository();
private readonly RB_Scroll_AppointmentRepository scroll_AppointmentRepository = new RB_Scroll_AppointmentRepository();
#region 学员跟进 #region 学员跟进
/// <summary> /// <summary>
...@@ -321,20 +324,19 @@ namespace Edu.Module.User ...@@ -321,20 +324,19 @@ namespace Edu.Module.User
/// <param name="count"></param> /// <param name="count"></param>
/// <param name="demodel"></param> /// <param name="demodel"></param>
/// <returns></returns> /// <returns></returns>
public object GetStudentFollowUpPageModule_V2(int pageIndex, int pageSize, out long count, RB_Student_ViewModel demodel) public object GetStudentFollowUpPageModule_V2Module(int pageIndex, int pageSize, out long count, RB_Student_ViewModel demodel)
{ {
object Robj = new object(); object Robj = new object();
var slist = student_OrderGuestRepository.GetStudentFollowUpPageRepository_V2(pageIndex, pageSize, out count, demodel); var slist = student_OrderGuestRepository.GetStudentFollowUpPageRepository_V2Repository(pageIndex, pageSize, out count, demodel);
if (slist.Any()) if (slist.Any())
{ {
string stuIds = string.Join(",", slist.Select(x => x.StuId)); string stuIds = string.Join(",", slist.Select(x => x.StuId));
var appointmentList = scroll_AppointmentRepository.GetAppointListRepository(new Model.ViewModel.Scroll.RB_Scroll_Appointment_ViewModel() { Group_Id = demodel.Group_Id, StuIds = stuIds });
//查询学生每月的跟进情况 //查询学生每月的跟进情况
var flist = followRepository.GetStudentFollowListRepository(new RB_Student_Follow_Extend { QStuIds=stuIds,Group_Id=demodel.Group_Id}); var flist = followRepository.GetStudentFollowListRepository(new RB_Student_Follow_Extend { QStuIds = stuIds, Group_Id = demodel.Group_Id });
//查询续课 学员介绍 //查询续课 学员介绍
var xlist = student_OrderGuestRepository.GetStudentRenewRepository(demodel.Group_Id, stuIds);//续费 var xlist = student_OrderGuestRepository.GetStudentRenewRepository(demodel.Group_Id, stuIds);//续费
//查询汇总数据
// var TotalData = student_OrderGuestRepository.GetStudentFollowUpStat_V2(demodel);
//学习目的
string goalIds = string.Join(",", slist.Select(qitem => qitem.StuPurpose)); string goalIds = string.Join(",", slist.Select(qitem => qitem.StuPurpose));
var goalList = learningGoalsRepository.GetLearningGoalsListRepository(new Model.ViewModel.System.RB_LearningGoals_Extend() var goalList = learningGoalsRepository.GetLearningGoalsListRepository(new Model.ViewModel.System.RB_LearningGoals_Extend()
{ {
...@@ -379,6 +381,9 @@ namespace Edu.Module.User ...@@ -379,6 +381,9 @@ namespace Edu.Module.User
item.CreateByName = accountList?.FirstOrDefault(qitem => qitem.Id == item.CreateBy)?.AccountName ?? ""; item.CreateByName = accountList?.FirstOrDefault(qitem => qitem.Id == item.CreateBy)?.AccountName ?? "";
item.StuPurposeName = goalList?.FirstOrDefault(qitem => qitem.Id == item.StuPurpose)?.Name ?? ""; item.StuPurposeName = goalList?.FirstOrDefault(qitem => qitem.Id == item.StuPurpose)?.Name ?? "";
item.FollowList = flist?.Where(qitem => qitem.StuId == item.StuId)?.ToList(); item.FollowList = flist?.Where(qitem => qitem.StuId == item.StuId)?.ToList();
var tempAppoint = appointmentList?.Where(qitem => qitem.StuId == item.StuId)?.FirstOrDefault();
//最新情况
string NewLesson = tempAppoint?.ChapterName ?? "";
var followModel = new StudentFollowStatic() var followModel = new StudentFollowStatic()
{ {
StuId = item.StuId, StuId = item.StuId,
...@@ -401,22 +406,13 @@ namespace Edu.Module.User ...@@ -401,22 +406,13 @@ namespace Edu.Module.User
CreateTime = x.CreateTime.ToString("yy-MM-dd") CreateTime = x.CreateTime.ToString("yy-MM-dd")
}), }),
IsShowFollowAll = false, IsShowFollowAll = false,
NewLesson = NewLesson,
}; };
RList.Add(followModel); RList.Add(followModel);
} }
Robj = new Robj = new
{ {
RList, RList,
//Stat = new
//{
// StuTNum = TotalData.OrderCount,
// RenewNum = TotalData.RenewOrderCount,
// NewNum = TotalData.OrderCount - TotalData.RenewOrderCount,
// TotalData.StudyNum,
// TotalData.GraduateNum,
// TotalData.SuspendNum,
// TotalData.DropOutNum
//}
}; };
#endregion #endregion
} }
......
...@@ -277,6 +277,40 @@ ORDER BY r.Id desc "; ...@@ -277,6 +277,40 @@ ORDER BY r.Id desc ";
return Get<RB_Scroll_Appointment_ViewModel>(sql, parameters).ToList(); return Get<RB_Scroll_Appointment_ViewModel>(sql, parameters).ToList();
} }
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_Scroll_Appointment_ViewModel> GetAppointListRepository(RB_Scroll_Appointment_ViewModel demodel)
{
DynamicParameters parameters = new DynamicParameters();
string where = $@" and sa.{nameof(RB_Scroll_Appointment_ViewModel.Status)} =0 and sa.{nameof(RB_Scroll_Appointment_ViewModel.State)} <>5";
if (demodel.Group_Id > 0)
{
where += $@" and sa.{nameof(RB_Scroll_Appointment_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.StuId > 0)
{
where += $@" and sa.{nameof(RB_Scroll_Appointment_ViewModel.StuId)} ={demodel.StuId}";
}
if (!string.IsNullOrEmpty(demodel.StuIds))
{
where += $@" and sa.{nameof(RB_Scroll_Appointment_ViewModel.StuId)} in({demodel.StuIds})";
}
string sql = $@"
SELECT A.*,cc.ChapterName
FROM
(
SELECT StuId,LearnCourseId,MAX(CourseGradeNo) AS CourseGradeNo
FROM RB_Scroll_Appointment AS sa
WHERE 1=1 {where}
GROUP BY StuId,LearnCourseId
) AS A LEFT JOIN rb_course_chapter as cc ON A.LearnCourseId=cc.CourseId and CONCAT(A.CourseGradeNo,'')=cc.ChapterNo ";
return Get<RB_Scroll_Appointment_ViewModel>(sql, parameters).ToList();
}
/// <summary> /// <summary>
/// 更新预约章节 /// 更新预约章节
/// </summary> /// </summary>
......
...@@ -925,6 +925,11 @@ WHERE 1=1 AND A.Status=0 AND class.Status=0 AND class.ClassStatus <>4 AND b.Or ...@@ -925,6 +925,11 @@ WHERE 1=1 AND A.Status=0 AND class.Status=0 AND class.ClassStatus <>4 AND b.Or
builder.AppendFormat(" AND(st.CreateBy = {0} OR EXISTS(SELECT 1 FROM rb_student_assist WHERE StuId = st.StuId AND AssistId = {0})) ", demodel.CreateBy); builder.AppendFormat(" AND(st.CreateBy = {0} OR EXISTS(SELECT 1 FROM rb_student_assist WHERE StuId = st.StuId AND AssistId = {0})) ", demodel.CreateBy);
} }
} }
//班主任
if (demodel.Teacher_Id > 0)
{
builder.AppendFormat(" AND EXISTS(SELECT 1 FROM rb_student_assist WHERE AssistType=4 AND StuId=st.StuId AND AssistId={0}) ", demodel.Teacher_Id);
}
builder.AppendFormat($@" order by A.{nameof(RB_Order_Guest_Extend.Id)} desc"); builder.AppendFormat($@" order by A.{nameof(RB_Order_Guest_Extend.Id)} desc");
var list= GetPage<RB_Order_Guest_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList(); var list= GetPage<RB_Order_Guest_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
if (list.Any()) if (list.Any())
...@@ -1171,6 +1176,10 @@ WHERE 1=1 AND A.Status=0 AND class.Status=0 AND class.ClassStatus <>4 AND b.Or ...@@ -1171,6 +1176,10 @@ WHERE 1=1 AND A.Status=0 AND class.Status=0 AND class.ClassStatus <>4 AND b.Or
{ {
builder.AppendFormat($@" AND st.StuSourceId ={demodel.StuSourceId}"); builder.AppendFormat($@" AND st.StuSourceId ={demodel.StuSourceId}");
} }
if (demodel.Teacher_Id > 0)
{
builder.AppendFormat(" AND EXISTS(SELECT 1 FROM rb_student_assist WHERE AssistType=4 AND StuId=st.StuId AND AssistId={0}) ", demodel.Teacher_Id);
}
builder.AppendFormat($@" GROUP BY A.GuestState "); builder.AppendFormat($@" GROUP BY A.GuestState ");
return Get<RB_Order_Guest_Extend>(builder.ToString(),parameters).ToList(); return Get<RB_Order_Guest_Extend>(builder.ToString(),parameters).ToList();
} }
......
...@@ -516,43 +516,49 @@ FROM rb_student s ...@@ -516,43 +516,49 @@ FROM rb_student s
/// <param name="count"></param> /// <param name="count"></param>
/// <param name="demodel"></param> /// <param name="demodel"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Student_ViewModel> GetStudentFollowUpPageRepository_V2(int pageIndex, int pageSize, out long count, RB_Student_ViewModel demodel) public List<RB_Student_ViewModel> GetStudentFollowUpPageRepository_V2Repository(int pageIndex, int pageSize, out long count, RB_Student_ViewModel demodel)
{ {
string where = GetStudentFollowUpSql(demodel, out DynamicParameters parameters); DynamicParameters parameters = new DynamicParameters();
string joinType = "INNER JOIN"; StringBuilder builder = new StringBuilder();
if (demodel.QueryTpye == 3) builder.AppendFormat(@"
SELECT s.StuId,s.StuName,s.StuTel,s.StuProfession,s.StuPurpose,s.JapanBaseInfo,s.CreateBy
,o.CreateTime,o.PreferPrice,c.CourseName,c.CourseRate
FROM rb_student s LEFT JOIN rb_student_orderguest sog on sog.Student_Id = s.StuId
LEFT JOIN rb_order_guest AS og ON og.Id=sog.GuestId
LEFT JOIN rb_order o on sog.OrderId = o.OrderId AND o.JoinType=1 AND o.OrderState<>3
LEFT JOIN rb_course AS C ON O.CourseId=C.CourseId
WHERE 1=1
");
if (demodel.Group_Id > 0)
{ {
joinType = "LEFT JOIN"; builder.AppendFormat(" AND s.{0}={1} ", nameof(RB_Student_ViewModel.Group_Id), demodel.Group_Id);
} }
string sql = $@" if (demodel.School_Id > -1)
SELECT o.CreateTime,s.StuId,s.StuName,s.StuTel,s.StuProfession,s.StuPurpose,c.CourseName,c.CourseRate,o.PreferPrice,s.JapanBaseInfo,s.CreateBy
FROM rb_student s
{joinType} rb_student_orderguest og on og.Student_Id = s.StuId
{joinType} (SELECT og.Student_Id,min(og.Id) as Id FROM rb_student_orderguest og INNER JOIN rb_order o on og.OrderId = o.OrderId WHERE o.OrderState <>3 GROUP BY og.Student_Id) stu on og.Id = stu.Id and og.Student_Id = s.StuId
{joinType} rb_order_guest org on org.Id = og.GuestId
{joinType} rb_order o on og.OrderId = o.OrderId
{joinType} rb_class cl on cl.ClassId = o.ClassId
{joinType} rb_course c on o.CourseId = c.CourseId
LEFT JOIN rb_education_contract ec on ec.GuestId = og.GuestId
LEFT JOIN rb_student_advisorconfig AS b ON s.AdvisorStatus=B.Id
LEFT JOIN (
SELECT B.Student_Id,MIN(A.ClassDate) AS ClassDate
FROM rb_class_check AS A INNER JOIN rb_student_orderguest AS B ON A.OrderGuestId=B.GuestId
WHERE A.Status=0 AND A.CheckStatus=0 GROUP BY B.Student_Id
) AS clcheck ON s.StuId=clcheck.Student_Id
";
if (!string.IsNullOrEmpty(demodel.SFTime) && !string.IsNullOrEmpty(demodel.EFTime))
{ {
//增加跟进链表 builder.AppendFormat(" AND s.{0}={1} ", nameof(RB_Student_ViewModel.School_Id), demodel.School_Id);
sql += $@" LEFT JOIN rb_student_follow f on s.StuId = f.StuId and f.`Status` =0 and f.AssistType in(2,4) and f.CreateTime >='{demodel.SFTime}' and f.CreateTime <='{demodel.EFTime} 23:59:59'";
} }
sql += $" where {where} and o.JoinType=1 "; if (!string.IsNullOrEmpty(demodel.StuName))
if ((!string.IsNullOrEmpty(demodel.SFTime) && !string.IsNullOrEmpty(demodel.EFTime)))
{ {
sql += $" GROUP BY s.StuId"; builder.AppendFormat(" AND s.StuName LIKE @StuName ");
parameters.Add("StuName", "%" + demodel.StuName + "%");
} }
sql += $" order by s.StuId desc"; if (demodel.QGuestState > 0)
return GetPage<RB_Student_ViewModel>(pageIndex, pageSize, out count, sql, parameters).ToList(); {
if (demodel.QGuestState == 1)
{
builder.AppendFormat(" AND og.GuestState<>7 ");
}
else if (demodel.QGuestState == 2)
{
builder.AppendFormat(" AND og.GuestState=7 ");
}
}
if (demodel.HeadTeacherId > 0)
{
builder.AppendFormat(" AND EXISTS(SELECT 1 FROM rb_student_assist WHERE AssistType=4 AND StuId=s.StuId AND AssistId={0}) ", demodel.HeadTeacherId);
}
builder.AppendFormat(" ORDER BY s.StuId DESC ");
return GetPage<RB_Student_ViewModel>(pageIndex, pageSize, out count, builder.ToString(), parameters).ToList();
} }
......
...@@ -308,6 +308,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -308,6 +308,7 @@ namespace Edu.WebApi.Controllers.Course
StuChannelId = base.ParmJObj.GetInt("StuChannelId", 0), StuChannelId = base.ParmJObj.GetInt("StuChannelId", 0),
CreateType = (Common.Enum.User.StuCreateTypeEnum)base.ParmJObj.GetInt("CreateType", 0), CreateType = (Common.Enum.User.StuCreateTypeEnum)base.ParmJObj.GetInt("CreateType", 0),
StuSourceId = base.ParmJObj.GetInt("StuSourceId", 0), StuSourceId = base.ParmJObj.GetInt("StuSourceId", 0),
Teacher_Id=base.ParmJObj.GetInt("Teacher_Id"),
}; };
model.School_Id = -1; model.School_Id = -1;
var schoolId = base.ParmJObj.GetStringValue("School_Id"); var schoolId = base.ParmJObj.GetStringValue("School_Id");
......
...@@ -169,85 +169,23 @@ namespace Edu.WebApi.Controllers.User ...@@ -169,85 +169,23 @@ namespace Edu.WebApi.Controllers.User
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
RB_Student_ViewModel demodel = new RB_Student_ViewModel() RB_Student_ViewModel demodel = new RB_Student_ViewModel()
{ {
BelongType = base.ParmJObj.GetInt("BelongType"),
ConsultantId = base.ParmJObj.GetInt("ConsultantId"),
CourseId = base.ParmJObj.GetInt("CourseId"),
CreateType = (StuCreateTypeEnum)base.ParmJObj.GetInt("CreateType"),
EFTime = base.ParmJObj.GetStringValue("EFTime"),
IsQueryMyStu = base.ParmJObj.GetInt("IsQueryMyStu"),
QQ = base.ParmJObj.GetStringValue("QQ"),
Q_FType = base.ParmJObj.GetInt("Q_FType"),
SFTime = base.ParmJObj.GetStringValue("SFTime"),
StuChannel = base.ParmJObj.GetInt("StuChannel"),
StuGuestState = (GuestStateEnum)base.ParmJObj.GetInt("StuGuestState"),
StuName = base.ParmJObj.GetStringValue("StuName"), StuName = base.ParmJObj.GetStringValue("StuName"),
StuRealMobile = base.ParmJObj.GetStringValue("StuRealMobile"),
StuSourceId = base.ParmJObj.GetInt("StuSourceId"),
StuStage = base.ParmJObj.GetInt("StuStage"),
StuType = base.ParmJObj.GetInt("StuType"),
WeChatNo = base.ParmJObj.GetStringValue("WeChatNo"),
StuPurpose = base.ParmJObj.GetInt("StuPurpose"),
HeadTeacherId = base.ParmJObj.GetInt("HeadTeacherId"), HeadTeacherId = base.ParmJObj.GetInt("HeadTeacherId"),
QueryTpye = base.ParmJObj.GetInt("QueryTpye"), School_Id = -1,
AdvisorStatus = base.ParmJObj.GetInt("AdvisorStatus"), QGuestState = base.ParmJObj.GetInt("QGuestState"),
}; };
string schoolId = base.ParmJObj.GetStringValue("School_Id"); string schoolId = base.ParmJObj.GetStringValue("School_Id");
if (schoolId != "-1") if (schoolId != "-1")
{ {
demodel.School_Id = base.ParmJObj.GetInt("School_Id"); demodel.School_Id = base.ParmJObj.GetInt("School_Id");
} }
string CreateIds = base.ParmJObj.GetStringValue("CreateIds");
if (!string.IsNullOrEmpty(CreateIds))
{
demodel.CreateIds = Common.Plugin.JsonHelper.DeserializeObject<List<int>>(CreateIds);
}
demodel.Group_Id = userInfo.Group_Id; demodel.Group_Id = userInfo.Group_Id;
var list = studentStatModule.GetStudentFollowUpPageModule_V2Module(pmodel.PageIndex, pmodel.PageSize, out long count, demodel);
//市场部
if (demodel.QueryTpye == 3)
{
demodel.BelongType = 1;
var markerUserList = employeeModule.GetEmployeeListModule(new Employee_ViewModel()
{
UserRole = UserRoleEnum.MarketPersion,
IsLeave = 1
});
string QCreateBys = "";
QCreateBys = string.Join(",", markerUserList?.Select(qitem => qitem.Id));
//普通市场人员
if (base.UserInfo.IsMarket == 1 && base.UserInfo.IsManager == 0)
{
demodel.CreateBy = base.UserInfo.Id;
}
int qCreateBy = base.ParmJObj.GetInt("CreateBy");
if (qCreateBy > 0)
{
QCreateBys = qCreateBy.ToString();
}
if (!string.IsNullOrEmpty(QCreateBys))
{
demodel.QCreateBys = QCreateBys.TrimStart(',').TrimEnd(',');
}
}
//课程顾问部
if (demodel.QueryTpye == 1)
{
demodel.BelongType = 0;
}
if (demodel.QueryTpye == 2)
{
}
var list = studentStatModule.GetStudentFollowUpPageModule_V2(pmodel.PageIndex, pmodel.PageSize, out long count, demodel);
pmodel.Count = count; pmodel.Count = count;
pmodel.PageData = list; pmodel.PageData = list;
return ApiResult.Success("", pmodel); return ApiResult.Success("", pmodel);
} }
/// <summary> /// <summary>
/// 下载学员跟进信息 2024-03-01 add by:w /// 下载学员跟进信息 2024-03-01 add by:w
/// </summary> /// </summary>
...@@ -260,77 +198,18 @@ namespace Edu.WebApi.Controllers.User ...@@ -260,77 +198,18 @@ namespace Edu.WebApi.Controllers.User
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
RB_Student_ViewModel demodel = new RB_Student_ViewModel() RB_Student_ViewModel demodel = new RB_Student_ViewModel()
{ {
BelongType = base.ParmJObj.GetInt("BelongType"),
ConsultantId = base.ParmJObj.GetInt("ConsultantId"),
CourseId = base.ParmJObj.GetInt("CourseId"),
CreateType = (StuCreateTypeEnum)base.ParmJObj.GetInt("CreateType"),
EFTime = base.ParmJObj.GetStringValue("EFTime"),
IsQueryMyStu = base.ParmJObj.GetInt("IsQueryMyStu"),
QQ = base.ParmJObj.GetStringValue("QQ"),
Q_FType = base.ParmJObj.GetInt("Q_FType"),
SFTime = base.ParmJObj.GetStringValue("SFTime"),
StuChannel = base.ParmJObj.GetInt("StuChannel"),
StuGuestState = (GuestStateEnum)base.ParmJObj.GetInt("StuGuestState"),
StuName = base.ParmJObj.GetStringValue("StuName"), StuName = base.ParmJObj.GetStringValue("StuName"),
StuRealMobile = base.ParmJObj.GetStringValue("StuRealMobile"),
StuSourceId = base.ParmJObj.GetInt("StuSourceId"),
StuStage = base.ParmJObj.GetInt("StuStage"),
StuType = base.ParmJObj.GetInt("StuType"),
WeChatNo = base.ParmJObj.GetStringValue("WeChatNo"),
StuPurpose = base.ParmJObj.GetInt("StuPurpose"),
HeadTeacherId = base.ParmJObj.GetInt("HeadTeacherId"), HeadTeacherId = base.ParmJObj.GetInt("HeadTeacherId"),
QueryTpye = base.ParmJObj.GetInt("QueryTpye"), School_Id = -1,
AdvisorStatus = base.ParmJObj.GetInt("AdvisorStatus"), QGuestState = base.ParmJObj.GetInt("QGuestState"),
}; };
string schoolId = base.ParmJObj.GetStringValue("School_Id"); string schoolId = base.ParmJObj.GetStringValue("School_Id");
if (schoolId != "-1") if (schoolId != "-1")
{ {
demodel.School_Id = base.ParmJObj.GetInt("School_Id"); demodel.School_Id = base.ParmJObj.GetInt("School_Id");
} }
string CreateIds = base.ParmJObj.GetStringValue("CreateIds");
if (!string.IsNullOrEmpty(CreateIds))
{
demodel.CreateIds = Common.Plugin.JsonHelper.DeserializeObject<List<int>>(CreateIds);
}
demodel.Group_Id = userInfo.Group_Id; demodel.Group_Id = userInfo.Group_Id;
var list = studentStatModule.GetStudentFollowUpPageModule_V2Module(1, 1000000, out long count, demodel);
//市场部
if (demodel.QueryTpye == 3)
{
demodel.BelongType = 1;
var markerUserList = employeeModule.GetEmployeeListModule(new Employee_ViewModel()
{
UserRole = UserRoleEnum.MarketPersion,
IsLeave = 1
});
string QCreateBys = "";
QCreateBys = string.Join(",", markerUserList?.Select(qitem => qitem.Id));
//普通市场人员
if (base.UserInfo.IsMarket == 1 && base.UserInfo.IsManager == 0)
{
demodel.CreateBy = base.UserInfo.Id;
}
int qCreateBy = base.ParmJObj.GetInt("CreateBy");
if (qCreateBy > 0)
{
QCreateBys = qCreateBy.ToString();
}
if (!string.IsNullOrEmpty(QCreateBys))
{
demodel.QCreateBys = QCreateBys.TrimStart(',').TrimEnd(',');
}
}
//课程顾问部
if (demodel.QueryTpye == 1)
{
demodel.BelongType = 0;
}
if (demodel.QueryTpye == 2)
{
}
var list = studentStatModule.GetStudentFollowUpPageModule_V2(1, 1000000, out long count, demodel);
var QueryTpye = base.ParmJObj.GetInt("QueryTpye"); var QueryTpye = base.ParmJObj.GetInt("QueryTpye");
string excelName = "学员跟进表.xls"; string excelName = "学员跟进表.xls";
try try
...@@ -351,6 +230,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -351,6 +230,7 @@ namespace Edu.WebApi.Controllers.User
new ExcelColumn("续费课程") { CellWidth = 15 }, new ExcelColumn("续费课程") { CellWidth = 15 },
new ExcelColumn("续费级别") { CellWidth = 15 }, new ExcelColumn("续费级别") { CellWidth = 15 },
new ExcelColumn("续费金额") { CellWidth = 15 }, new ExcelColumn("续费金额") { CellWidth = 15 },
new ExcelColumn("最新情况") { CellWidth = 15 },
new ExcelColumn("负责人") { CellWidth = 15 } new ExcelColumn("负责人") { CellWidth = 15 }
} }
}; };
...@@ -402,6 +282,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -402,6 +282,7 @@ namespace Edu.WebApi.Controllers.User
columns.Add(new ExcelColumn(rCourseNameStr)); columns.Add(new ExcelColumn(rCourseNameStr));
columns.Add(new ExcelColumn(rCourseLevelStr)); columns.Add(new ExcelColumn(rCourseLevelStr));
columns.Add(new ExcelColumn(rCoursePriceStr)); columns.Add(new ExcelColumn(rCoursePriceStr));
columns.Add(new ExcelColumn(item.NewLesson));
columns.Add(new ExcelColumn(item.CreateByName)); columns.Add(new ExcelColumn(item.CreateByName));
var dataRow = new ExcelDataSource() var dataRow = new ExcelDataSource()
......
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