Commit a5d3e2fd authored by liudong1993's avatar liudong1993

1

parent bddb6bb6
......@@ -417,6 +417,8 @@ namespace Edu.Module.Course
var courseModel = courseRepository.GetEntity(demodel.CourseId);
decimal coursePrice = courseModel.SellPrice;//课程最低单价
#region 课程比例赋值
if (demodel.OrderId <= 0)
{
demodel.B2CRatio = courseModel.B2CRatio;
demodel.B2CReNewRatio = courseModel.B2CReNewRatio;
demodel.B2BRebateRatio = courseModel.B2BRebateRatio;
......@@ -427,6 +429,20 @@ namespace Edu.Module.Course
demodel.TransIntroductceReNewRatio = courseModel.TransIntroductceReNewRatio;
demodel.InnerRecommendRatio = courseModel.InnerRecommendRatio;
demodel.InnerRecommendReNewRatio = courseModel.InnerRecommendReNewRatio;
}
else {
//使用订单的比例
courseModel.B2CRatio = orderModel.B2CRatio;
courseModel.B2CReNewRatio = orderModel.B2CReNewRatio;
courseModel.B2BRebateRatio = orderModel.B2BRebateRatio;
courseModel.B2BReNewRatio = orderModel.B2BReNewRatio;
courseModel.SchoolRebateRatio = orderModel.SchoolRebateRatio;
courseModel.SchoolReNewRatio = orderModel.SchoolReNewRatio;
courseModel.TransIntroductceRatio = orderModel.TransIntroductceRatio;
courseModel.TransIntroductceReNewRatio = orderModel.TransIntroductceReNewRatio;
courseModel.InnerRecommendRatio = orderModel.InnerRecommendRatio;
courseModel.InnerRecommendReNewRatio = orderModel.InnerRecommendReNewRatio;
}
#endregion
#region 计算订单优惠信息
List<RB_Student_ViewModel> StuList = new List<RB_Student_ViewModel>();
......@@ -2337,6 +2353,15 @@ namespace Edu.Module.Course
//新增学员信息
else
{
#region 验证电话是否已是他人客户
if (!string.IsNullOrEmpty(dmodel.Mobile)) {
var slist = studentRepository.GetStudentListRepository(new RB_Student_ViewModel() { Group_Id = dmodel.Group_Id, StuTel = dmodel.Mobile });
if (slist.Where(x => x.CustomerId != ordermodel.CustomerId).Any()) {
message = "学员'" + dmodel.GuestName + "'已被他人注册";
return false;
}
}
#endregion
dmodel.ClassId = ordermodel.ClassId;
dmodel.SourceId = ordermodel.SourceId;
int GuestNum = order_GuestRepository.GetOrderGuestNumRepository(new RB_Order_Guest_ViewModel() { OrderId = dmodel.OrderId, GuestState = GuestStateEnum.Normal });
......@@ -2423,7 +2448,7 @@ namespace Edu.Module.Course
UpdateBy = dmodel.CreateBy,
UpdateTime = DateTime.Now,
CustomerId = ordermodel.CustomerId,
StuStage = Common.Enum.User.StuStageEnum.NewStu
StuStage = Common.Enum.User.StuStageEnum.Clinch
};
studentRepository.SetStudentRepository(stuModel);
......
......@@ -79,6 +79,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.AreaId), query.AreaId);
}
if (query.CustomerId > 0)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.CustomerId), query.CustomerId);
}
if (!string.IsNullOrEmpty(query.StuIds))
{
builder.AppendFormat(" AND t.{0} in({1}) ", nameof(RB_Student_ViewModel.StuId), query.StuIds);
......
......@@ -697,7 +697,13 @@ namespace Edu.WebApi.Controllers.Course
model.TargetOrderId,
model.CustomerId,
model.CourseConsultantId,
model.OrderIdentify
model.OrderIdentify,
model.B2CRatio,
model.B2CReNewRatio,
model.B2BRebateRatio,
model.B2BReNewRatio,
model.SchoolRebateRatio,
model.SchoolReNewRatio
},
StepPriceList = list.Select(x => new
{
......
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