Commit d4086266 authored by liudong1993's avatar liudong1993

1

parent 1295f77c
...@@ -17,6 +17,11 @@ namespace Edu.Model.ViewModel.Course ...@@ -17,6 +17,11 @@ namespace Edu.Model.ViewModel.Course
/// 奖励ids /// 奖励ids
/// </summary> /// </summary>
public string BonusIds { get; set; } public string BonusIds { get; set; }
/// <summary>
/// 老师ids
/// </summary>
public string TeacherIds { get; set; }
/// <summary> /// <summary>
/// 教师名称 /// 教师名称
/// </summary> /// </summary>
......
...@@ -145,6 +145,10 @@ where {where} order by bd.Date asc"; ...@@ -145,6 +145,10 @@ where {where} order by bd.Date asc";
{ {
where += $@" and b.{nameof(RB_Teaching_BonusDetail.TeacherId)} ={demodel.TeacherId}"; where += $@" and b.{nameof(RB_Teaching_BonusDetail.TeacherId)} ={demodel.TeacherId}";
} }
if (!string.IsNullOrEmpty(demodel.TeacherIds))
{
where += $@" and b.{nameof(RB_Teaching_BonusDetail.TeacherId)} in({demodel.TeacherIds})";
}
if (demodel.ClassId > 0) if (demodel.ClassId > 0)
{ {
where += $@" and b.{nameof(RB_Teaching_BonusDetail.ClassId)} ={demodel.ClassId}"; where += $@" and b.{nameof(RB_Teaching_BonusDetail.ClassId)} ={demodel.ClassId}";
...@@ -190,6 +194,10 @@ where {where} order by b.TeacherId asc,b.Date asc"; ...@@ -190,6 +194,10 @@ where {where} order by b.TeacherId asc,b.Date asc";
{ {
where += $@" and b.{nameof(RB_Teaching_BonusDetail.TeacherId)} ={demodel.TeacherId}"; where += $@" and b.{nameof(RB_Teaching_BonusDetail.TeacherId)} ={demodel.TeacherId}";
} }
if (!string.IsNullOrEmpty(demodel.TeacherIds))
{
where += $@" and b.{nameof(RB_Teaching_BonusDetail.TeacherId)} in({demodel.TeacherIds})";
}
if (demodel.ClassId > 0) if (demodel.ClassId > 0)
{ {
where += $@" and b.{nameof(RB_Teaching_BonusDetail.ClassId)} ={demodel.ClassId}"; where += $@" and b.{nameof(RB_Teaching_BonusDetail.ClassId)} ={demodel.ClassId}";
......
...@@ -248,7 +248,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -248,7 +248,7 @@ namespace Edu.WebApi.Controllers.Course
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
var dmodel = JsonHelper.DeserializeObject<RB_Teaching_BonusDetail_ViewModel>(RequestParm.Msg.ToString()); var dmodel = JsonHelper.DeserializeObject<RB_Teaching_BonusDetail_ViewModel>(RequestParm.Msg.ToString());
dmodel.Group_Id = userInfo.Group_Id; dmodel.Group_Id = userInfo.Group_Id;
if (dmodel.BonusId <= 0 && string.IsNullOrEmpty(dmodel.BonusIds)) if (dmodel.BonusId <= 0)
{ {
return ApiResult.ParamIsNull("请传递教师奖励id"); return ApiResult.ParamIsNull("请传递教师奖励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