|
@@ -1,4 +1,5 @@
|
|
|
using Aspose.Cells;
|
|
|
+using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
using OASystem.API.OAMethodLib;
|
|
|
using OASystem.Domain.AesEncryption;
|
|
@@ -513,7 +514,6 @@ ORDER BY
|
|
|
支付方式:{_setDatas.Find(it => it.Id == roomData?.PayDId)?.Name} <br/>
|
|
|
卡类型:{_setDatas.Find(it => it.Id == roomData?.CTDId)?.Name}<br/>
|
|
|
是否由地接支付:{isFeeMark1} <br/>";
|
|
|
-
|
|
|
}
|
|
|
|
|
|
var breakfastData = groupHotelContentFeeViews.Find(it => it.HrId == item.HrId && it.PriceType == 2); //早餐
|
|
@@ -578,7 +578,10 @@ ORDER BY
|
|
|
item.IsPay = 2;
|
|
|
item.PayTips = paymentStr;
|
|
|
}
|
|
|
-
|
|
|
+ //item.CNYPrice = roomData?.Price ?? 0.00M * roomData?.Rate ?? 0.00M +
|
|
|
+ // breakfastData?.Price ?? 0.00M * breakfastData?.Rate ?? 0.00M +
|
|
|
+ // landTaxData?.Price ?? 0.00M * landTaxData?.Rate ?? 0.00M +
|
|
|
+ // cityTaxData?.Price ?? 0.00M * cityTaxData?.Rate ?? 0.00M;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -5210,17 +5213,21 @@ WHERE
|
|
|
var nowBool = DateTime.TryParse(nowLable, out DateTime now);
|
|
|
if (!nowBool) return Ok(JsonView(false, $"请传入有效的当前时间(2024-11-27)!"));
|
|
|
|
|
|
+ var sql = string.Format(@"SELECT * FROM Grp_DelegationInfo WHERE ISdel = 0 AND '{0}' BETWEEN VisitStartDate AND VisitEndDate", nowLable);
|
|
|
+ var groupInfos = await _sqlSugar.SqlQueryable<Grp_DelegationInfo>(sql).Select(x => new { x.Id, x.VisitCountry, x.TeamName, x.VisitStartDate, x.VisitEndDate }).ToListAsync();
|
|
|
+
|
|
|
+ var groupIds = groupInfos.Select(x => x.Id).ToList();
|
|
|
#region 舱位类型
|
|
|
- //457 头等舱
|
|
|
- //458 公务舱
|
|
|
- //459 超经舱
|
|
|
- //460 经济舱
|
|
|
- //461 退票
|
|
|
- //565 其他
|
|
|
- //574 长段公务舱
|
|
|
- //575 短途经济舱
|
|
|
- //1023 行程单打印费
|
|
|
- //1024 选座费
|
|
|
+ //457 头等舱
|
|
|
+ //458 公务舱
|
|
|
+ //459 超经舱
|
|
|
+ //460 经济舱
|
|
|
+ //461 退票
|
|
|
+ //565 其他
|
|
|
+ //574 长段公务舱
|
|
|
+ //575 短途经济舱
|
|
|
+ //1023 行程单打印费
|
|
|
+ //1024 选座费
|
|
|
|
|
|
var classTypes = new int[] { 457, 458, 459, 460, 574, 575 };
|
|
|
|
|
@@ -5228,21 +5235,99 @@ WHERE
|
|
|
|
|
|
var throughCities = await _sqlSugar.Queryable<Grp_AirTicketReservations>()
|
|
|
.LeftJoin<Grp_DelegationInfo>((atr, di) => atr.DIId == di.Id)
|
|
|
- .Where((atr, di) => atr.IsDel == 0 && atr.FlightsDate.Trim().Equals(nowLable) && classTypes.Contains(atr.CType))
|
|
|
+ .Where((atr, di) => atr.IsDel == 0 &&
|
|
|
+ groupIds.Contains(atr.DIId) &&
|
|
|
+ atr.FlightsDate.Trim().Equals(nowLable) &&
|
|
|
+ classTypes.Contains(atr.CType))
|
|
|
.Select((atr, di) => new
|
|
|
{
|
|
|
atr.DIId,
|
|
|
di.TeamName,
|
|
|
atr.FlightsDate,
|
|
|
atr.FlightsCode,
|
|
|
- atr.FlightsCity
|
|
|
+ atr.FlightsCity,
|
|
|
+ atr.FlightsDescription
|
|
|
})
|
|
|
.ToListAsync();
|
|
|
|
|
|
+ if (!throughCities.Any()) return Ok(JsonView(false,"今日暂无团组出行!"));
|
|
|
+
|
|
|
+ foreach (var item in throughCities)
|
|
|
+ {
|
|
|
+ var dt = GeneralMethod.GetTableByBlackCode(item.DIId);
|
|
|
+
|
|
|
+ foreach (var row in dt.Rows)
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ throughCities = throughCities.Distinct().ToList(); // 去重
|
|
|
var cities = await _sqlSugar.Queryable<Res_ThreeCode>().Where(x => x.IsDel == 0).ToListAsync();
|
|
|
|
|
|
+ var view = new List<StatisticsNowCityOfGroupView>();
|
|
|
+ foreach (var item in throughCities)
|
|
|
+ {
|
|
|
+ var viewInfo = new StatisticsNowCityOfGroupView();
|
|
|
+
|
|
|
+ string flightCityLable = item.FlightsCity,
|
|
|
+ flightNoLable = item.FlightsCode;
|
|
|
+
|
|
|
+ if (flightCityLable.Contains(@"/") && flightNoLable.Contains(@"/"))
|
|
|
+ {
|
|
|
+ var flightCityArray = flightCityLable.Split(@"/");
|
|
|
+ var flightNoArray = flightNoLable.Split(@"/");
|
|
|
+ int index = 0;
|
|
|
+ foreach (var citys in flightCityArray)
|
|
|
+ {
|
|
|
+ viewInfo = CitySplit(citys, cities);
|
|
|
+ viewInfo.CurrDate = nowLable;
|
|
|
+ viewInfo.GroupName = item.TeamName;
|
|
|
+ viewInfo.FlightNo = flightNoArray[index];
|
|
|
+ view.Add(viewInfo);
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ viewInfo = CitySplit(flightCityLable, cities);
|
|
|
+ viewInfo.CurrDate = nowLable;
|
|
|
+ viewInfo.GroupName = item.TeamName;
|
|
|
+ viewInfo.FlightNo = flightNoLable;
|
|
|
+ view.Add(viewInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!view.Any()) return Ok(JsonView(false, "今日暂无团组出行!"));
|
|
|
+
|
|
|
+ return Ok(JsonView(view));
|
|
|
+ }
|
|
|
+
|
|
|
+ private StatisticsNowCityOfGroupView CitySplit(string cityLable,List<Res_ThreeCode> cities)
|
|
|
+ {
|
|
|
+ var info = new StatisticsNowCityOfGroupView();
|
|
|
+ if (string.IsNullOrEmpty(cityLable)) return info;
|
|
|
+
|
|
|
+ var cityArray = cityLable.Split("-");
|
|
|
+ var departCityCode = cityArray[0];
|
|
|
+ var arriveCityCode = cityArray[1];
|
|
|
+
|
|
|
+ var departAirportInfo = cities.Find(x => x.Three.Equals(departCityCode.ToUpper()));
|
|
|
+ info.DepartAirportCode = departCityCode;
|
|
|
+ info.DepartCountryName = departAirportInfo?.Country ?? "-";
|
|
|
+ info.DepartCityName = departAirportInfo?.City ?? "-";
|
|
|
+
|
|
|
+ var arriveAirportInfo = cities.Find(x => x.Three.Equals(arriveCityCode.ToUpper()));
|
|
|
+ info.ArriveAirportCode = arriveCityCode;
|
|
|
+ info.ArriveCountryName = arriveAirportInfo?.Country ?? "-";
|
|
|
+ info.ArriveCityName = arriveAirportInfo?.City ?? "-";
|
|
|
|
|
|
- return Ok(JsonView(false));
|
|
|
+ return info;
|
|
|
}
|
|
|
|
|
|
#endregion
|