Commit 3bf3420b authored by 黄奎's avatar 黄奎

页面修改

parent 4a8e85a0
...@@ -1255,15 +1255,15 @@ namespace Edu.Module.User ...@@ -1255,15 +1255,15 @@ namespace Edu.Module.User
/// <param name="rowsCount"></param> /// <param name="rowsCount"></param>
/// <param name="CreateBy"></param> /// <param name="CreateBy"></param>
/// <returns></returns> /// <returns></returns>
public List<object> GetTodayVisitModule(int pageIndex, int pageSize, out long rowsCount, int CreateBy) public List<object> GetStudentAppointmentPageModule(int pageIndex, int pageSize, out long rowsCount, int CreateBy)
{ {
rowsCount = 0;
List<object> result = new List<object>(); List<object> result = new List<object>();
var list = student_AppointmentRepository.GetStudentVisitListRepository(new RB_Student_Appointment_Extend() var query = new RB_Student_Appointment_Extend()
{ {
QueryDate = Common.ConvertHelper.FormatDate(DateTime.Now), QueryDate = Common.ConvertHelper.FormatDate(DateTime.Now),
CreateBy = CreateBy CreateBy = CreateBy
}); };
var list = student_AppointmentRepository.GetStudentAppointmentPageRepository(pageIndex,pageSize,out rowsCount, query);
if (list != null && list.Count > 0) if (list != null && list.Count > 0)
{ {
string createByIds = string.Join(",", list.Select(qitem => qitem.CreateBy)); string createByIds = string.Join(",", list.Select(qitem => qitem.CreateBy));
...@@ -1298,15 +1298,15 @@ namespace Edu.Module.User ...@@ -1298,15 +1298,15 @@ namespace Edu.Module.User
/// <param name="rowsCount"></param> /// <param name="rowsCount"></param>
/// <param name="CreateBy"></param> /// <param name="CreateBy"></param>
/// <returns></returns> /// <returns></returns>
public List<object> GetTodayContractStudentModule(int pageIndex, int pageSize, out long rowsCount, int CreateBy) public List<object> GetTodayConnectPageModule(int pageIndex, int pageSize, out long rowsCount, int CreateBy)
{ {
rowsCount = 0;
List<object> result = new List<object>(); List<object> result = new List<object>();
var list = student_AppointmentRepository.GetStudentVisitListRepository(new RB_Student_Appointment_Extend() var query = new RB_Student_Appointment_Extend()
{ {
QueryDate = Common.ConvertHelper.FormatDate(DateTime.Now), QueryDate = Common.ConvertHelper.FormatDate(DateTime.Now),
CreateBy = CreateBy CreateBy = CreateBy
}); };
var list = student_AppointmentRepository.GetStudentAppointmentPageRepository(pageIndex, pageSize, out rowsCount, query);
if (list != null && list.Count > 0) if (list != null && list.Count > 0)
{ {
string createByIds = string.Join(",", list.Select(qitem => qitem.CreateBy)); string createByIds = string.Join(",", list.Select(qitem => qitem.CreateBy));
......
...@@ -25,8 +25,8 @@ namespace Edu.Repository.Customer ...@@ -25,8 +25,8 @@ namespace Edu.Repository.Customer
{ {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
SELECT A.* SELECT A.*,B.StuName
FROM RB_Student_Appointment AS A FROM RB_Student_Appointment AS A INNER JOIN rb_student AS B ON A.StuId=B.StuId
WHERE 1=1 WHERE 1=1
"); ");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Appointment_Extend.Status), (int)DateStateEnum.Normal); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Appointment_Extend.Status), (int)DateStateEnum.Normal);
...@@ -44,7 +44,15 @@ WHERE 1=1 ...@@ -44,7 +44,15 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Appointment_Extend.Id), query.Id); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Appointment_Extend.Id), query.Id);
} }
if (query.CreateBy > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Appointment_Extend.CreateBy), query.CreateBy);
}
//指定日期的约访统计
if (!string.IsNullOrEmpty(query.QueryDate))
{
builder.AppendFormat(" AND ( DATE_FORMAT(A.{0},'%y/%m/%d')= DATE_FORMAT('{2}','%y/%m/%d') OR DATE_FORMAT(A.{1},'%y/%m/%d')= DATE_FORMAT('{2}','%y/%m/%d')) ", nameof(RB_Student_Appointment_Extend.CreateTime), nameof(RB_Student_Appointment_Extend.AppointmentTime), Common.ConvertHelper.FormatDate(query.QueryDate));
}
} }
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Student_Appointment_Extend.Id)); builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Student_Appointment_Extend.Id));
......
...@@ -3325,7 +3325,9 @@ namespace Edu.WebApi.Controllers.User ...@@ -3325,7 +3325,9 @@ namespace Edu.WebApi.Controllers.User
public ApiResult GetTodayClue() public ApiResult GetTodayClue()
{ {
var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString()); var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var list = studentModule.GetTodayVisitModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, base.UserInfo.Id); var userId = 0;
userId = base.UserInfo.Id;
var list = studentModule.GetStudentAppointmentPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, userId);
pageModel.PageData = list; pageModel.PageData = list;
pageModel.Count = rowsCount; pageModel.Count = rowsCount;
return ApiResult.Success(data: pageModel); return ApiResult.Success(data: pageModel);
...@@ -3334,10 +3336,10 @@ namespace Edu.WebApi.Controllers.User ...@@ -3334,10 +3336,10 @@ namespace Edu.WebApi.Controllers.User
/// <summary> /// <summary>
/// 今日需联系学员(之前预约的跟进学员或本周期内需要跟进的学员) /// 今日需联系学员(之前预约的跟进学员或本周期内需要跟进的学员)
/// </summary> /// </summary>
public ApiResult GetTodayContractStudent() public ApiResult GetTodayConnect()
{ {
var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString()); var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var list = studentModule.GetTodayContractStudentModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, base.UserInfo.Id); var list = studentModule.GetTodayConnectPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, base.UserInfo.Id);
pageModel.PageData = list; pageModel.PageData = list;
pageModel.Count = rowsCount; pageModel.Count = rowsCount;
return ApiResult.Success(data: pageModel); return ApiResult.Success(data: pageModel);
......
...@@ -147,7 +147,7 @@ namespace Edu.WebApi.Timers ...@@ -147,7 +147,7 @@ namespace Edu.WebApi.Timers
marketTimer = new System.Timers.Timer() marketTimer = new System.Timers.Timer()
{ {
Interval = (1000 * 60) * (5) //20分钟执行一次 Interval = (1000 * 60) * (60) //1小时执行一次
}; };
marketTimer.Elapsed += new System.Timers.ElapsedEventHandler(DealMarketConsultantData); marketTimer.Elapsed += new System.Timers.ElapsedEventHandler(DealMarketConsultantData);
marketTimer.Enabled = true; marketTimer.Enabled = true;
......
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