Browse Source

团组报表
机票预订修改

leiy 1 year ago
parent
commit
a9cf4deac1
1 changed files with 26 additions and 0 deletions
  1. 26 0
      OASystem/OASystem.Api/Controllers/StatisticsController.cs

+ 26 - 0
OASystem/OASystem.Api/Controllers/StatisticsController.cs

@@ -606,6 +606,32 @@ namespace OASystem.API.Controllers
                     {
                         str = $@"其中:{peoplePriStr}";
                     }
+
+                    //经济舱均价
+                    var airJJCPris = airClientPris.Where(it => it.AirType == "经济舱").ToList();
+                    if (airJJCPris.Count > 0)
+                    {
+                        decimal jjcTotalPrice = 0.00M;
+                        foreach (var item in airJJCPris)
+                        {
+                            jjcTotalPrice += item.Price;
+                        }
+                        decimal jjcPeopleNum = airJJCPris.Count;
+                        JJCAveragePrice = jjcTotalPrice / jjcPeopleNum;
+                    }
+
+                    //公务舱均价
+                    var airGWCPris = airClientPris.Where(it => it.AirType == "公务舱").ToList();
+                    if (airGWCPris.Count > 0)
+                    {
+                        decimal gwcTotalPrice = 0.00M;
+                        foreach (var item in airJJCPris)
+                        {
+                            gwcTotalPrice += item.Price;
+                        }
+                        decimal gwcPeopleNum = airGWCPris.Count;
+                        GWCAveragePrice = gwcTotalPrice / gwcPeopleNum;
+                    }
                 }
 
                 _geView.GroupAirFeeStr = $@"人名币总费用:{AirCNYTotalPrice.ToString("#0.00")} CNY\r\n{str}\r\n经济舱均价为:{JJCAveragePrice.ToString("#0.00")}CNY/人;公务舱均价为:{GWCAveragePrice.ToString("#0.00")}CNY/人;";