Commit 0d6652db authored by 吴春's avatar 吴春

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents db2ce208 a5ab1261
......@@ -1042,7 +1042,7 @@ namespace Edu.Module.Course
decimal bdCommission = bdList.Where(x => x.OrderId == qitem.OrderId).Sum(x => x.CommissionMoeny);
//decimal tCommission = AchEmpList.Where(x => x.Type == 3 && x.OrderId == qitem.OrderId).Sum(x => x.PushMoney);
decimal orderYj = qitem.PreferPrice - qitem.DiscountMoney - qitem.PlatformTax - qitem.CoursewareFee - qitem.TextbookFee - bdCommission;
if (qitem.HelpEnterId > 0) { orderYj = orderYj / 2; }
if (qitem.HelpEnterId > 0) { orderYj = orderYj / 2; }
AchEmpList.Add(new RB_Sell_Achievements_Emp_ViewModel()
{
EmpId = qitem.EnterID,
......@@ -1064,6 +1064,36 @@ namespace Edu.Module.Course
});
}
}
else if((awardModel?.Rate ?? 0) > 0)
{
//没有达标提成 只发放 人头奖励
foreach (var qitem in orderChildList)
{
//当前订单的业绩
decimal bdCommission = bdList.Where(x => x.OrderId == qitem.OrderId).Sum(x => x.CommissionMoeny);
decimal orderYj = qitem.PreferPrice - qitem.DiscountMoney - qitem.PlatformTax - qitem.CoursewareFee - qitem.TextbookFee - bdCommission;
if (qitem.HelpEnterId > 0) { orderYj = orderYj / 2; }
AchEmpList.Add(new RB_Sell_Achievements_Emp_ViewModel()
{
EmpId = qitem.EnterID,
GiveOutMoney = 0,
GiveOutState = 2,
Group_Id = userInfo.Group_Id,
Id = 0,
IsDept = 2,
OrderId = qitem.OrderId,
PeriodsId = 0,
Rate = rateModel?.Rate ?? 0,
PushMoney = 0,
RuleId = item.Id,
SaleMoney = TotalYj,
OrderSaleMoney = orderYj,
PeopleNumMoney = qitem.Refund <= 0 ? awardModel?.Rate ?? 0 : 0,
Type = 1,
Remark = "当月业绩:" + TotalYj + (TRefund != 0 ? "(其中退费:" + TRefund + ")" : "") + ";订单b2b返佣:" + bdCommission + ";订单业绩:" + orderYj + (qitem.HelpEnterId > 0 ? ";此单由试听转化,销售额减半计算" : "") + ";当月部门人头:" + PeopleNum + "人,人头奖励:" + (awardModel?.Rate ?? 0)+",业绩不达标,只发放人头奖励"
});
}
}
}
else
{
......
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