Commit 9d230eba authored by 黄奎's avatar 黄奎

页面修改

parent f4ad1425
...@@ -153,5 +153,10 @@ namespace Edu.Model.ViewModel.User ...@@ -153,5 +153,10 @@ namespace Edu.Model.ViewModel.User
/// 查询未领取合同学员 /// 查询未领取合同学员
/// </summary> /// </summary>
public int IsNotContract { get; set; } public int IsNotContract { get; set; }
/// <summary>
/// 订单号,学员名称、微信、电话
/// </summary>
public string KeyWords { get; set; }
} }
} }
...@@ -1937,13 +1937,8 @@ namespace Edu.Module.User ...@@ -1937,13 +1937,8 @@ namespace Edu.Module.User
/// <summary> /// <summary>
/// 获取未领取合同的订单 /// 获取未领取合同的订单
/// </summary> /// </summary>
public List<object> GetContractNotModule(int pageIndex, int pageSize, out long rowsCount, int UserId) public List<object> GetContractNotModule(int pageIndex, int pageSize, out long rowsCount, RB_Student_OrderGuest_ViewModel query)
{ {
var query = new RB_Student_OrderGuest_ViewModel()
{
IsNotContract = 1,
CreateBy = UserId,
};
List<object> result = new List<object>(); List<object> result = new List<object>();
rowsCount = 0; rowsCount = 0;
var list = student_OrderGuestRepository.GetStuOrderGuestPageRepository(pageIndex, pageSize, out rowsCount, query); var list = student_OrderGuestRepository.GetStuOrderGuestPageRepository(pageIndex, pageSize, out rowsCount, query);
...@@ -1953,6 +1948,7 @@ namespace Edu.Module.User ...@@ -1953,6 +1948,7 @@ namespace Edu.Module.User
{ {
result.Add(new result.Add(new
{ {
StuId=item.Student_Id,
item.OrderId, item.OrderId,
item.ClassName, item.ClassName,
item.CourseName, item.CourseName,
......
...@@ -129,6 +129,7 @@ GROUP BY A.Student_Id,A.OrderId ...@@ -129,6 +129,7 @@ GROUP BY A.Student_Id,A.OrderId
/// <returns></returns> /// <returns></returns>
public List<RB_Student_OrderGuest_ViewModel> GetStuOrderGuestPageRepository(int pageIndex,int pageSize,out long rowsCount, RB_Student_OrderGuest_ViewModel query) public List<RB_Student_OrderGuest_ViewModel> GetStuOrderGuestPageRepository(int pageIndex,int pageSize,out long rowsCount, RB_Student_OrderGuest_ViewModel query)
{ {
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
SELECT A.*,IFNULL(B.ClassName,'') AS ClassName,IFNULL(B.ClassNo,'') AS ClassNo,IFNULL(C.JoinType,0) AS StuJoinType,IFNULL(D.GuestState,0) AS StuGuestState SELECT A.*,IFNULL(B.ClassName,'') AS ClassName,IFNULL(B.ClassNo,'') AS ClassNo,IFNULL(C.JoinType,0) AS StuJoinType,IFNULL(D.GuestState,0) AS StuGuestState
...@@ -178,11 +179,16 @@ WHERE 1=1 AND C.OrderState<>3 AND D.Status=0 ...@@ -178,11 +179,16 @@ WHERE 1=1 AND C.OrderState<>3 AND D.Status=0
} }
if (query.IsNotContract == 1) if (query.IsNotContract == 1)
{ {
builder.AppendFormat(" AND C.OrderType=1 and C.CourseId<>1 "); builder.AppendFormat(" AND C.OrderType=1 and C.CourseId<>1 AND stu.School_Id NOT IN(6,7,9) ");
builder.AppendFormat(@" AND NOT EXISTS(SELECT 1 FROM rb_education_contract WHERE A.OrderId=OrderId AND A.GuestId=GuestId AND `Status` NOT IN(4)) "); builder.AppendFormat(@" AND NOT EXISTS(SELECT 1 FROM rb_education_contract WHERE A.OrderId=OrderId AND A.GuestId=GuestId AND `Status` NOT IN(4)) ");
} }
if (!string.IsNullOrEmpty(query.KeyWords))
{
builder.Append(" AND (A.OrderId LIKE @KeyWords OR stu.StuName LIKE @KeyWords OR stu.WeChatNo LIKE @KeyWords OR stu.StuRealMobile LIKE @KeyWords) ");
parameters.Add("KeyWords", "%" + query.KeyWords.Trim() + "%");
}
} }
return GetPage<RB_Student_OrderGuest_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList(); return GetPage<RB_Student_OrderGuest_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
} }
......
...@@ -3420,7 +3420,13 @@ namespace Edu.WebApi.Controllers.User ...@@ -3420,7 +3420,13 @@ namespace Edu.WebApi.Controllers.User
var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString()); var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var userId = 0; var userId = 0;
//userId = base.UserInfo.Id; //userId = base.UserInfo.Id;
var list = studentModule.GetContractNotModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, userId); var query = new RB_Student_OrderGuest_ViewModel()
{
IsNotContract = 1,
CreateBy = userId,
KeyWords=base.ParmJObj.GetStringValue("KeyWords")
};
var list = studentModule.GetContractNotModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
pageModel.PageData = list; pageModel.PageData = list;
pageModel.Count = rowsCount; pageModel.Count = rowsCount;
return ApiResult.Success(data: pageModel); 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