Commit f0cba4ad authored by liudong1993's avatar liudong1993

1

parent df16aea9
......@@ -420,7 +420,7 @@ WHERE {where} ORDER BY {orderBy}
{
createBy = demodel.EnterID;
}
where += $@" and (o.{nameof(RB_Order_ViewModel.CreateBy)} = {createBy} OR o.{nameof(RB_Order_ViewModel.EnterID)}={createBy} )";
where += $@" and (o.{nameof(RB_Order_ViewModel.CreateBy)} = {createBy} OR o.{nameof(RB_Order_ViewModel.EnterID)}={createBy} OR o.{nameof(RB_Order_ViewModel.CourseConsultantId)}={createBy} )";
}
if (demodel.CourseSubject > 0)
{
......@@ -1429,8 +1429,9 @@ WHERE 1=1 AND A.OrderState IN(1,2) {0}
/// <returns></returns>
public List<RB_Order_ViewModel> GetConsultantRankList(int empId, string startMonth, string endMonth, int group_Id)
{
string sql = $@"SELECT o.CourseConsultantId,SUM(o.PreferPrice - o.DiscountMoney) as PreferPrice
string sql = $@"SELECT o.CourseConsultantId,SUM(o.PreferPrice) as PreferPrice,sum(o.DiscountMoney) as DiscountMoney
,SUM(o.Income) as Income,SUM(Refund) AS Refund,SUM(o.PlatformTax) as PlatformTax
,SUM(o.PreferPrice - o.Income + o.Refund - o.DiscountMoney - o.PlatformTax) AS DueInMoney
,COUNT(0) as CancelNum
FROM rb_order o WHERE o.Group_Id ={group_Id} and o.OrderState <>3 and o.CreateTime >='{startMonth}' and o.CreateTime <='{endMonth} 23:59:59' and o.CourseConsultantId >0 {(empId>0? " and o.CourseConsultantId ="+empId : "")}
GROUP BY o.CourseConsultantId";
......
......@@ -2887,7 +2887,6 @@ namespace Edu.WebApi.Controllers.Finance
ExcelRows = new List<ExcelColumn>()
{
new ExcelColumn(value: "合计"){ },
new ExcelColumn(value: ""){ },
new ExcelColumn(value: list.Sum(x=>x.PreferPrice).ToString("#0.00")){ },
new ExcelColumn(value: list.Sum(x=>x.Income).ToString("#0.00")){ },
new ExcelColumn(value: list.Sum(x=>x.Refund).ToString("#0.00")){ },
......
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