Commit dd35de86 authored by 黄奎's avatar 黄奎

查询修改

parent fa13dce5
......@@ -166,10 +166,7 @@ WHERE 1=1
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.AreaId), query.AreaId);
}
if (query.CreateBy > 0)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.CreateBy), query.CreateBy);
}
if (query.StuStage > 0)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.StuStage), (int)query.StuStage);
......@@ -199,17 +196,28 @@ WHERE 1=1
//全部
if (query.BelongType == 1)
{
builder.AppendFormat(@"
AND ( t.CreateBy={0}
OR t.StuId IN (SELECT StuId FROM rb_student_assist WHERE AssistId={0} AND `Status`=0)
)
", query.CreateBy);
}
//我负责的
if (query.BelongType == 2)
if (query.BelongType == 2 && query.CreateBy>0)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.CreateBy), query.CreateBy);
}
//我协同的
if (query.BelongType == 3)
{
builder.AppendFormat(" AND t.StuId IN (SELECT StuId FROM rb_student_assist WHERE AssistId={0} AND `Status`=0) ", query.CreateBy);
}
}
else
{
if (query.CreateBy > 0)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.CreateBy), query.CreateBy);
}
}
}
......
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