| 
															
																@@ -20,6 +20,7 @@ using Microsoft.Extensions.DependencyInjection; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using Aspose.Words.Lists; 
															 | 
															
															 | 
															
																 using Aspose.Words.Lists; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using static OASystem.API.OAMethodLib.GeneralMethod; 
															 | 
															
															 | 
															
																 using static OASystem.API.OAMethodLib.GeneralMethod; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using TypeInfo = OASystem.Domain.ViewModels.Statistics.TypeInfo; 
															 | 
															
															 | 
															
																 using TypeInfo = OASystem.Domain.ViewModels.Statistics.TypeInfo; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+using System.Net.NetworkInformation; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 namespace OASystem.API.Controllers 
															 | 
															
															 | 
															
																 namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 { 
															 | 
															
															 | 
															
																 { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -209,7 +210,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 List<Gsd_ProceedsReceivedView> _prViews = await _sqlSugar.SqlQueryable<Gsd_ProceedsReceivedView>(_prSql).ToListAsync(); 
															 | 
															
															 | 
															
																                 List<Gsd_ProceedsReceivedView> _prViews = await _sqlSugar.SqlQueryable<Gsd_ProceedsReceivedView>(_prSql).ToListAsync(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 prTotalAmount = _prViews.Sum(it => it.Price); 
															 | 
															
															 | 
															
																                 prTotalAmount = _prViews.Sum(it => it.Price); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 _giView.ProceedsReceivedViews = _prViews; 
															 | 
															
															 | 
															
																                 _giView.ProceedsReceivedViews = _prViews; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                _giView.ProceedsReceivedStr = string.Format(@$"应收合计:{frTotalAmount.ToString("#0.00")} CNY  已收款合计:{prTotalAmount.ConvertToDecimal1().ToString("#0.00")} CNY" ); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                _giView.ProceedsReceivedStr = string.Format(@$"应收合计:{frTotalAmount.ToString("#0.00")} CNY  已收款合计:{prTotalAmount.ConvertToDecimal1().ToString("#0.00")} CNY"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 /* 
															 | 
															
															 | 
															
																                 /* 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -273,7 +274,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 _giView.ExtraCostsViews = _ExtraCostsViews; 
															 | 
															
															 | 
															
																                 _giView.ExtraCostsViews = _ExtraCostsViews; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 _giView.ExtraCostsStr = string.Format(@"人民币总费用:{0} CNY", exTotalAmount.ConvertToDecimal1().ToString("#0.00")); 
															 | 
															
															 | 
															
																                 _giView.ExtraCostsStr = string.Format(@"人民币总费用:{0} CNY", exTotalAmount.ConvertToDecimal1().ToString("#0.00")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 /* 
															 | 
															
															 | 
															
																                 /* 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                  * 收款退还 
															 | 
															
															 | 
															
																                  * 收款退还 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                  */ 
															 | 
															
															 | 
															
																                  */ 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -291,7 +292,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 										         And ccp.IsAuditGM = 1 And ccp.IsPay = 1 
															 | 
															
															 | 
															
																 										         And ccp.IsAuditGM = 1 And ccp.IsPay = 1 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 										         And prom.DiId = {0} Order By PrCreateTime", _dto.DiId); 
															 | 
															
															 | 
															
																 										         And prom.DiId = {0} Order By PrCreateTime", _dto.DiId); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 var _promDatas = await _sqlSugar.SqlQueryable<Gsd_PaymentRefundAndOtherMoneyDataSource1View>(_ropSql).ToListAsync(); 
															 | 
															
															 | 
															
																                 var _promDatas = await _sqlSugar.SqlQueryable<Gsd_PaymentRefundAndOtherMoneyDataSource1View>(_ropSql).ToListAsync(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 foreach (var ropItem in _promDatas) 
															 | 
															
															 | 
															
																                 foreach (var ropItem in _promDatas) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 { 
															 | 
															
															 | 
															
																                 { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     string thisCueencyCode = "Unknown"; 
															 | 
															
															 | 
															
																                     string thisCueencyCode = "Unknown"; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -514,9 +515,9 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                         {ctggfr.FirstOrDefault()?.PaymentCurrency}(人民币: 
															 | 
															
															 | 
															
																                                                         {ctggfr.FirstOrDefault()?.PaymentCurrency}(人民币: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                         {ctggfr.Sum(it => Convert.ToDecimal(it.CNYPrice.ToString("#0.00"))).ToString("#0.00")} CNY 当时支付汇率: 
															 | 
															
															 | 
															
																                                                         {ctggfr.Sum(it => Convert.ToDecimal(it.CNYPrice.ToString("#0.00"))).ToString("#0.00")} CNY 当时支付汇率: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                         {ctggfr.FirstOrDefault()?.DayRate.ToString("#0.0000")})\r\n"); 
															 | 
															
															 | 
															
																                                                         {ctggfr.FirstOrDefault()?.DayRate.ToString("#0.0000")})\r\n"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        CTGGRCNYTotalPrice += ctggfr.Sum(it => Convert.ToDecimal( it.CNYPrice.ToString("#0.00"))); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        CTGGRCNYTotalPrice += ctggfr.Sum(it => Convert.ToDecimal(it.CNYPrice.ToString("#0.00"))); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                     
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 } 
															 | 
															
															 | 
															
																                 } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 foreach (var item in groupCTGGRFeeViews) 
															 | 
															
															 | 
															
																                 foreach (var item in groupCTGGRFeeViews) 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -532,7 +533,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 } 
															 | 
															
															 | 
															
																                 } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 _geView.GroupCTGGRFeeViews = groupCTGGRFeeViews; 
															 | 
															
															 | 
															
																                 _geView.GroupCTGGRFeeViews = groupCTGGRFeeViews; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                _geView.GroupCTGGRFeeStr = string.Format(@"{0}人民币总费用:{1} CNY", CTGGRFeeStr,CTGGRCNYTotalPrice.ToString("#0.00")); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                _geView.GroupCTGGRFeeStr = string.Format(@"{0}人民币总费用:{1} CNY", CTGGRFeeStr, CTGGRCNYTotalPrice.ToString("#0.00")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 #endregion 
															 | 
															
															 | 
															
																                 #endregion 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 #region 机票预订费用 
															 | 
															
															 | 
															
																                 #region 机票预订费用 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -541,7 +542,8 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 string groupAirFeeSql = string.Format(@"Select atr.Id As AirId,atr.DIId As AirDiId,atr.FlightsCode,atr.FlightsCity,sd4.Name As AirTypeName, 
															 | 
															
															 | 
															
																                 string groupAirFeeSql = string.Format(@"Select atr.Id As AirId,atr.DIId As AirDiId,atr.FlightsCode,atr.FlightsCity,sd4.Name As AirTypeName, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                         atr.FlightsDate,atr.FlightsTime,atr.ClientName,atr.ClientNum,ccp.PayMoney, 
															 | 
															
															 | 
															
																                                                         atr.FlightsDate,atr.FlightsTime,atr.ClientName,atr.ClientNum,ccp.PayMoney, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                         sd1.Name As PayMoneyCurrency,ccp.RMBPrice As CNYPrice,ccp.DayRate,ccp.Payee,ccp.AuditGMDate, 
															 | 
															
															 | 
															
																                                                         sd1.Name As PayMoneyCurrency,ccp.RMBPrice As CNYPrice,ccp.DayRate,ccp.Payee,ccp.AuditGMDate, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                                        ccp.OrbitalPrivateTransfer,sd2.Name As PayWay,sd3.Name As CardType,ccp.IsPay,u.CnName As Applicant,atr.CreateTime 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                                        ccp.OrbitalPrivateTransfer,sd2.Name As PayWay,sd3.Name As CardType,ccp.IsPay,u.CnName As Applicant,atr.CreateTime, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                                        atr.CType 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                         From Grp_AirTicketReservations atr 
															 | 
															
															 | 
															
																                                                         From Grp_AirTicketReservations atr 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                         Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 85 And atr.Id = ccp.CId 
															 | 
															
															 | 
															
																                                                         Left Join Grp_CreditCardPayment ccp On ccp.isdel = 0 And ccp.CTable = 85 And atr.Id = ccp.CId 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                         Left Join Sys_SetData sd1 On ccp.PaymentCurrency = sd1.Id 
															 | 
															
															 | 
															
																                                                         Left Join Sys_SetData sd1 On ccp.PaymentCurrency = sd1.Id 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -567,7 +569,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 //    GWCPeopleNum = groupAirFeeViews.Where(it => it.AirTypeName.Equals("公务舱")).Sum(it => it.ClientNum); 
															 | 
															
															 | 
															
																                 //    GWCPeopleNum = groupAirFeeViews.Where(it => it.AirTypeName.Equals("公务舱")).Sum(it => it.ClientNum); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 //    GWCAveragePrice = (GWCCNYTotalPrice / GWCPeopleNum).ConvertToDecimal1(); 
															 | 
															
															 | 
															
																                 //    GWCAveragePrice = (GWCCNYTotalPrice / GWCPeopleNum).ConvertToDecimal1(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 //} 
															 | 
															
															 | 
															
																                 //} 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 int Index = 0; 
															 | 
															
															 | 
															
																                 int Index = 0; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 foreach (var item in groupAirFeeViews) 
															 | 
															
															 | 
															
																                 foreach (var item in groupAirFeeViews) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 { 
															 | 
															
															 | 
															
																                 { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -576,6 +578,15 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         string itemClientName = ""; 
															 | 
															
															 | 
															
																                         string itemClientName = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         if (!string.IsNullOrEmpty(item.ClientName)) 
															 | 
															
															 | 
															
																                         if (!string.IsNullOrEmpty(item.ClientName)) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         { 
															 | 
															
															 | 
															
																                         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            System.Text.RegularExpressions.Match m_EnName = Regex.Match(item.ClientName, @"[A-Za-z]+"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            System.Text.RegularExpressions.Match m_ZHName = Regex.Match(item.ClientName, @"[\u4e00-\u9fa5]"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            if (m_EnName.Success || m_ZHName.Success) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                itemClientName = item.ClientName; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                continue; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             string[] clientIds = new string[] { }; 
															 | 
															
															 | 
															
																                             string[] clientIds = new string[] { }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             if (item.ClientName.Contains(',')) 
															 | 
															
															 | 
															
																                             if (item.ClientName.Contains(',')) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             { 
															 | 
															
															 | 
															
																                             { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -602,8 +613,9 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 int clienIndex = 1; 
															 | 
															
															 | 
															
																                                 int clienIndex = 1; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 foreach (var client in clients) 
															 | 
															
															 | 
															
																                                 foreach (var client in clients) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 { 
															 | 
															
															 | 
															
																                                 { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                    airClientPris.Add(new { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                        CnName = client.LastName+client.FirstName, 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                    airClientPris.Add(new 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                    { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                        CnName = client.LastName + client.FirstName, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                         EnName = client.Pinyin, 
															 | 
															
															 | 
															
																                                         EnName = client.Pinyin, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                         Price = unitCost, 
															 | 
															
															 | 
															
																                                         Price = unitCost, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                         AirType = item.AirTypeName 
															 | 
															
															 | 
															
																                                         AirType = item.AirTypeName 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -638,7 +650,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 int index = i + 1; 
															 | 
															
															 | 
															
																                                 int index = i + 1; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 if (index < clientNames.Length) 
															 | 
															
															 | 
															
																                                 if (index < clientNames.Length) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 { 
															 | 
															
															 | 
															
																                                 { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                    name = clientNames[index].Replace("MR","").Replace("MS","").Trim(); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                    name = clientNames[index].Replace("MR", "").Replace("MS", "").Trim(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     if (!string.IsNullOrEmpty(name)) 
															 | 
															
															 | 
															
																                                     if (!string.IsNullOrEmpty(name)) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     { 
															 | 
															
															 | 
															
																                                     { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                         airClientPris.Add(new 
															 | 
															
															 | 
															
																                                         airClientPris.Add(new 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -649,7 +661,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                             AirType = item.AirTypeName 
															 | 
															
															 | 
															
																                                             AirType = item.AirTypeName 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                         }); 
															 | 
															
															 | 
															
																                                         }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     } 
															 | 
															
															 | 
															
																                                     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                     
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     //if (name.Length > 0) 
															 | 
															
															 | 
															
																                                     //if (name.Length > 0) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     //{ 
															 | 
															
															 | 
															
																                                     //{ 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -661,8 +673,8 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     //} 
															 | 
															
															 | 
															
																                                     //} 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 } 
															 | 
															
															 | 
															
																                                 } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             } 
															 | 
															
															 | 
															
																                             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                             
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                            clientPinYinName += string.Format(@"{0}.{1}出票价为:{2} CNY;", Index+1, name, unitCost.ToString("#0.00")); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            clientPinYinName += string.Format(@"{0}.{1}出票价为:{2} CNY;", Index + 1, name, unitCost.ToString("#0.00")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         } 
															 | 
															
															 | 
															
																                         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     if (!string.IsNullOrEmpty(item.AuditGMDate)) 
															 | 
															
															 | 
															
																                     if (!string.IsNullOrEmpty(item.AuditGMDate)) 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -688,7 +700,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         { 
															 | 
															
															 | 
															
																                         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             price += pri.Price; 
															 | 
															
															 | 
															
																                             price += pri.Price; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         } 
															 | 
															
															 | 
															
																                         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        peoplePriStr += $@"{airClientPrisIndex}.{item.EnName}出票价为: { price.ToString("#0.00")} CNY;"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        peoplePriStr += $@"{airClientPrisIndex}.{item.EnName}出票价为: {price.ToString("#0.00")} CNY;"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         airClientPrisIndex++; 
															 | 
															
															 | 
															
																                         airClientPrisIndex++; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -709,7 +721,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         } 
															 | 
															
															 | 
															
																                         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         decimal jjcPeopleNum = airJJCPris.GroupBy(item => item.CnName) 
															 | 
															
															 | 
															
																                         decimal jjcPeopleNum = airJJCPris.GroupBy(item => item.CnName) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                                       .Select(group => group.First()) 
															 | 
															
															 | 
															
																                                                       .Select(group => group.First()) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                                      .ToList().Count();; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                                      .ToList().Count(); ; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         JJCAveragePrice = jjcTotalPrice / jjcPeopleNum; 
															 | 
															
															 | 
															
																                         JJCAveragePrice = jjcTotalPrice / jjcPeopleNum; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -786,12 +798,13 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     itemClientName += $"{client.LastName + client.FirstName},"; 
															 | 
															
															 | 
															
																                                     itemClientName += $"{client.LastName + client.FirstName},"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 } 
															 | 
															
															 | 
															
																                                 } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             } 
															 | 
															
															 | 
															
																                             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                            else { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            else 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 itemClientName = visaClients; 
															 | 
															
															 | 
															
																                                 itemClientName = visaClients; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             } 
															 | 
															
															 | 
															
																                             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         } 
															 | 
															
															 | 
															
																                         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    if (itemClientName.Length > 0 ) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    if (itemClientName.Length > 0) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     { 
															 | 
															
															 | 
															
																                     { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         itemClientName = itemClientName.Substring(0, itemClientName.Length - 1); 
															 | 
															
															 | 
															
																                         itemClientName = itemClientName.Substring(0, itemClientName.Length - 1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -976,7 +989,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             } 
															 | 
															
															 | 
															
																                             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         } 
															 | 
															
															 | 
															
																                         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                     
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     item.ClientName = itemClientName; 
															 | 
															
															 | 
															
																                     item.ClientName = itemClientName; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     if (!string.IsNullOrEmpty(item.AuditGMDate)) 
															 | 
															
															 | 
															
																                     if (!string.IsNullOrEmpty(item.AuditGMDate)) 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1077,7 +1090,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 decimal _amountReceived = 0.00M;   //已收金额 
															 | 
															
															 | 
															
																                 decimal _amountReceived = 0.00M;   //已收金额 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 decimal _receivableProfit = 0.00M; //应收利润 
															 | 
															
															 | 
															
																                 decimal _receivableProfit = 0.00M; //应收利润 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 decimal _receivedProfit = 0.00M;   //已收利润 
															 | 
															
															 | 
															
																                 decimal _receivedProfit = 0.00M;   //已收利润 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                _totalExpenditure = HotelCNYTotalPrice + CTGGRCNYTotalPrice + AirCNYTotalPrice + VisaCNYTotalPirce + InvitationalCNYTotalPrice +  
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                _totalExpenditure = HotelCNYTotalPrice + CTGGRCNYTotalPrice + AirCNYTotalPrice + VisaCNYTotalPirce + InvitationalCNYTotalPrice + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     InsuranceCNYTotalPrice + DecreaseCNYTotalPrice + exTotalAmount; 
															 | 
															
															 | 
															
																                                     InsuranceCNYTotalPrice + DecreaseCNYTotalPrice + exTotalAmount; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 _amountReceivable = frTotalAmount; 
															 | 
															
															 | 
															
																                 _amountReceivable = frTotalAmount; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 _amountReceived = prTotalAmount; 
															 | 
															
															 | 
															
																                 _amountReceived = prTotalAmount; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1135,7 +1148,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             string sqlWhere = string.Empty; 
															 | 
															
															 | 
															
																             string sqlWhere = string.Empty; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																             //起止时间 
															 | 
															
															 | 
															
																             //起止时间 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            DateTime beginDt = Convert.ToDateTime( $"{_dto.Year}-01-01 00:00:00"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            DateTime beginDt = Convert.ToDateTime($"{_dto.Year}-01-01 00:00:00"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             DateTime endDt = Convert.ToDateTime($"{_dto.Year}-12-31 23:59:59"); 
															 | 
															
															 | 
															
																             DateTime endDt = Convert.ToDateTime($"{_dto.Year}-12-31 23:59:59"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																             sqlWhere = string.Format(@$" Where Isdel = 0 "); 
															 | 
															
															 | 
															
																             sqlWhere = string.Format(@$" Where Isdel = 0 "); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1163,7 +1176,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 }); 
															 | 
															
															 | 
															
																                 }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            if (groupTypeId.Count > 0 ) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (groupTypeId.Count > 0) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 sqlWhere += string.Format(@$" And TeamDid In ({string.Join(',', groupTypeId)})"); 
															 | 
															
															 | 
															
																                 sqlWhere += string.Format(@$" And TeamDid In ({string.Join(',', groupTypeId)})"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1181,8 +1194,8 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             List<MonthInfo> months = new List<MonthInfo>(); 
															 | 
															
															 | 
															
																             List<MonthInfo> months = new List<MonthInfo>(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             if (_dto.StatisticsType == 1) //月份 
															 | 
															
															 | 
															
																             if (_dto.StatisticsType == 1) //月份 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                 months = GeneralMethod.GetMonthInfos(Convert.ToInt32(_dto.Year)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                months = GeneralMethod.GetMonthInfos(Convert.ToInt32(_dto.Year)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             else if (_dto.StatisticsType == 1) //季度 
															 | 
															
															 | 
															
																             else if (_dto.StatisticsType == 1) //季度 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1205,7 +1218,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 }); 
															 | 
															
															 | 
															
																                 }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            return Ok(JsonView(true,"操作成功!",_view)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            return Ok(JsonView(true, "操作成功!", _view)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             #endregion 
															 | 
															
															 | 
															
																             #endregion 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1641,7 +1654,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             List<GroupTypeNumberInfo> datas = new List<GroupTypeNumberInfo>(); 
															 | 
															
															 | 
															
																             List<GroupTypeNumberInfo> datas = new List<GroupTypeNumberInfo>(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             foreach (var item in groupInfos) 
															 | 
															
															 | 
															
																             foreach (var item in groupInfos) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                var data = await GroupBookingsNumber(_dto.Type,item); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                var data = await GroupBookingsNumber(_dto.Type, item); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 if (data.TypeItem.Count > 0) 
															 | 
															
															 | 
															
																                 if (data.TypeItem.Count > 0) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 { 
															 | 
															
															 | 
															
																                 { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1664,8 +1677,8 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             if (item1.RegionItem.Count > 0) 
															 | 
															
															 | 
															
																                             if (item1.RegionItem.Count > 0) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             { 
															 | 
															
															 | 
															
																                             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 GroupInfo groupInfo = new GroupInfo() 
															 | 
															
															 | 
															
																                                 GroupInfo groupInfo = new GroupInfo() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                {  
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                    DiId=item.DiId, 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                    DiId = item.DiId, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     TeamName = item.GroupName, 
															 | 
															
															 | 
															
																                                     TeamName = item.GroupName, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     CreateTime = groupInfos.Find(it => it.Id == item.DiId)?.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") ?? "Unknown", 
															 | 
															
															 | 
															
																                                     CreateTime = groupInfos.Find(it => it.Id == item.DiId)?.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") ?? "Unknown", 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     ClientUnit = groupInfos.Find(it => it.Id == item.DiId)?.ClientUnit ?? "Unknown", 
															 | 
															
															 | 
															
																                                     ClientUnit = groupInfos.Find(it => it.Id == item.DiId)?.ClientUnit ?? "Unknown", 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1688,7 +1701,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     infos = infos.OrderByDescending(it => it.CreateTime).ToList(); // 
															 | 
															
															 | 
															
																                     infos = infos.OrderByDescending(it => it.CreateTime).ToList(); // 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    _view.Add(new GroupBookingNumberView() { Name = item.Key, Number = item.Count(),GroupItem = infos }); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    _view.Add(new GroupBookingNumberView() { Name = item.Key, Number = item.Count(), GroupItem = infos }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 } 
															 | 
															
															 | 
															
																                 } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 _view = _view.OrderByDescending(it => it.Number).Take(10).ToList(); 
															 | 
															
															 | 
															
																                 _view = _view.OrderByDescending(it => it.Number).Take(10).ToList(); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1723,7 +1736,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     foreach (var item3 in item2.Data) 
															 | 
															
															 | 
															
																                                     foreach (var item3 in item2.Data) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     { 
															 | 
															
															 | 
															
																                                     { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                        StatisticsHotelInfo statisticsHotelInfos = JsonConvert.DeserializeObject<StatisticsHotelInfo>(JsonConvert.SerializeObject( item3)); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                                        StatisticsHotelInfo statisticsHotelInfos = JsonConvert.DeserializeObject<StatisticsHotelInfo>(JsonConvert.SerializeObject(item3)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                         HotelInfo hotelInfo = new HotelInfo() 
															 | 
															
															 | 
															
																                                         HotelInfo hotelInfo = new HotelInfo() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                         { 
															 | 
															
															 | 
															
																                                         { 
															 |