/// <summary> /// 描述:课次创建完成后的回调方法 /// <para>作 者:瞿琦</para> /// <para>创建时间:2018-11-7</para> /// </summary> public void AfterLessonCreate() { //已排课次的影响 if (base._entity.ClassTimes != _actualLesson) { EnrollOrderService service = new EnrollOrderService(base._entity.SchoolId); service.AddClassTimesUse(_enrollOrderItemId, base._entity.ClassTimes - _actualLesson, base._unitOfWork); } }
/// <summary> /// 生成写生课之后的操作 /// <para>作 者:郭伟佳</para> /// <para>创建时间:2018-11-13</para> /// </summary> public void AfterLessonCreate() { if (this._data != null && this._data.Count > 0) { //对报名的课程明细的已排课次进行累加 EnrollOrderService service = new EnrollOrderService(_entity.SchoolId); foreach (var itemId in _data.Select(a => a.EnrollOrderItemId).Distinct()) { service.AddClassTimesUse(itemId, _entity.UseLessonCount, _unitOfWork); } } }
/// <summary> /// 排课之后跟家长确认 /// <para>作 者:zhiwei.Tang</para> /// <para>创建时间:2019-02-19</para> /// </summary> public void AfterLessonCreate() { ValidateObject(_makeLesson); //跟家长确认 _makeLesson.IsConfirm = true; _makeLesson.ClassTimes = _lessonCount; _makeLessonRepository.Update(_makeLesson); EnrollOrderService service = new EnrollOrderService(_makeLesson.SchoolId); service.AddClassTimesUse(_makeLesson.EnrollOrderItemId, this._lessonCount, _unitOfWork); }
/// <summary> /// 取消之后的操作 /// <para>作 者:郭伟佳</para> /// <para>创建时间:2018-11-10</para> /// </summary> public void AfterLessonFinish() { var lessonInfoList = _lessonRepository.Value.GetByLessonIdTask(_lessonIdList).Result; if (lessonInfoList != null && lessonInfoList.Count > 0) { //对报名的课程明细的已排课次进行扣减 EnrollOrderService service = new EnrollOrderService(_entity.SchoolId); foreach (var itemId in lessonInfoList.Select(a => a.EnrollOrderItemId).Distinct()) { service.AddClassTimesUse(itemId, -_entity.UseLessonCount, _unitOfWork); } } }