@@ -80,6 +80,11 @@ WHERE 1=1 AND C.OrderState IN(1) AND D.Status=0
...
@@ -80,6 +80,11 @@ WHERE 1=1 AND C.OrderState IN(1) AND D.Status=0
{
{
builder.AppendFormat(" AND EXISTS(SELECT 1 FROM rb_course_chapter WHERE `Status`=0 AND CourseId=C.CourseId AND CourseRate IN({0}))",(int)query.CourseRate);
builder.AppendFormat(" AND EXISTS(SELECT 1 FROM rb_course_chapter WHERE `Status`=0 AND CourseId=C.CourseId AND CourseRate IN({0}))",(int)query.CourseRate);
}
}
//学员状态
if(query.StuGuestState>0)
{
builder.AppendFormat(@" AND D.GuestState IN({0}) ",(int)query.StuGuestState);
WHERE ss1.`Status` =0 and ss1.State =1 and ss1.Group_Id ={group_Id} and s1.StuName LIKE '%{stuName}%' and ss1.CourseGradeId ={CourseGradeId} and ss1.CourseGradeNo ={NextChapterGradeNo} GROUP BY ss1.StuId
WHERE ss1.`Status` =0 and ss1.State =1 and ss1.Group_Id ={group_Id} and s1.StuName LIKE '%{stuName}%' and ss1.CourseGradeId ={CourseGradeId} and ss1.CourseGradeNo ={NextChapterGradeNo} GROUP BY ss1.StuId
) ss on sog.Student_Id = ss.StuId
) ss on sog.Student_Id = ss.StuId
WHERE o.Group_Id ={group_Id} and sog.`Status` =0 and og.GuestState <>2 and o.OrderState <>3 and c.ClassScrollType =2 and s.StuName LIKE '%{stuName}%'";
WHERE o.Group_Id ={group_Id} and sog.`Status` =0 and og.GuestState NOT IN(2,7) and o.OrderState <>3 and c.ClassScrollType =2 and s.StuName LIKE '%{stuName}%'";