Commit ea636e7f authored by 吴春's avatar 吴春

提交代码

parent 7ddbdb59
......@@ -2095,19 +2095,35 @@ namespace Edu.Module.Course
Group_Id = model.Group_Id
});
foreach (var item in planList)
foreach (var item in planList.OrderBy(x => x.ClassDate))
{
item.PlanTimeList = new List<RB_Class_Time_ViewModel>();
item.PlanTimeList = timeList.Where(x => x.ClassId == item.ClassId &&(x.ClassPlanId == item.ClassPlanId || item.ClassDate == Convert.ToDateTime(Common.ConvertHelper.FormatDate(x.NewPlanDateTime)))).ToList();
item.PlanTimeList = timeList.Where(x => x.ClassId == item.ClassId && (x.ClassPlanId == item.ClassPlanId || item.ClassDate == Convert.ToDateTime(Common.ConvertHelper.FormatDate(x.NewPlanDateTime)))).ToList();
foreach (var itemTime in item.PlanTimeList)
{
itemTime.GuestList = new List<RB_Order_Guest_ViewModel>();
itemTime.GuestList = orderStudentList.Where(x => x.ClassId == itemTime.ClassId && (x.GuestState == 1 || x.GuestState == 6 || ((x.GuestState == 5 || x.GuestState == 7) && x.ChangeEffectTime.HasValue && Convert.ToDateTime(Common.ConvertHelper.FormatDate(x.ChangeEffectTime)) >= item.ClassDate))).ToList();
var tempList= orderStudentList.Where(x => x.ClassId == itemTime.ClassId && (x.GuestState == 1 || x.GuestState == 6 || ((x.GuestState == 5 || x.GuestState == 7) && x.ChangeEffectTime.HasValue && Convert.ToDateTime(Common.ConvertHelper.FormatDate(x.ChangeEffectTime)) >= item.ClassDate))).ToList();
foreach (var sItem in tempList)
{
itemTime.GuestList.Add(new RB_Order_Guest_ViewModel()
{
Id=sItem.Id,
GuestName = sItem.GuestName,
IsCheck = 0
});
}
foreach (var itemCheck in itemTime.GuestList)
{
//if (itemTime.ClassTimeId == 12805 || itemTime.ClassTimeId == 12806)
//{
// var str = "";
// int IsCheck = checkList?.Where(y => y.OrderGuestId == itemCheck.Id && y.ClassTimeId == itemTime.ClassTimeId).FirstOrDefault()?.CheckStatus ?? 2;
//}
//0-正常,1-缺勤,2-未签到
itemCheck.IsCheck = (checkList != null && checkList.Any()) ? checkList.Where(y => y.OrderGuestId == itemCheck.Id && y.ClassTimeId == itemTime.ClassTimeId).FirstOrDefault()?.CheckStatus ?? 2 : 2;
itemCheck.IsCheck = checkList?.Where(y => y.OrderGuestId == itemCheck.Id && y.ClassTimeId == itemTime.ClassTimeId).FirstOrDefault()?.CheckStatus ?? 2;
}
}
......@@ -2168,14 +2184,14 @@ namespace Edu.Module.Course
/// <returns></returns>
public bool DelLessonComment(RB_Class_LessonComment_ViewModel model)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Class_LessonComment_ViewModel.Status),1}
};
return classLessonCommentRepository.Update(fileds, new WhereHelper(nameof(RB_Class_LessonComment_ViewModel.LessonCommentId), model.LessonCommentId));
}
#endregion
......
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