stringsql=$@"SELECT f.*,f1.Remark,f1.CreateTime FROM
(SELECT StuId,AssistType,DATE_FORMAT(CreateTime,'%Y-%m') as MonthStr,MAX(Id) AS Id FROM rb_student_follow WHERE Group_Id ={group_Id} and `Status` =0 and StuId in ({stuIds}) and AssistType in(2,4)
GROUP BY StuId,AssistType,DATE_FORMAT(CreateTime,'%Y-%m')
stringsql=$@"SELECT s.StuId,DATE_FORMAT(o.CreateTime,'%Y-%m') AS MonthStr FROM rb_student s
INNER JOIN rb_student_orderguest sog on s.StuId = sog.Student_Id
INNER JOIN rb_order o on sog.OrderId = o.OrderId
INNER JOIN rb_order_guest og on og.Id = sog.GuestId
where s.Group_Id ={group_Id} and s.`Status` =0 and sog.`Status` =0 and o.OrderState <>3 and (o.RenewOrderId >0 or og.RenewState =2) and s.StuId in({stuIds})
GROUP BY s.StuId,DATE_FORMAT(o.CreateTime,'%Y-%m')
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'