Commit f967339a authored by 黄奎's avatar 黄奎

页面修改

parent 5aedc1df
......@@ -1096,37 +1096,37 @@ namespace Edu.Module.Course
}
if (flag )
{
var guestModel = order_GuestRepository.GetEntity(item.OrderGuestId);
if (guestModel.GuestState == 1)
{
//学员完成课时
var stuCheckList = class_CheckRepository.GetGuestFinishMinutesRepository(item.OrderGuestId.ToString());
//学员缺勤课时
var stuNoCheckList = class_CheckRepository.GetGuestNoFinishMinutesRepository(item.OrderGuestId.ToString());
//总签到上课分钟数
var totalFinishMinutes = stuCheckList?.Sum(qitem => qitem.FinishMinutes) ?? 0;
//缺勤分钟数
var totalNoFinishMinutes = stuNoCheckList?.Sum(qitem => qitem.FinishMinutes) ?? 0;
//完成课时数
var FinishHours = Convert.ToInt32(totalFinishMinutes) / BasicMinutes;
//缺勤课时
var NoFinishHours = Convert.ToInt32(totalNoFinishMinutes) / BasicMinutes;
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Order_Guest_ViewModel.CompleteHours),FinishHours },
{nameof(RB_Order_Guest_ViewModel.MakeUpHours ),NoFinishHours },
};
if (NoFinishHours >= 12)
{
fileds.Add(nameof(RB_Order_Guest_ViewModel.GuestState), 5);
}
List<WhereHelper> wheres = new List<WhereHelper>()
{
new WhereHelper (nameof(RB_Order_Guest_ViewModel.Id),item.OrderGuestId),
};
flag = order_GuestRepository.Update(fileds, wheres);
}
//var guestModel = order_GuestRepository.GetEntity(item.OrderGuestId);
//if (guestModel.GuestState == 1)
//{
// //学员完成课时
// var stuCheckList = class_CheckRepository.GetGuestFinishMinutesRepository(item.OrderGuestId.ToString());
// //学员缺勤课时
// var stuNoCheckList = class_CheckRepository.GetGuestNoFinishMinutesRepository(item.OrderGuestId.ToString());
// //总签到上课分钟数
// var totalFinishMinutes = stuCheckList?.Sum(qitem => qitem.FinishMinutes) ?? 0;
// //缺勤分钟数
// var totalNoFinishMinutes = stuNoCheckList?.Sum(qitem => qitem.FinishMinutes) ?? 0;
// //完成课时数
// var FinishHours = Convert.ToInt32(totalFinishMinutes) / BasicMinutes;
// //缺勤课时
// var NoFinishHours = Convert.ToInt32(totalNoFinishMinutes) / BasicMinutes;
// Dictionary<string, object> fileds = new Dictionary<string, object>()
// {
// {nameof(RB_Order_Guest_ViewModel.CompleteHours),FinishHours },
// {nameof(RB_Order_Guest_ViewModel.MakeUpHours ),NoFinishHours },
// };
// if (NoFinishHours >= 12)
// {
// fileds.Add(nameof(RB_Order_Guest_ViewModel.GuestState), 5);
// }
// List<WhereHelper> wheres = new List<WhereHelper>()
// {
// new WhereHelper (nameof(RB_Order_Guest_ViewModel.Id),item.OrderGuestId),
// };
// flag = order_GuestRepository.Update(fileds, wheres);
//}
}
}
}
......
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