Commit 8292053e authored by liudong1993's avatar liudong1993

1

parent 639a1315
......@@ -134,7 +134,9 @@ namespace Edu.Module.Course
//预计退款金额
decimal backMoney = 0;
orderModel.CommissionMoney = returnComissionRepository.GetOrderReturnComissionListRepositpry(new RB_Order_ReturnComission_ViewModel() { GroupId = orderModel.Group_Id, QOrderIds = orderModel.OrderId.ToString() }).Sum(x => x.CommissionMoeny);
orderModel.TotalClassHours = guestModel.TotalHours;
orderModel.Unit_Price = guestModel.ClassUnitPrice;
backMoney = orderRepository.CalcBackMoneyRepository(orderModel, courseModel, FinishHours, out _);
var backClassModel = new RB_Student_BackClass_ViewModel()
......
......@@ -55,6 +55,11 @@ namespace Edu.Module.Course
/// </summary>
private readonly RB_OrderRepository orderRepository = new RB_OrderRepository();
/// <summary>
/// 订单返佣
/// </summary>
private readonly RB_Order_ReturnComissionRepository returnComissionRepository = new RB_Order_ReturnComissionRepository();
/// <summary>
/// 班级
/// </summary>
......@@ -134,6 +139,10 @@ namespace Edu.Module.Course
courseModel = courseRepository.GetEntity(classModel.CouseId);
}
//预计退款金额
var guestModel = order_GuestRepository.GetEntity(backModel.GuestId);
orderModel.CommissionMoney = returnComissionRepository.GetOrderReturnComissionListRepositpry(new RB_Order_ReturnComission_ViewModel() { GroupId = orderModel.Group_Id, QOrderIds = orderModel.OrderId.ToString() }).Sum(x => x.CommissionMoeny);
orderModel.TotalClassHours = guestModel.TotalHours;
orderModel.Class_Price = guestModel.ClassUnitPrice;
decimal backMoney = orderRepository.CalcBackMoneyRepository(orderModel, courseModel, FinishHours, out decimal classHourPrice);
var obj = new
{
......
......@@ -672,17 +672,16 @@ GROUP BY ClassId;";
{
newClassHourPrice = 0;
//课时单价
decimal classHourPrice = 0;
//原课时单价
//classHourPrice = orderModel.PreferPrice / orderModel.GuestNum / classModel.ClassHours;
//标准课时单价=课程卖价/课时
classHourPrice = courseModel.SellPrice / courseModel.ClassHours;
decimal classHourPrice = orderModel.Class_Price;
newClassHourPrice = classHourPrice;
//预计退款金额
decimal backMoney = 0;
//违约金
decimal breakContractPrice = (courseModel.ClassHours - FinishHours) * classHourPrice * Convert.ToDecimal(0.1);
backMoney = (orderModel.Income + orderModel.PlatformTax - orderModel.Refund) / orderModel.GuestNum - FinishHours * classHourPrice - breakContractPrice;
decimal breakContractPrice = (orderModel.TotalClassHours - FinishHours) * classHourPrice * Convert.ToDecimal(0.1);
//可退总金额
decimal OrderMoney = orderModel.Income + orderModel.PlatformTax - orderModel.Refund - orderModel.CoursewareFee - orderModel.TextbookFee - orderModel.CommissionMoney;
backMoney = OrderMoney / orderModel.GuestNum - FinishHours * classHourPrice - breakContractPrice;
return backMoney;
}
......
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