Commit df504dbf authored by 黄奎's avatar 黄奎

页面修改

parent d276c4da
......@@ -47,16 +47,6 @@ namespace Edu.Module.Course
/// </summary>
private readonly RB_OrderRepository orderRepository = new RB_OrderRepository();
/// <summary>
/// 开始月份
/// </summary>
private int StartYear = 2021;
/// <summary>
/// 结束月份
/// </summary>
private int StartMoneh = 11;
/// <summary>
/// 生成业绩
/// </summary>
......@@ -94,7 +84,7 @@ namespace Edu.Module.Course
/// <param name="CurrentYear"></param>
/// <param name="CurrentMonth"></param>
/// <param name="isCalcReduce">true-计算抵扣,false-不计算</param>
private void CalcPersionBonusModule(RB_Bonus_PlanExtend item, int GroupId, string endDate, int saleId, int CurrentYear, int CurrentMonth, bool isCalcReduce = false)
private void CalcPersionBonusModule(RB_Bonus_PlanExtend item, int GroupId, string endDate, int saleId,int CurrentYear, int CurrentMonth, bool isCalcReduce = false)
{
var orderList = GetSaleOrderList(item, GroupId, endDate, saleId, out List<RB_Order_ViewModel> allOrderList);
var curNum = orderList?.Where(qitem => qitem.Year == CurrentYear && qitem.Month == CurrentMonth)?.Sum(qitem => qitem.GuestNum) ?? 0;
......@@ -103,7 +93,8 @@ namespace Edu.Module.Course
//查询销售已发放的奖励
var saleBonusList = personnel_BonusRepository.GetPersonnelBonusListRepository(new RB_Personnel_Bonus_Extend()
{
EmployeeId = saleId
EmployeeId = saleId,
RewardType=item.PlanType,
});
if (saleBonusList != null && saleBonusList.Count > 0)
{
......@@ -151,6 +142,8 @@ namespace Edu.Module.Course
UpdateBy = 1,
UpdateTime = DateTime.Now,
};
pModel.IsReach = pModel.CurOrderMoney > item.MonthGoalMoney ? 1 : 0;
var newId = personnel_BonusRepository.Insert(pModel);
pModel.Id = newId;
foreach (var oItem in allOrderList)
......@@ -225,7 +218,7 @@ namespace Edu.Module.Course
qitem.Key.Year,
qitem.Key.Month,
GuestNum = qitem.Sum(s => s.GuestNum),
OrderMoney = qitem.Sum(s => s.Income - s.Refund + s.PlatformTax)
OrderMoney = qitem.Sum(s => s.Income - s.Refund - s.PlatformTax)
});
foreach (var gItem in groupList)
......
......@@ -85,6 +85,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Personnel_Bonus_Extend.EmployeeId), query.EmployeeId);
}
if (query.RewardType > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Personnel_Bonus_Extend.RewardType), query.RewardType);
}
}
var list= Get<RB_Personnel_Bonus_Extend>(builder.ToString()).ToList();
if (list != null && list.Count > 0)
......
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