Commit ea349022 authored by 吴春's avatar 吴春

提交代码

parent 7d9890ac
......@@ -44,6 +44,25 @@ namespace Edu.Model.ViewModel.EduTask
/// </summary>
public string CourseName { get; set; }
/// <summary>
/// 上课日期
/// </summary>
public DateTime? ClassDate { get; set; }
/// <summary>
/// 上课开始时间
/// </summary>
public string StartTime { get; set; }
/// <summary>
/// 上课结束时间
/// </summary>
public string EndTime { get; set; }
/// <summary>
/// 上课课时
/// </summary>
public int TimeHour { get; set; }
/// <summary>
/// 学员信息
......
......@@ -51,7 +51,10 @@ namespace Edu.Module.EduTask
/// </summary>
private readonly RB_Student_StopClassRepository student_StopClassRepository = new RB_Student_StopClassRepository();
/// <summary>
/// 临时上课邀请计划仓储层对象
/// </summary>
private readonly RB_Student_TempInvitationRepository student_TempInvitationRepository = new RB_Student_TempInvitationRepository();
/// <summary>
/// 调课仓储层对象
/// </summary>
......@@ -77,6 +80,17 @@ namespace Edu.Module.EduTask
/// </summary>
private readonly RB_Order_ChangeRepository order_ChangeRepository = new RB_Order_ChangeRepository();
/// <summary>
/// 班级上课计划仓储层对象
/// </summary>
private readonly RB_Class_PlanRepository class_PlanRepository = new RB_Class_PlanRepository();
/// <summary>
/// 班级上课计划上课时间仓储层对象
/// </summary>
private readonly RB_Class_TimeRepository class_TimeRepository = new RB_Class_TimeRepository();
/// <summary>
/// 获取教务单据分页列表
/// </summary>
......@@ -97,12 +111,18 @@ namespace Edu.Module.EduTask
List<RB_Change_ClassPlan_ViewModel> changeClassList = new List<RB_Change_ClassPlan_ViewModel>();
//停课申请
List<RB_Student_StopClass_ViewModel> stopClassList = new List<RB_Student_StopClass_ViewModel>();
//临时上课邀请申请
List<RB_Student_TempInvitation_ViewModel> studentTempInvitationClassList = new List<RB_Student_TempInvitation_ViewModel>();
//老师列表
List<RB_Teacher_ViewModel> teacherList = new List<RB_Teacher_ViewModel>();
//学生信息
List<RB_Order_Guest_ViewModel> orderGuestList = new List<RB_Order_Guest_ViewModel>();
//教室列表
List<RB_Class_Room_ViewModel> roomList = new List<RB_Class_Room_ViewModel>();
//班级上课计划列表
List<RB_Class_Plan_ViewModel> planList = new List<RB_Class_Plan_ViewModel>();
//班级上课时间列表
List<RB_Class_Time_ViewModel> timeList = new List<RB_Class_Time_ViewModel>();
//订单转班列表
List<RB_Order_Change_ViewModel> orderTransList = new List<RB_Order_Change_ViewModel>();
var groupList = list.GroupBy(qitem => new { qitem.ReceiptType }).Select(qitem => new { qitem.Key.ReceiptType });
......@@ -218,7 +238,7 @@ namespace Edu.Module.EduTask
stopClassList = student_StopClassRepository.GetStudentStopClassListRepository(new RB_Student_StopClass_ViewModel()
{
Q_Student_StopClass_Ids = changeIds,
IsAuditThrough=-1
IsAuditThrough = -1
});
if (stopClassList != null && stopClassList.Any())
{
......@@ -229,7 +249,7 @@ namespace Edu.Module.EduTask
});
if (orderGuestList != null && orderGuestList.Any())
{
orderGuestList.ForEach(x => x.EnterName = x.EnterID > 0? (UserReidsCache.GetUserLoginInfo(x.EnterID)?.AccountName ?? ""):"");
orderGuestList.ForEach(x => x.EnterName = x.EnterID > 0 ? (UserReidsCache.GetUserLoginInfo(x.EnterID)?.AccountName ?? "") : "");
stopClassList.ForEach(x => x.Order_Guest_ViewModel = orderGuestList.Where(y => y.Id == x.OrderGuestId).FirstOrDefault());
}
}
......@@ -237,6 +257,42 @@ namespace Edu.Module.EduTask
#endregion
#region 临时上课邀请申请
if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.InvitationClass)
{
string changeIds = string.Join(",", list.Where(qitem => qitem.ReceiptType == subItem.ReceiptType).Select(qitem => qitem.RelationId));
studentTempInvitationClassList = student_TempInvitationRepository.GetStundetTempInvitationListRepository(new RB_Student_TempInvitation_ViewModel()
{
Q_TempInvitation_Ids = changeIds,
});
if (studentTempInvitationClassList != null && studentTempInvitationClassList.Any())
{
string orderGuestIds = string.Join(",", studentTempInvitationClassList.Select(x => x.OrderGuestIds));
orderGuestList = order_GuestRepository.GetStopingStudentPage(new RB_Order_Guest_ViewModel
{
OrderGuestIds = orderGuestIds
});
if (orderGuestList != null && orderGuestList.Any())
{
orderGuestList.ForEach(x => x.EnterName = x.EnterID > 0 ? (UserReidsCache.GetUserLoginInfo(x.EnterID)?.AccountName ?? "") : "");
foreach (var item in studentTempInvitationClassList)
{
item.OrderGuestList = new List<RB_Order_Guest_ViewModel>();
foreach (var itemOrderGuestId in item.OrderGuestIds.Split(","))
{
if (!string.IsNullOrWhiteSpace(itemOrderGuestId))
{
item.OrderGuestList.AddRange(orderGuestList.Where(x => x.Id == Convert.ToInt32(itemOrderGuestId)));
}
}
}
}
}
}
#endregion
#region 订单转班
if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.OrderTransClass)
{
......
......@@ -20,7 +20,7 @@ namespace Edu.Module.EduTask
private readonly RB_Education_ReceiptRepository education_ReceiptRepository = new RB_Education_ReceiptRepository();
/// <summary>
/// 停课计划仓储层对象
/// 临时上课邀请计划仓储层对象
/// </summary>
private readonly RB_Student_TempInvitationRepository student_TempInvitationRepository = new RB_Student_TempInvitationRepository();
......
......@@ -38,7 +38,7 @@ namespace Edu.WebApi.Controllers.EduTask
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetStudentStopClass()
public ApiResult SetStudentTempInvitation()
{
var model = new RB_Student_TempInvitation_ViewModel()
{
......
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