Commit 1070b457 authored by liudong1993's avatar liudong1993

1 业绩提成调整

parent fe27f18f
......@@ -34,5 +34,10 @@ namespace Edu.Model.ViewModel.Sell
/// 奖励数量
/// </summary>
public int AwardOrderNum { get; set; }
/// <summary>
/// 当前订单金额
/// </summary>
public decimal OrderMoney { get; set; }
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -65,7 +65,10 @@ namespace Edu.Repository.Sell
{
where += $@" and r.{nameof(RB_Sell_Achievements_Details_ViewModel.IsDept)} ={demodel.IsDept}";
}
if (demodel.RelatedId > 0)
{
where += $@" and r.{nameof(RB_Sell_Achievements_Details_ViewModel.RelatedId)} ={demodel.RelatedId}";
}
string sql = $@" select r.* from RB_Sell_Achievements_Details r where {where} order by r.Id asc";
return Get<RB_Sell_Achievements_Details_ViewModel>(sql).ToList();
......
......@@ -179,5 +179,20 @@ WHERE e.Group_Id ={group_Id} and p.Periods in({string.Join(",", monthList)})
GROUP BY e.Type,e.EmpId,e.Rate,e.IsDept,p.Periods";
return Get<RB_Sell_Achievements_Emp_ViewModel>(sql).ToList();
}
/// <summary>
/// 获取订单有退款的
/// </summary>
/// <param name="group_Id"></param>
/// <param name="eDate"></param>
/// <returns></returns>
public List<RB_Sell_Achievements_Emp_ViewModel> GetAllRefundWaitPendingList(int group_Id)
{
string sql = $@"SELECT e.*,(o.Income + o.PlatformTax -o.Refund) as OrderMoney FROM rb_sell_achievements_emp e
LEFT JOIN rb_order o on e.OrderId =o.OrderId
WHERE e.Group_Id={group_Id} and (e.Type=2 or (e.Type=1 and e.IsDept=1)) and e.OrderSaleMoney <> (o.Income + o.PlatformTax -o.Refund) and e.OrderId>0 and e.Remark not like '%退款回扣%'
ORDER BY e.OrderId ASC ";
return Get<RB_Sell_Achievements_Emp_ViewModel>(sql).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