Commit ede7bec1 authored by 黄奎's avatar 黄奎

新增修改订单调整

parent d8c7edee
......@@ -98,7 +98,7 @@ namespace Edu.Model.Entity.Course
public decimal SellPrice { get; set; }
/// <summary>
/// 价格类型,1-基础价格,2-课时价格 2024-08-26 add by:w
/// 价格类型,1-课程总价,2-课时单价 2024-08-26 add by:w
/// </summary>
public int SellPriceType { get; set; }
......
......@@ -416,6 +416,7 @@ namespace Edu.Module.Course
{
return SetClassOrderCommonModule_V2(demodel, userInfo, isEditOrder, out message, out _);
}
/// <summary>
/// 日语培训下单(批量)
/// </summary>
......@@ -2090,7 +2091,7 @@ namespace Edu.Module.Course
if (demodel.JoinType == OrderJoinTypeEnum.InsertClass)
{
decimal newPreferPrice = 0;// Math.Round(coursePrice / courseModel.ClassHours * (courseModel.ClassHours - demodel.StartClassHours) * demodel.GuestNum, 2);
decimal newPreferPrice = 0;
foreach (var item in courseList)
{
newPreferPrice += (item.SellPrice / item.ClassHours * (item.ClassHours - demodel.StartClassHours) * demodel.GuestNum);
......@@ -2108,10 +2109,19 @@ namespace Edu.Module.Course
}
else
{
decimal newPreferPrice = 0;// Math.Round(coursePrice / courseModel.ClassHours * (courseModel.ClassHours - demodel.StartClassHours) * demodel.GuestNum, 2);
decimal newPreferPrice = 0;
foreach (var item in courseList)
{
newPreferPrice += (item.SellPrice * demodel.GuestNum);
//课程总价
if (item.SellPriceType == 1)
{
newPreferPrice += (item.SellPrice * demodel.GuestNum) ;
}
//课时单价
else
{
newPreferPrice += (item.SellPrice * demodel.TotalClassHours * demodel.GuestNum);
}
}
if (demodel.PreferPrice != Math.Round(newPreferPrice, 2))
{
......
......@@ -505,7 +505,6 @@ WHERE 1=1
}
}
builder.AppendFormat(" order by A.{0} asc", nameof(RB_Class_ViewModel.OpenTime));
Common.Plugin.LogHelper.WriteInfo("GetClassProductPageList::" + builder.ToString());
return GetPage<RB_Class_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
......
......@@ -95,6 +95,7 @@ WHERE 1=1
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Teacher_ViewModel.Dept_Id), query.Dept_Id);
}
}
builder.AppendFormat(" ORDER BY t.SortNum ASC ");
return Get<RB_Teacher_ViewModel>(builder.ToString(), parameters).ToList();
}
......
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