@@ -215,7 +215,7 @@ LEFT JOIN rb_teacher as t on a.TeacherId=t.TId
LEFT JOIN rb_class as c on c.ClassId=a.ClassId
LEFT JOIN rb_course as cou on cou.CourseId=c.CouseId
LEFT JOIN (SELECT ClassPlanId,MAX(LessonPlanId) as LessonPlanId from rb_class_lessonplan where `Status`=0 GROUP BY ClassPlanId) as lp on lp.ClassPlanId=a.ClassPlanId
where a.`Status`=0 and b.ClassStatus<>2 and c.ClassStatus =2 and a.ClassRoomId={RoomId} and a.Group_Id={Group_Id} and DATE_FORMAT(A.ClassDate,'%Y-%m-%d')>=DATE_FORMAT(NOW(),'%Y-%m-%d') ORDER BY CONCAT( DATE_FORMAT(A.ClassDate,'%Y-%m-%d') ,' ',B.EndTime,':00') asc LIMIT 10");
where a.`Status`=0 and b.ClassStatus<>2 and c.ClassStatus in(1,2) and a.ClassRoomId={RoomId} and a.Group_Id={Group_Id} and DATE_FORMAT(A.ClassDate,'%Y-%m-%d')>=DATE_FORMAT(NOW(),'%Y-%m-%d') ORDER BY CONCAT( DATE_FORMAT(A.ClassDate,'%Y-%m-%d') ,' ',B.EndTime,':00') asc LIMIT 10");
@@ -236,7 +236,7 @@ LEFT JOIN rb_class as c on c.ClassId=a.ClassId
LEFT JOIN rb_course as cou on cou.CourseId=c.CouseId
LEFT JOIN rb_class_room as croom on croom.RoomId=a.ClassRoomId
LEFT JOIN (SELECT ClassPlanId,MAX(LessonPlanId) as LessonPlanId from rb_class_lessonplan where `Status`=0 GROUP BY ClassPlanId) as lp on lp.ClassPlanId=a.ClassPlanId
where a.`Status`=0 and c.ClassStatus =2 and a.ClassId={ClassId} and a.Group_Id={Group_Id} and DATE_FORMAT(A.ClassDate,'%Y-%m-%d')>=DATE_FORMAT(NOW(),'%Y-%m-%d') ORDER BY CONCAT( DATE_FORMAT(A.ClassDate,'%Y-%m-%d') ,' ',B.EndTime,':00') asc LIMIT 10");
where a.`Status`=0 and c.ClassStatus in(1,2) and a.ClassId={ClassId} and a.Group_Id={Group_Id} and DATE_FORMAT(A.ClassDate,'%Y-%m-%d')>=DATE_FORMAT(NOW(),'%Y-%m-%d') ORDER BY CONCAT( DATE_FORMAT(A.ClassDate,'%Y-%m-%d') ,' ',B.EndTime,':00') asc LIMIT 10");
@@ -255,7 +255,7 @@ LEFT JOIN rb_class as c on c.ClassId=a.ClassId
LEFT JOIN rb_course as cou on cou.CourseId=c.CouseId
LEFT JOIN rb_class_room as croom on croom.RoomId=a.ClassRoomId
LEFT JOIN (SELECT ClassPlanId,MAX(LessonPlanId) as LessonPlanId from rb_class_lessonplan where `Status`=0 GROUP BY ClassPlanId) as lp on lp.ClassPlanId=a.ClassPlanId
where a.`Status`=0 and c.ClassStatus =2 and a.TeacherId={TId} and a.Group_Id={Group_Id} and DATE_FORMAT(A.ClassDate,'%Y-%m-%d')>=DATE_FORMAT(NOW(),'%Y-%m-%d') ORDER BY CONCAT( DATE_FORMAT(A.ClassDate,'%Y-%m-%d') ,' ',B.EndTime,':00') asc LIMIT 10");
where a.`Status`=0 and c.ClassStatus in(1,2) and a.TeacherId={TId} and a.Group_Id={Group_Id} and DATE_FORMAT(A.ClassDate,'%Y-%m-%d')>=DATE_FORMAT(NOW(),'%Y-%m-%d') ORDER BY CONCAT( DATE_FORMAT(A.ClassDate,'%Y-%m-%d') ,' ',B.EndTime,':00') asc LIMIT 10");
where+=$@" and b.{nameof(RB_Notice.NoticeState)} ={(int)demodel.NoticeState}";
}
if(demodel.Is_Top>0)
{
where+=$@" and b.{nameof(RB_Notice.Is_Top)} ={demodel.Is_Top}";
}
if(demodel.CreateBy>0)//审核人
{
where+=$@" and a.CreateBy ={demodel.CreateBy}";
}
if(demodel.UpdateBy>0)
{
where+=$@" and b.{nameof(RB_Notice.UpdateBy)} ={demodel.UpdateBy}";
}
stringOrderBy=" a.CLogId desc";
if(demodel.OrderBy==1)
{
OrderBy=" b.UpdateTime desc";
}
elseif(demodel.OrderBy==2)
{
OrderBy=" b.Is_Top asc,b.UpdateTime desc";
}
stringsql=$@" select b.*,a.ReviewStatus,a.CreateTime as ReviewTime,a.LogContent from rb_notice_log as a LEFT JOIN rb_notice as b on a.NoticeId=b.Id where {where} order by {OrderBy}";