|
@@ -12263,8 +12263,8 @@ ORDER by gctggrc.id DESC
|
|
|
var ccpData = _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(it => it.IsDel == 0 && it.DIId == _dto.DiId && it.CTable == 76).ToList();
|
|
|
|
|
|
var _GroupCostParameter = _sqlSugar.Queryable<Grp_GroupCostParameter>().Where(it => it.IsDel == 0 && it.DiId == _dto.DiId).First();
|
|
|
- if (_GroupCostParameter == null) return Ok(JsonView(StatusCodes.Status400BadRequest, "团组成本费用未录入,不支持预定成本Excel导出", ""));
|
|
|
- if (string.IsNullOrEmpty(_GroupCostParameter.Currency))
|
|
|
+ //if (_GroupCostParameter == null) return Ok(JsonView(StatusCodes.Status400BadRequest, "团组成本费用未录入,不支持预定成本Excel导出", ""));
|
|
|
+ if (_GroupCostParameter == null)
|
|
|
{
|
|
|
//return Ok(JsonView(StatusCodes.Status400BadRequest, "团组成本费用“币种为录入”未录入,不支持预定成本Excel导出", ""));
|
|
|
bool isIntType = int.TryParse(_currency, out int currId);
|
|
@@ -12295,6 +12295,7 @@ ORDER by gctggrc.id DESC
|
|
|
|
|
|
string guestNames = ""; //格式Mr.xxx Ms.xxx
|
|
|
List<HotelReservations_PCFD_View> pcfds = new List<HotelReservations_PCFD_View>();
|
|
|
+ var rateDatas = new List<dynamic>();
|
|
|
#region 数据处理
|
|
|
|
|
|
foreach (var item in hrDtas)
|
|
@@ -12323,6 +12324,7 @@ ORDER by gctggrc.id DESC
|
|
|
cardPriceStr = string.Empty;
|
|
|
if (roomCurr.Equals("CNY"))
|
|
|
{
|
|
|
+ rateDatas.Add(new { code = "CNY", rate = 1.0000 });
|
|
|
singleRoomFeeStr = $"{item.SingleRoomPrice.ToString("#0.00")} {roomCurr}";
|
|
|
doubleRoomFeeStr = $"{item.DoubleRoomPrice.ToString("#0.00")} {roomCurr}";
|
|
|
suiteRoomFeeStr = $"{item.SuiteRoomPrice.ToString("#0.00")} {roomCurr}";
|
|
@@ -12342,7 +12344,7 @@ ORDER by gctggrc.id DESC
|
|
|
doubleRoomFeeStr = $"{item.DoubleRoomPrice.ToString("#0.00")} {roomCurr}\r\n{((item.DoubleRoomPrice * roomInfo.Rate) / _rate).ToString("#0.00")} {_currency}";
|
|
|
suiteRoomFeeStr = $"{item.SuiteRoomPrice.ToString("#0.00")} {roomCurr}\r\n{((item.SuiteRoomPrice * roomInfo.Rate) / _rate).ToString("#0.00")} {_currency}";
|
|
|
otherRoomFeeStr = $"{item.OtherRoomPrice.ToString("#0.00")} {roomCurr}\r\n{((item.OtherRoomPrice * roomInfo.Rate) / _rate).ToString("#0.00")} {_currency}";
|
|
|
-
|
|
|
+ rateDatas.Add(new { code = roomCurr, rate = roomInfo.Rate });
|
|
|
var ccpPaymentCurrency = currDatas.Find(it => it.Id == ccpInfo?.PaymentCurrency)?.Name ?? "";
|
|
|
if (ccpPaymentCurrency.Equals("CNY"))
|
|
|
{
|
|
@@ -12351,6 +12353,8 @@ ORDER by gctggrc.id DESC
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+
|
|
|
+ rateDatas.Add(new { code = ccpPaymentCurrency, rate = ccpInfo.DayRate });
|
|
|
payMoneyStr = $"{ccpInfo.PayMoney.ToString("#0.00")} {ccpPaymentCurrency}\r\n{((ccpInfo.PayMoney * ccpInfo.DayRate) / _rate).ToString("#0.00")} CNY";
|
|
|
}
|
|
|
|
|
@@ -12383,6 +12387,7 @@ ORDER by gctggrc.id DESC
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ rateDatas.Add(new { code = breakfastCurrency1, rate = breakfastInfo.Rate });
|
|
|
var breakfastPriceCny = breakfastInfo.Price * breakfastInfo.Rate;
|
|
|
breakfastPriceStr = $"{breakfastInfo?.Price.ToString("#0.00")} {breakfastCurrency1}\r\n{breakfastPriceCny.ToString("#0.00")} CNY";
|
|
|
}
|
|
@@ -12399,6 +12404,7 @@ ORDER by gctggrc.id DESC
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ rateDatas.Add(new { code = governmentRentCurrency1, rate = governmentRentInfo.Rate });
|
|
|
var governmentRentCny = governmentRentInfo.Price * governmentRentInfo.Rate;
|
|
|
governmentRentStr = $"{governmentRentInfo?.Price.ToString("#0.00")} {governmentRentCurrency1}\r\n{governmentRentCny.ToString("#0.00")} CNY";
|
|
|
}
|
|
@@ -12414,6 +12420,7 @@ ORDER by gctggrc.id DESC
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ rateDatas.Add(new { code = cityTaxStrCurrency1, rate = cityTaxInfo.Rate });
|
|
|
var cityTaxCny = cityTaxInfo.Price * cityTaxInfo.Rate;
|
|
|
cityTaxStr = $"{cityTaxInfo?.Price.ToString("#0.00")} {cityTaxStrCurrency1}\r\n{cityTaxCny.ToString("#0.00")} CNY";
|
|
|
}
|
|
@@ -12463,7 +12470,15 @@ ORDER by gctggrc.id DESC
|
|
|
var groupInfo = _sqlSugar.Queryable<Grp_DelegationInfo>().Where(it => it.Id == _dto.DiId).First();
|
|
|
var userInfo = _sqlSugar.Queryable<Sys_Users>().Where(it => it.Id == hrDtas[0].CreateUserId).First();
|
|
|
designer.SetDataSource("TourNo", groupInfo.TourCode);
|
|
|
- designer.SetDataSource("TeamName", $"{groupInfo.TeamName} 团组成本币种:{_currency} 团组汇率-->酒店模块汇率:{_rate.ToString("#0.0000")}");
|
|
|
+
|
|
|
+ var rateDatas1 = rateDatas.Distinct();
|
|
|
+ var rateStr = string.Empty;
|
|
|
+ foreach (var item in rateDatas1)
|
|
|
+ {
|
|
|
+ rateStr += $"{item.code} {item.rate.ToString("#0.0000")} \t\t";
|
|
|
+ }
|
|
|
+
|
|
|
+ designer.SetDataSource("TeamName", $"酒店模块汇率:{rateStr}");
|
|
|
designer.SetDataSource("Opertor", userInfo.CnName);
|
|
|
|
|
|
DataTable dt = CommonFun.GetDataTableFromIList<HotelReservations_PCFD_View>(pcfds);
|