Commit dda17301 authored by liudong1993's avatar liudong1993

1

parent c0563696
...@@ -1614,7 +1614,7 @@ namespace REBORN.Module.CommissionModule ...@@ -1614,7 +1614,7 @@ namespace REBORN.Module.CommissionModule
HTCProfit = reportList.Any() ? reportList.Sum(x => (x.ShiJiLiRun ?? 0) + (x.TiCheng ?? 0) - (x.YongJinShouRu ?? 0) - x.LeaderPeopleMoney + x.EuropeShareProfit - (x.ZiFei ?? 0)) : 0; HTCProfit = reportList.Any() ? reportList.Sum(x => (x.ShiJiLiRun ?? 0) + (x.TiCheng ?? 0) - (x.YongJinShouRu ?? 0) - x.LeaderPeopleMoney + x.EuropeShareProfit - (x.ZiFei ?? 0)) : 0;
} }
//查询该订单的利润 //查询该订单的利润
if (hisOrder.TCProfit != HTCProfit) if (hisOrder.TCProfit != HTCProfit && HTCProfit>0)
{ {
if (hisOrder.PeopleNum <= 0) if (hisOrder.PeopleNum <= 0)
{ {
...@@ -1702,12 +1702,15 @@ namespace REBORN.Module.CommissionModule ...@@ -1702,12 +1702,15 @@ namespace REBORN.Module.CommissionModule
udmodel.CommissionMoney = Math.Round(udmodel.OrderProfit * udmodel.Rate / 100, 2, MidpointRounding.AwayFromZero); udmodel.CommissionMoney = Math.Round(udmodel.OrderProfit * udmodel.Rate / 100, 2, MidpointRounding.AwayFromZero);
udmodel.Description = $"订单提成利润变动:由【{hisOrder.OrderProfit}】变更为【{OProfit}】"; udmodel.Description = $"订单提成利润变动:由【{hisOrder.OrderProfit}】变更为【{OProfit}】";
udmodel.Periods = month; udmodel.Periods = month;
if (udmodel.CommissionMoney != 0 && udmodel.TCProfit >0)
{
DetailList.Add(udmodel); DetailList.Add(udmodel);
} }
} }
} }
} }
} }
}
//酒店 //酒店
var hotelHList = historyList.Where(x => x.OrderType == Common.Enum.Dmc.CRMMergeOrderTypeEnum.Hotel && !(x.Description ?? "").Contains("提成比例变动")).ToList(); var hotelHList = historyList.Where(x => x.OrderType == Common.Enum.Dmc.CRMMergeOrderTypeEnum.Hotel && !(x.Description ?? "").Contains("提成比例变动")).ToList();
if (hotelHList.Any()) if (hotelHList.Any())
...@@ -1738,12 +1741,15 @@ namespace REBORN.Module.CommissionModule ...@@ -1738,12 +1741,15 @@ namespace REBORN.Module.CommissionModule
udmodel.CommissionMoney = Math.Round(udmodel.OrderProfit * udmodel.Rate / 100, 2, MidpointRounding.AwayFromZero); udmodel.CommissionMoney = Math.Round(udmodel.OrderProfit * udmodel.Rate / 100, 2, MidpointRounding.AwayFromZero);
udmodel.Description = $"订单提成利润变动:由【{hisOrder.OrderProfit}】变更为【{OProfit}】"; udmodel.Description = $"订单提成利润变动:由【{hisOrder.OrderProfit}】变更为【{OProfit}】";
udmodel.Periods = month; udmodel.Periods = month;
if (udmodel.CommissionMoney != 0 && udmodel.TCProfit > 0)
{
DetailList.Add(udmodel); DetailList.Add(udmodel);
} }
} }
} }
} }
} }
}
//车 //车
var carHList = historyList.Where(x => x.OrderType == Common.Enum.Dmc.CRMMergeOrderTypeEnum.Car && !(x.Description ?? "").Contains("提成比例变动")).ToList(); var carHList = historyList.Where(x => x.OrderType == Common.Enum.Dmc.CRMMergeOrderTypeEnum.Car && !(x.Description ?? "").Contains("提成比例变动")).ToList();
if (carHList.Any()) if (carHList.Any())
...@@ -1771,12 +1777,15 @@ namespace REBORN.Module.CommissionModule ...@@ -1771,12 +1777,15 @@ namespace REBORN.Module.CommissionModule
udmodel.CommissionMoney = Math.Round(udmodel.OrderProfit * udmodel.Rate / 100, 2, MidpointRounding.AwayFromZero); udmodel.CommissionMoney = Math.Round(udmodel.OrderProfit * udmodel.Rate / 100, 2, MidpointRounding.AwayFromZero);
udmodel.Description = $"订单利润变动:由【{hisOrder.OrderProfit}】变更为【{newOrder.Income - newOrder.Refund - newOrder.CostMoney}】"; udmodel.Description = $"订单利润变动:由【{hisOrder.OrderProfit}】变更为【{newOrder.Income - newOrder.Refund - newOrder.CostMoney}】";
udmodel.Periods = month; udmodel.Periods = month;
if (udmodel.CommissionMoney != 0 && udmodel.OrderProfit > 0)
{
DetailList.Add(udmodel); DetailList.Add(udmodel);
} }
} }
} }
} }
} }
}
//门票 //门票
var ticketHList = historyList.Where(x => x.OrderType == Common.Enum.Dmc.CRMMergeOrderTypeEnum.Ticket && !(x.Description ?? "").Contains("提成比例变动")).ToList(); var ticketHList = historyList.Where(x => x.OrderType == Common.Enum.Dmc.CRMMergeOrderTypeEnum.Ticket && !(x.Description ?? "").Contains("提成比例变动")).ToList();
if (ticketHList.Any()) if (ticketHList.Any())
...@@ -1807,12 +1816,15 @@ namespace REBORN.Module.CommissionModule ...@@ -1807,12 +1816,15 @@ namespace REBORN.Module.CommissionModule
udmodel.CommissionMoney = Math.Round(udmodel.OrderProfit * udmodel.Rate / 100, 2, MidpointRounding.AwayFromZero); udmodel.CommissionMoney = Math.Round(udmodel.OrderProfit * udmodel.Rate / 100, 2, MidpointRounding.AwayFromZero);
udmodel.Description = $"订单提成利润变动:由【{hisOrder.OrderProfit}】变更为【{OProfit}】"; udmodel.Description = $"订单提成利润变动:由【{hisOrder.OrderProfit}】变更为【{OProfit}】";
udmodel.Periods = month; udmodel.Periods = month;
if (udmodel.CommissionMoney != 0 && udmodel.TCProfit > 0)
{
DetailList.Add(udmodel); DetailList.Add(udmodel);
} }
} }
} }
} }
} }
}
//单机票 //单机票
var airHList = historyList.Where(x => x.OrderType == Common.Enum.Dmc.CRMMergeOrderTypeEnum.Air && !(x.Description ?? "").Contains("提成比例变动")).ToList(); var airHList = historyList.Where(x => x.OrderType == Common.Enum.Dmc.CRMMergeOrderTypeEnum.Air && !(x.Description ?? "").Contains("提成比例变动")).ToList();
if (airHList.Any()) if (airHList.Any())
...@@ -1843,6 +1855,8 @@ namespace REBORN.Module.CommissionModule ...@@ -1843,6 +1855,8 @@ namespace REBORN.Module.CommissionModule
udmodel.CommissionMoney = Math.Round(udmodel.OrderProfit * udmodel.Rate / 100, 2, MidpointRounding.AwayFromZero); udmodel.CommissionMoney = Math.Round(udmodel.OrderProfit * udmodel.Rate / 100, 2, MidpointRounding.AwayFromZero);
udmodel.Description = $"订单提成利润变动:由【{hisOrder.OrderProfit}】变更为【{OProfit}】"; udmodel.Description = $"订单提成利润变动:由【{hisOrder.OrderProfit}】变更为【{OProfit}】";
udmodel.Periods = month; udmodel.Periods = month;
if (udmodel.CommissionMoney != 0 && udmodel.TCProfit > 0)
{
DetailList.Add(udmodel); DetailList.Add(udmodel);
} }
} }
...@@ -1850,6 +1864,7 @@ namespace REBORN.Module.CommissionModule ...@@ -1850,6 +1864,7 @@ namespace REBORN.Module.CommissionModule
} }
} }
} }
}
#endregion #endregion
#region 适配规则 #region 适配规则
......
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