Commit 147924e0 authored by 黄奎's avatar 黄奎

查询修改

parent f0fecd68
...@@ -276,5 +276,20 @@ namespace Edu.Module.Customer ...@@ -276,5 +276,20 @@ namespace Edu.Module.Customer
return student_VisitRepository.Update(fileds, new WhereHelper(nameof(RB_Student_Visit_Extend.Id), Id)); return student_VisitRepository.Update(fileds, new WhereHelper(nameof(RB_Student_Visit_Extend.Id), Id));
} }
#endregion #endregion
/// <summary>
/// 获取学员日志分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Student_Log_Extend> GetStudentLogPageModule(int pageIndex, int pageSize, out long rowsCount, RB_Student_Log_Extend query)
{
var list = student_LogRepository.GetStudentLogPageRepository(pageIndex, pageSize, out rowsCount, query);
return list;
}
} }
} }
using Edu.Model.Entity.Customer; using Edu.Common.Enum;
using Edu.Model.Entity.Customer;
using Edu.Model.ViewModel.Customer; using Edu.Model.ViewModel.Customer;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -28,6 +29,19 @@ SELECT A.* ...@@ -28,6 +29,19 @@ SELECT A.*
FROM RB_Student_Appointment AS A FROM RB_Student_Appointment AS A
WHERE 1=1 WHERE 1=1
"); ");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Appointment_Extend.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Appointment_Extend.Group_Id), query.Group_Id);
}
if (query.StuId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Appointment_Extend.StuId), query.StuId);
}
}
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Student_Appointment_Extend.Id));
return GetPage<RB_Student_Appointment_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList(); return GetPage<RB_Student_Appointment_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
} }
......
using Edu.Model.Entity.Customer; using Edu.Common.Enum;
using Edu.Model.Entity.Customer;
using Edu.Model.ViewModel.Customer; using Edu.Model.ViewModel.Customer;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -28,7 +29,19 @@ SELECT A.* ...@@ -28,7 +29,19 @@ SELECT A.*
FROM RB_Student_Follow AS A FROM RB_Student_Follow AS A
WHERE 1=1 WHERE 1=1
"); ");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Follow_Extend.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Follow_Extend.Group_Id), query.Group_Id);
}
if (query.StuId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Follow_Extend.StuId), query.StuId);
}
}
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Student_Follow_Extend.Id));
return GetPage<RB_Student_Follow_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList(); return GetPage<RB_Student_Follow_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
} }
} }
......
using Edu.Model.Entity.Customer; using Edu.Common.Enum;
using Edu.Model.Entity.Customer;
using Edu.Model.ViewModel.Customer; using Edu.Model.ViewModel.Customer;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -28,10 +29,19 @@ SELECT A.* ...@@ -28,10 +29,19 @@ SELECT A.*
FROM RB_Student_Visit AS A FROM RB_Student_Visit AS A
WHERE 1=1 WHERE 1=1
"); ");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Visit_Extend.Status), (int)DateStateEnum.Normal);
if (query != null) if (query != null)
{ {
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Visit_Extend.Group_Id), query.Group_Id);
}
if (query.StuId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Visit_Extend.StuId), query.StuId);
}
} }
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Student_Visit_Extend.Id));
return GetPage<RB_Student_Visit_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList(); return GetPage<RB_Student_Visit_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
} }
} }
......
...@@ -248,5 +248,32 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -248,5 +248,32 @@ namespace Edu.WebApi.Controllers.Customer
var model = customerStudentModule.RemoveStudentVisitModule(Id); var model = customerStudentModule.RemoveStudentVisitModule(Id);
return ApiResult.Success(data: model); return ApiResult.Success(data: model);
} }
/// <summary>
/// 获取学员日志分页列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudentLogPage()
{
var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var query = new RB_Student_Log_Extend()
{
StuId = base.ParmJObj.GetInt("StuId"),
};
query.Group_Id = base.UserInfo.Group_Id;
var list = customerStudentModule.GetStudentLogPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
foreach (var item in list)
{
if (item.CreateBy > 0)
{
// item.CreateByName = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "";
}
}
pageModel.Count = rowsCount;
pageModel.PageData = list;
return ApiResult.Success(data: pageModel);
}
} }
} }
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