Commit bded5dea authored by 吴春's avatar 吴春

1

parent cb21769f
......@@ -54,6 +54,7 @@ namespace Edu.Model.Entity.Sell
/// </summary>
public int SellPriceType { get; set; }
/// <summary>
/// 总课时 2024-08-26 add by:W
/// </summary>
......
......@@ -241,5 +241,10 @@ namespace Edu.Model.Entity.Sell
/// 总计上课章节
/// </summary>
public int TotalChapterNo { get; set; }
/// <summary>
/// 课时单价 (应收总金额-教材费-课件费)/总课时 2024-08-26 add by:W
/// </summary>
public decimal ClassUnitPrice { get; set; }
}
}
......@@ -883,6 +883,9 @@ namespace Edu.Module.Course
decimal coursePrice = courseModel.SellPrice;//课程最低单价
demodel.CommissionReType = courseModel.CommissionReType;
//课时单价计算
// demodel.ClassUnitPrice = "";
#region 课程比例赋值
if (demodel.OrderId <= 0)
{
......@@ -1582,12 +1585,13 @@ namespace Edu.Module.Course
CompleteHours = 0,
MakeUpHours = 0,
StuIcon = item.StuIcon,
TotalHours = Convert.ToInt32(courseModel.ClassHours),
TotalHours = demodel.TotalClassHours, //Convert.ToInt32(courseModel.ClassHours),2024-08-30 add by:W
RenewState = item.IsRenewGuest == 1 ? 2 : 1,
QQ = item.QQ,
WeChatNo = item.WeChatNo,
TotalChapterNo = MaxChapterNo,
StudentId = item.StuId,
ClassUnitPrice=Math.Round(((demodel.PreferPrice - demodel.TextbookFee - demodel.CoursewareFee) / demodel.TotalClassHours),2),//课时单价 (应收总金额-教材费-课件费)/总课时
};
SetOrderGuestInfo(guestModel, out string Nmessage);
......@@ -2948,7 +2952,10 @@ namespace Edu.Module.Course
{
LogContent += ",总课时由【" + gModel.TotalHours + "】修改为【" + dmodel.TotalHours + "】";
}
if (gModel.ClassUnitPrice != dmodel.ClassUnitPrice)
{
LogContent += ",课时单价由【" + gModel.ClassUnitPrice + "】修改为【" + dmodel.ClassUnitPrice + "】";
}
if (gModel.StuIcon != dmodel.StuIcon)
{
LogContent += ",学生头像由【" + gModel.StuIcon + "】修改为【" + dmodel.StuIcon + "】";
......@@ -2959,6 +2966,7 @@ namespace Edu.Module.Course
gModel.ContractType = dmodel.ContractType;
gModel.ContractUrl = dmodel.ContractUrl;
gModel.UpdateTime = dmodel.UpdateTime;
gModel.ClassUnitPrice = dmodel.ClassUnitPrice;
flag = order_GuestRepository.Update(gModel);
}
......
......@@ -554,7 +554,7 @@ namespace Edu.WebApi.Controllers.Course
SaleRemark = base.ParmJObj.GetStringValue("SaleRemark"),
SourceId = base.ParmJObj.GetInt("SourceId"),
Unit_Price = base.ParmJObj.GetDecimal("Unit_Price"),
HelpEnterId = base.ParmJObj.GetInt("HelpEnterId"),
GeneralOccupation = base.ParmJObj.GetStringValue("GeneralOccupation"),
EduOccupation = base.ParmJObj.GetStringValue("EduOccupation"),
......@@ -649,7 +649,7 @@ namespace Edu.WebApi.Controllers.Course
demodel.CreateTime = DateTime.Now;
demodel.UpdateBy = userInfo.Id;
demodel.UpdateTime = DateTime.Now;
var flag = false;
string message = "";
......@@ -707,7 +707,7 @@ namespace Edu.WebApi.Controllers.Course
HelpEnterId = parms.GetInt("HelpEnterId"),
GeneralOccupation = parms.GetStringValue("GeneralOccupation"),
EduOccupation = parms.GetStringValue("EduOccupation"),
OrderNature = (OrderNatureEnum)parms.GetInt("OrderNature"),
OldPreferPrice = parms.GetDecimal("OldPreferPrice"),
CourseId = parms.GetInt("CourseId"),
......@@ -919,7 +919,7 @@ namespace Edu.WebApi.Controllers.Course
model.B2BReNewRatio,
model.SchoolRebateRatio,
model.SchoolReNewRatio,
Unit_PriceType= model.SellPriceType,//价格类型:1-总课时费,2-课时单价 2024-08-26 add by:W
Unit_PriceType = model.SellPriceType,//价格类型:1-总课时费,2-课时单价 2024-08-26 add by:W
model.TotalClassHours,//总课时数 2024-08-26 add by:W
model.CoursewareFee,//教材费
model.TextbookFee,//课件费
......@@ -1715,6 +1715,10 @@ namespace Edu.WebApi.Controllers.Course
x.StuSourceIdName,
x.BrokerageMoney,
x.StudyBroadRebateMoney,
x.TotalClassHours,
x.TextbookFee,
x.CoursewareFee,
x.SellPriceType,
})
};
pageModel.PageData = obj;
......
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