Commit 5e939548 authored by 黄奎's avatar 黄奎

页面修改

parent bc75abf8
......@@ -509,7 +509,7 @@ namespace Edu.Module.Course
return flag;
}
}
else if (demodel.JoinType == OrderJoinTypeEnum.TransOrder)
else if (demodel.JoinType == OrderJoinTypeEnum.TransOrder || demodel.JoinType== OrderJoinTypeEnum.SplitOrder)
{
//不验证应收
}
......
......@@ -312,11 +312,15 @@ namespace Edu.Module.EduTask
if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.OrderTransClass)
{
string transClassIds = string.Join(",", list.Where(qitem => qitem.ReceiptType == subItem.ReceiptType).Select(qitem => qitem.RelationId));
orderTransList = order_ChangeRepository.GetOrderChangeListRepository(new RB_Order_Change_ViewModel()
var tempList = order_ChangeRepository.GetOrderChangeListRepository(new RB_Order_Change_ViewModel()
{
QIds = transClassIds,
ChangeType = 1,
});
if (tempList != null && tempList.Count > 0)
{
orderTransList.AddRange(tempList);
}
}
#endregion
......@@ -324,11 +328,15 @@ namespace Edu.Module.EduTask
if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.OrderSplitClass)
{
string transClassIds = string.Join(",", list.Where(qitem => qitem.ReceiptType == subItem.ReceiptType).Select(qitem => qitem.RelationId));
orderTransList = order_ChangeRepository.GetOrderChangeListRepository(new RB_Order_Change_ViewModel()
var tempList = order_ChangeRepository.GetOrderChangeListRepository(new RB_Order_Change_ViewModel()
{
QIds = transClassIds,
ChangeType = 2,
});
if (tempList != null && tempList.Count > 0)
{
orderTransList.AddRange(tempList);
}
}
#endregion
}
......
......@@ -270,6 +270,14 @@ namespace Edu.Module.EduTask
orderModel.UpdateBy = userInfo.Id;
orderModel.UpdateTime = DateTime.Now;
orderModel.OldGuestId = orderChangeModel.OrderGuestId;
if (oldOrderModel.SourceOrderId > 0)
{
orderModel.FirstOrderId = oldOrderModel.SourceOrderId;
}
else
{
orderModel.FirstOrderId = oldOrderModel.OrderId;
}
flag = orderModule.SetClassOrderCommonModule(orderModel, userInfo, false, out string message);
#endregion
......@@ -621,10 +629,14 @@ namespace Edu.Module.EduTask
});
var oldClassModel = classList?.Where(qitem => qitem.ClassId == oldOrderModel.ClassId)?.FirstOrDefault() ?? new RB_Class_ViewModel();
var newClassModel = classList?.Where(qitem => qitem.ClassId == orderChangeModel.NewClassId)?.FirstOrDefault() ?? new RB_Class_ViewModel();
//班级有效课时
var courseValidHourse = planList?.Sum(qitem => qitem.TimeHour) ?? 0;
//新课程信息
var newCourseModel = courseList?.Where(qitem => qitem.CourseId == orderChangeModel.NewCourseId)?.FirstOrDefault() ?? new RB_Course_ViewModel();
//班级有效课时
var courseValidHourse = planList?.Sum(qitem => qitem.TimeHour) ?? 0;
if (courseValidHourse > newCourseModel.ClassHours)
{
courseValidHourse = newCourseModel.ClassHours;
}
//原课程信息
var oldCourseModel = courseList.Where(qitem => qitem.CourseId == oldOrderModel.CourseId)?.FirstOrDefault() ?? new RB_Course_ViewModel();
......@@ -683,13 +695,13 @@ namespace Edu.Module.EduTask
orderModel.OldGuestId = orderChangeModel.OrderGuestId;
orderModel.NewGuestTotalClassHours = Convert.ToInt32(courseValidHourse);
orderModel.SourceOrderId = orderChangeModel.SourceOrderId;
if (orderModel.JoinType != Common.Enum.Sale.OrderJoinTypeEnum.SplitOrder && orderModel.JoinType != Common.Enum.Sale.OrderJoinTypeEnum.TransOrder)
if (oldOrderModel.TargetOrderId==0)
{
orderModel.FirstOrderId = oldOrderModel.OrderId;
}
else
{
orderModel.FirstOrderId = oldOrderModel.TargetOrderId;
orderModel.FirstOrderId = oldOrderModel.SourceOrderId;
}
flag = orderModule.SetClassOrderCommonModule(orderModel, userInfo, false, out string message);
#endregion
......
......@@ -778,7 +778,7 @@ namespace Edu.WebApi.Controllers.Course
List<object> guestList = new List<object>();
foreach (var item in orderGuestList.Where(x => x.GuestState == 1 || x.GuestState == 6 || ((x.GuestState == 5 || x.GuestState == 7) && x.ChangeEffectTime.HasValue && Convert.ToDateTime(Common.ConvertHelper.FormatDate(x.ChangeEffectTime)) >= data.ClassDate)))
{
if (item.JoinType == Common.Enum.Sale.OrderJoinTypeEnum.Normal|| item.JoinType == Common.Enum.Sale.OrderJoinTypeEnum.RenewOrder || (item.JoinType == Common.Enum.Sale.OrderJoinTypeEnum.InsertClass && data.ClassDate >= Convert.ToDateTime(Common.ConvertHelper.FormatDate(item.EffectTime))))
if (item.JoinType == Common.Enum.Sale.OrderJoinTypeEnum.InsertClass && data.ClassDate >= Convert.ToDateTime(Common.ConvertHelper.FormatDate(item.EffectTime)))
{
guestList.Add(new
{
......@@ -796,9 +796,9 @@ namespace Edu.WebApi.Controllers.Course
item.CompleteHours,
item.StartClassHours,
item.JoinType,
JoinTypeName=item.JoinType.ToName(),
JoinTypeName = item.JoinType.ToName(),
item.TargetJoinType,
TargetJoinTypeName=item.TargetJoinType.ToName(),
TargetJoinTypeName = item.TargetJoinType.ToName(),
item.SourceOrderId,
item.TargetOrderId,
item.EffectStatus,
......@@ -807,7 +807,39 @@ namespace Edu.WebApi.Controllers.Course
item.UpOrderId,
IsCheck = (checkLogList != null && checkLogList.Any()) ? checkLogList.Where(x => x.OrderGuestId == item.Id).FirstOrDefault()?.CheckStatus ?? -1 : -1,
StudyNum = (checkLogList != null && checkLogList.Any()) ? checkLogList.Where(x => x.OrderGuestId == item.Id).FirstOrDefault()?.StudyNum ?? 0 : 0,
IsTemp=0,
IsTemp = 0,
});
}
else
{
guestList.Add(new
{
UserIcon = "",
item.Id,
SexStr = item.Sex == 1 ? "男" : "女",
item.GuestName,
item.Age,
CreateTimeStr = Common.ConvertHelper.FormatTime(item.CreateTime),
item.Mobile,
item.OrderId,
item.CourseName,
item.CourseId,
item.TotalHours,
item.CompleteHours,
item.StartClassHours,
item.JoinType,
JoinTypeName = item.JoinType.ToName(),
item.TargetJoinType,
TargetJoinTypeName = item.TargetJoinType.ToName(),
item.SourceOrderId,
item.TargetOrderId,
item.EffectStatus,
item.EffectStatusStr,
EffectTime = Common.ConvertHelper.FormatDate(item.EffectTime),
item.UpOrderId,
IsCheck = (checkLogList != null && checkLogList.Any()) ? checkLogList.Where(x => x.OrderGuestId == item.Id).FirstOrDefault()?.CheckStatus ?? -1 : -1,
StudyNum = (checkLogList != null && checkLogList.Any()) ? checkLogList.Where(x => x.OrderGuestId == item.Id).FirstOrDefault()?.StudyNum ?? 0 : 0,
IsTemp = 0,
});
}
}
......
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