stringsql=$@"SELECT a.*,(select count(0) from rb_class_plan p where p.`Status`=0 and p.Group_Id ={groupId} and p.ClassId ={classId} and p.ClassDate < a.ClassDate) as LessonPlanNum
stringsql=$@"
SELECT a.*,(select count(0) from rb_class_plan p where p.`Status`=0 and p.Group_Id ={groupId} and p.ClassId ={classId} and p.ClassDate <= a.ClassDate) as LessonPlanNum
FROM rb_class_plan as a
FROM rb_class_plan as a
WHERE a.`Status`=0 and a.Group_Id ={groupId} and a.ClassId ={classId}
WHERE a.`Status`=0 and a.Group_Id ={groupId} and a.ClassId ={classId}
and a.ClassDate <='{Common.ConvertHelper.FormatDate(DateTime.Now)} 23:59:59'
and a.ClassDate <='{Common.ConvertHelper.FormatDate(DateTime.Now)} 23:59:59'