Commit 173a149b authored by 黄奎's avatar 黄奎

页面修改

parent 8583628b
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
using Edu.Common.Enum; using Edu.Common.Enum;
using Edu.Model.Entity.Course; using Edu.Model.Entity.Course;
using Edu.Model.ViewModel.Course; using Edu.Model.ViewModel.Course;
using Edu.Model.ViewModel.User;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -123,6 +124,7 @@ SELECT A.*,B.CourseName,D.TeacherName,IFNULL(D.TeacherHead,'') AS TeacherHead ...@@ -123,6 +124,7 @@ SELECT A.*,B.CourseName,D.TeacherName,IFNULL(D.TeacherHead,'') AS TeacherHead
/// <returns></returns> /// <returns></returns>
public List<RB_Class_ViewModel> GetClassPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Class_ViewModel query) public List<RB_Class_ViewModel> GetClassPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Class_ViewModel query)
{ {
var parameters = new DynamicParameters(); var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
...@@ -159,17 +161,17 @@ WHERE 1=1 ...@@ -159,17 +161,17 @@ WHERE 1=1
} }
if (!string.IsNullOrWhiteSpace(query.CourseName)) if (!string.IsNullOrWhiteSpace(query.CourseName))
{ {
builder.AppendFormat(" AND B.{0} LIKE @CourseName ", nameof(RB_Class_ViewModel.CourseName)); builder.AppendFormat(" AND B.{0} LIKE @CourseName ", nameof(RB_Course_ViewModel.CourseName));
parameters.Add("CourseName", "%" + query.CourseName.Trim() + "%"); parameters.Add("CourseName", "%" + query.CourseName.Trim() + "%");
} }
if (!string.IsNullOrWhiteSpace(query.AssistName)) if (!string.IsNullOrWhiteSpace(query.AssistName))
{ {
builder.AppendFormat(" AND C.{0} LIKE @AssistName ", nameof(RB_Class_ViewModel.AssistName)); builder.AppendFormat(" AND C.{0} LIKE @AssistName ", nameof(RB_Assist_ViewModel.AssistName));
parameters.Add("AssistName", "%" + query.AssistName.Trim() + "%"); parameters.Add("AssistName", "%" + query.AssistName.Trim() + "%");
} }
if (!string.IsNullOrWhiteSpace(query.TeacherName)) if (!string.IsNullOrWhiteSpace(query.TeacherName))
{ {
builder.AppendFormat(" AND D.{0} LIKE @TeacherName ", nameof(RB_Class_ViewModel.TeacherName)); builder.AppendFormat(" AND D.{0} LIKE @TeacherName ", nameof(RB_Teacher_ViewModel.TeacherName));
parameters.Add("TeacherName", "%" + query.TeacherName.Trim() + "%"); parameters.Add("TeacherName", "%" + query.TeacherName.Trim() + "%");
} }
} }
......
...@@ -68,7 +68,7 @@ WHERE 1=1 ...@@ -68,7 +68,7 @@ WHERE 1=1
{ {
if ((int)query.Status > -1) if ((int)query.Status > -1)
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_ViewModel.Status), query.Status); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_ViewModel.Status), (int)query.Status);
} }
if (!string.IsNullOrWhiteSpace(query.CourseName)) if (!string.IsNullOrWhiteSpace(query.CourseName))
{ {
......
...@@ -39,7 +39,9 @@ namespace Edu.WebApi.Controllers.Course ...@@ -39,7 +39,9 @@ namespace Edu.WebApi.Controllers.Course
ClassStatus = (ClassStatusEnum)base.ParmJObj.GetInt("ClassStatus"), ClassStatus = (ClassStatusEnum)base.ParmJObj.GetInt("ClassStatus"),
Teacher_Id = base.ParmJObj.GetInt("Teacher_Id"), Teacher_Id = base.ParmJObj.GetInt("Teacher_Id"),
CouseId = base.ParmJObj.GetInt("CouseId"), CouseId = base.ParmJObj.GetInt("CouseId"),
School_Id = base.ParmJObj.GetInt("School_Id") School_Id = base.ParmJObj.GetInt("School_Id"),
TeacherName = base.ParmJObj.GetStringValue("TeacherName"),
CourseName=base.ParmJObj.GetStringValue("CourseName"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
List<object> result = new List<object>(); List<object> result = new List<object>();
......
...@@ -813,7 +813,22 @@ namespace Edu.WebApi.Controllers.Course ...@@ -813,7 +813,22 @@ namespace Edu.WebApi.Controllers.Course
{ {
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
ResultPageModel pageModel = JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString()); ResultPageModel pageModel = JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
RB_Order_ViewModel demodel = JsonHelper.DeserializeObject<RB_Order_ViewModel>(RequestParm.Msg.ToString()); RB_Order_ViewModel demodel = new RB_Order_ViewModel()
{
OrderId = base.ParmJObj.GetInt("OrderId"),
GuestName = base.ParmJObj.GetStringValue("GuestName"),
ClassName = base.ParmJObj.GetStringValue("ClassName"),
CouseId = base.ParmJObj.GetInt("CouseId"),
StartTime = base.ParmJObj.GetStringValue("StartTime"),
EndTime = base.ParmJObj.GetStringValue("EndTime"),
OPStartTime = base.ParmJObj.GetStringValue("OPStartTime"),
OPEndTime = base.ParmJObj.GetStringValue("OPEndTime"),
Q_NotCollect = base.ParmJObj.GetInt("Q_NotCollect"),
OrderState = (OrderStateEnum)base.ParmJObj.GetInt("OrderState"),
Q_OrderState = base.ParmJObj.GetInt("Q_OrderState"),
Q_OrderBy = base.ParmJObj.GetInt("Q_OrderBy"),
PlatformTax = base.ParmJObj.GetDecimal("PlatformTax"),
};
demodel.Group_Id = userInfo.Group_Id; demodel.Group_Id = userInfo.Group_Id;
demodel.EnterID = userInfo.Id; demodel.EnterID = userInfo.Id;
......
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