Commit 87c3468d authored by 黄奎's avatar 黄奎

111

parent abda47e2
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Model.ViewModel.Scroll
{
/// <summary>
/// 学员取消上课参数
/// </summary>
[Serializable]
public class CancelAppointmentModel
{
/// <summary>
/// 上课老师Id(RB_Teacher表TId)
/// </summary>
public int AccountId { get; set; }
/// <summary>
/// 上课日期
/// </summary>
public string Date { get; set; }
/// <summary>
/// 预约时段
/// </summary>
public string ShiftSort { get; set; }
/// <summary>
/// 取消学员
/// </summary>
public List<StuAppointItem> StuList { get; set; }
}
public class StuAppointItem
{
/// <summary>
/// rb_scroll_appointment表Id
/// </summary>
public int AppointId { get; set; }
/// <summary>
/// 是否扣除学员课时
/// </summary>
public int IsCalcStuCheck { get; set; }
}
}
...@@ -274,12 +274,12 @@ namespace Edu.Module.Course ...@@ -274,12 +274,12 @@ namespace Edu.Module.Course
firstModel.ChapterNo, firstModel.ChapterNo,
ChooseStuList = tempList.Select(qitem => new ChooseStuList = tempList.Select(qitem => new
{ {
qitem.LearnCourseId, CourseId= qitem.LearnCourseId,
qitem.StuId, qitem.StuId,
qitem.CourseGradeId, qitem.CourseGradeId,
qitem.GuestId, qitem.GuestId,
qitem.CourseGradeNo, qitem.CourseGradeNo,
qitem.Id, AppointmentId= qitem.Id,
qitem.StuName, qitem.StuName,
qitem.IsCalcStuCheck, qitem.IsCalcStuCheck,
qitem.State, qitem.State,
......
...@@ -3314,6 +3314,19 @@ namespace Edu.Module.Course ...@@ -3314,6 +3314,19 @@ namespace Edu.Module.Course
if (item.IsCalcStuCheck == 0) if (item.IsCalcStuCheck == 0)
{ {
class_CheckRepository.Delete(qitem); class_CheckRepository.Delete(qitem);
//更新学员完成课时
var oldCheckList =class_CheckRepository.GetClassCheckList(new RB_Class_Check_ViewModel() { QOrderGuestIds = item.GuestId.ToString() });
decimal finishHours = 0;
if (oldCheckList != null && oldCheckList.Count > 0)
{
finishHours = oldCheckList.Sum(qitem => qitem.CurrentDeductionHours);
}
Dictionary<string, object> guestFileds = new Dictionary<string, object>()
{
{nameof(RB_Order_Guest_Extend.CompleteHours), finishHours},
{nameof(RB_Order_Guest_Extend.StudyRemark),"后台取消签到"}
};
order_GuestRepository.Update(guestFileds, new WhereHelper(nameof(RB_Order_Guest_Extend.Id), item.GuestId));
} }
} }
} }
...@@ -3342,6 +3355,7 @@ namespace Edu.Module.Course ...@@ -3342,6 +3355,7 @@ namespace Edu.Module.Course
foreach (var qitem in tlist) foreach (var qitem in tlist)
{ {
class_TimeRepository.Delete(qitem); class_TimeRepository.Delete(qitem);
} }
} }
} }
......
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