Commit 6ae4f7b2 authored by 罗超's avatar 罗超

修改班级查询方法

parent 97f9c853
...@@ -226,6 +226,11 @@ namespace Edu.Model.ViewModel.Course ...@@ -226,6 +226,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary> /// </summary>
public int UsePlanNum { get; set; } public int UsePlanNum { get; set; }
/// <summary>
/// 多个课程状态(如:2,3)
/// </summary>
public string MoreStatus { get; set; }
} }
/// <summary> /// <summary>
......
...@@ -48,6 +48,18 @@ WHERE 1=1 ...@@ -48,6 +48,18 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0} in({1}) ", nameof(RB_Class_ViewModel.ClassId), query.Q_ClassIds); builder.AppendFormat(" AND A.{0} in({1}) ", nameof(RB_Class_ViewModel.ClassId), query.Q_ClassIds);
} }
if (query.School_Id > -1)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_ViewModel.School_Id), query.School_Id);
}
if (query.Teacher_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_ViewModel.Teacher_Id), query.Teacher_Id);
}
if (!string.IsNullOrEmpty(query.MoreStatus))
{
builder.AppendFormat(" AND A.{0} in({1}) ", nameof(RB_Class_ViewModel.ClassStatus), query.MoreStatus);
}
//查询未报满的班级 //查询未报满的班级
if (query.IsQuerySurplus == 1) if (query.IsQuerySurplus == 1)
{ {
......
...@@ -124,11 +124,17 @@ namespace Edu.WebApi.Controllers.Course ...@@ -124,11 +124,17 @@ namespace Edu.WebApi.Controllers.Course
int IsAddDefault = base.ParmJObj.GetInt("IsAddDefault"); int IsAddDefault = base.ParmJObj.GetInt("IsAddDefault");
var query = new RB_Class_ViewModel() var query = new RB_Class_ViewModel()
{ {
CouseId = base.ParmJObj.GetInt("CourseId"), CouseId = base.ParmJObj.GetInt("CourseId",0),
IsQuerySurplus = base.ParmJObj.GetInt("IsQuerySurplus"), IsQuerySurplus = base.ParmJObj.GetInt("IsQuerySurplus"),
School_Id = base.ParmJObj.GetInt("SchoolId",-1),
Teacher_Id = base.ParmJObj.GetInt("TeacherId", 0),
MoreStatus=base.ParmJObj.GetStringValue("MoreStatus")
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
query.School_Id = base.UserInfo.School_Id; //if (query.School_Id == -1)
//{
// query.School_Id = base.UserInfo.School_Id;
//}
var list = classModule.GetClassListModule(query); var list = classModule.GetClassListModule(query);
if (list == null) if (list == null)
{ {
......
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