|
@@ -1449,6 +1449,28 @@ namespace OASystem.API.Controllers
|
|
|
priceModule = sdPriceName.Name;
|
|
|
}
|
|
|
|
|
|
+ /*
|
|
|
+ * 成本信息
|
|
|
+ */
|
|
|
+ var groupCost = _groupRepository.Query<Grp_GroupCostParameter >(s => s.DiId == _dto.DiId && s.IsDel == 0).First();
|
|
|
+ decimal _groupRate = 0.0000M;
|
|
|
+ string _groupCurrencyCode = "-";
|
|
|
+ if (groupCost != null)
|
|
|
+ {
|
|
|
+ _groupRate = groupCost.Rate;
|
|
|
+ if (int.TryParse(groupCost.Currency, out int _currency))
|
|
|
+ {
|
|
|
+ _groupCurrencyCode = currencyItems.Find(it => it.Id == _currency)?.Name ?? "-";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ string costContentSql = $"Select * From Grp_GroupCost";
|
|
|
+ var groupCostDetails = _sqlSugar.SqlQueryable<GroupCostAuditView>(costContentSql).Where(x => x.IsDel == 0 && x.Diid == _dto.DiId).ToList();
|
|
|
+ //处理日期为空的天数
|
|
|
+ for (int i = 0; i < groupCostDetails.Count; i++)
|
|
|
+ if (i != 0)
|
|
|
+ if (string.IsNullOrEmpty(groupCostDetails[i].Date))
|
|
|
+ groupCostDetails[i].Date = groupCostDetails[i - 1].Date;
|
|
|
+
|
|
|
/*
|
|
|
* 处理详情数据
|
|
|
*/
|
|
@@ -1603,13 +1625,34 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ string hotelCostStr = "<span style='font-weight:800;'>成本信息</span><br/>";
|
|
|
+ if (groupCost != null)
|
|
|
+ {
|
|
|
+ if (int.TryParse(groupCost.Currency, out int currencyId)) groupCost.Currency = currencyItems.Find(s => s.Id == currencyId)?.Name ?? "-";
|
|
|
+
|
|
|
+ hotelCostStr += $"{groupCost.Currency}(汇率:{groupCost.Rate.ToString("#0.0000")})</br>";
|
|
|
+ }
|
|
|
+ var hotelCostDetails = groupCostDetails.Where(x => Convert.ToDateTime(x.Date) >= Convert.ToDateTime(hotelReservations.CheckInDate) &&
|
|
|
+ Convert.ToDateTime(x.Date) <= Convert.ToDateTime(hotelReservations.CheckOutDate)).ToList();
|
|
|
+ var hotelCostDetails1 = hotelCostDetails.GroupBy(x => x.Date);
|
|
|
+ foreach (var item in hotelCostDetails1)
|
|
|
+ {
|
|
|
+ hotelCostStr += @$"{item.First()?.Date ?? "-"}";
|
|
|
+ if (item.Sum(x => x.HotelSingleRoomFee) != 0) hotelCostStr += @$" 单间:{item.Sum(x => x.HotelSingleRoomFee).ToString("#0.00")}";
|
|
|
+ if (item.Sum(x => x.HotelDoubleRoomFee) != 0) hotelCostStr += @$" 1/2 双人间:{item.Sum(x => x.HotelDoubleRoomFee).ToString("#0.00")}";
|
|
|
+ if (item.Sum(x => x.HotelSuiteRoomFee) != 0) hotelCostStr += @$" 小套房/豪华套房:{item.Sum(x => x.HotelSuiteRoomFee).ToString("#0.00")}";
|
|
|
+ if (item.Sum(x => x.HotelSuiteFee) != 0) hotelCostStr += @$" 套房:{item.Sum(x => x.HotelSuiteFee).ToString("#0.00")}";
|
|
|
+ hotelCostStr += @$"</br>";
|
|
|
|
|
|
- _detail.PriceMsgContent = $"信用卡金额:{_detail.WaitPay} ({hotelCurrncyName})<br/>" +
|
|
|
+ }
|
|
|
+ _detail.PriceMsgContent = $"{hotelCostStr}<br/>"+
|
|
|
+ $"<span style='font-weight:800;'>{hotelReservations.HotelName} [{hotelReservations.CheckInDate} - {hotelReservations.CheckOutDate}]</span><br/>" +
|
|
|
+ $"信用卡金额:{_detail.WaitPay} ({hotelCurrncyName})<br/>" +
|
|
|
$"房间说明: {hotelReservations.Remark} <br/>" +
|
|
|
- $"房间费用: {roomFee.ToString("#0.00")} {roomCode} {roomName} 当时汇率{roomData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{roomBool}<br/>" +
|
|
|
- $"酒店早餐: {breakfastFee.ToString("#0.00")} {breakfastCode} {breakfastName} 当时汇率{breakfastData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{breakfastBool}<br/>" +
|
|
|
- $"地税: {governmentRentFee.ToString("#0.00")} {governmentRentCode} {governmentRentName} 当时汇率{governmentRentData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{governmentRentBool}<br/>" +
|
|
|
- $"城市税: {cityTaxFee.ToString("#0.00")} {cityTaxCode} {cityTaxName} 当时汇率{cityTaxData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{cityTaxBool}<br/>";
|
|
|
+ $"房间费用: {roomFee.ToString("#0.00")} {roomCode} {roomName} 当时汇率 {roomData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{roomBool}<br/>" +
|
|
|
+ $"酒店早餐: {breakfastFee.ToString("#0.00")} {breakfastCode} {breakfastName} 当时汇率 {breakfastData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{breakfastBool}<br/>" +
|
|
|
+ $"地税: {governmentRentFee.ToString("#0.00")} {governmentRentCode} {governmentRentName} 当时汇率 {governmentRentData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{governmentRentBool}<br/>" +
|
|
|
+ $"城市税: {cityTaxFee.ToString("#0.00")} {cityTaxCode} {cityTaxName} 当时汇率 {cityTaxData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{cityTaxBool}<br/>";
|
|
|
_detail.PriceNameContent = hotelReservations.HotelName;
|
|
|
}
|
|
|
|
|
@@ -1648,10 +1691,12 @@ namespace OASystem.API.Controllers
|
|
|
// _detail.PriceNameContent = touristGuideGroundReservations.Area;
|
|
|
//}
|
|
|
|
|
|
- List<Grp_CarTouristGuideGroundReservationsContent> touristGuideGroundReservationsContents = _CarTouristGuideGroundReservationsContent
|
|
|
- .Where(s => s.CTGGRId == touristGuideGroundReservations.Id && s.IsDel == 0 && s.Price != 0).ToList();
|
|
|
+ var touristGuideGroundReservationsContents =
|
|
|
+ _CarTouristGuideGroundReservationsContent.Where(s => s.CTGGRId == touristGuideGroundReservations.Id && s.IsDel == 0 && s.Price != 0).ToList();
|
|
|
+
|
|
|
+ string priceMsg = $"<span style='font-weight:800;'>{touristGuideGroundReservations.PriceName}({touristGuideGroundReservations.ServiceStartTime} - {touristGuideGroundReservations.ServiceEndTime})</span><br/>";
|
|
|
+
|
|
|
|
|
|
- string priceMsg = string.Empty;
|
|
|
foreach (var item in touristGuideGroundReservationsContents)
|
|
|
{
|
|
|
string typeName = "Unknown";
|
|
@@ -1668,9 +1713,56 @@ namespace OASystem.API.Controllers
|
|
|
carCurrencyName = currencyData.Remark;
|
|
|
}
|
|
|
|
|
|
- priceMsg += typeName + ":" + item.Price.ToString("#0.00") + " " + carCurrencyCode + "(" + carCurrencyName + ")<br/>" +
|
|
|
- "明细:" + item.PriceContent + "<br/>" +
|
|
|
- "备注:" + item.Remark + "<br/><br/>";
|
|
|
+ string opCostStr =string.Empty;
|
|
|
+ decimal opCostTypePrice = 0.00M;
|
|
|
+ #region 处理成本各项费用
|
|
|
+
|
|
|
+ var opDate = item.DatePrice?.ToString("yyyy-MM-dd");
|
|
|
+
|
|
|
+
|
|
|
+ var opCost = groupCostDetails.Where(x => x.Date.Equals(opDate)).ToList();
|
|
|
+
|
|
|
+ if (opCost.Count > 0)
|
|
|
+ {
|
|
|
+ switch (item.SId)
|
|
|
+ {
|
|
|
+ case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //91车费
|
|
|
+ //case 982: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //982 车超时费 -- 暂无
|
|
|
+ case 92: opCostTypePrice = opCost.Sum(x => x.GuideFee); break; //92 导游费
|
|
|
+ case 94: opCostTypePrice = opCost.Sum(x => x.GuideScenicFee); break; //94 导游景点费
|
|
|
+ case 95: opCostTypePrice = opCost.Sum(x => x.GuideTipFee); break; //95 导游小费
|
|
|
+ case 983: opCostTypePrice = opCost.Sum(x => x.GuideMealFee); break; //983 导游餐补
|
|
|
+ case 984: opCostTypePrice = opCost.Sum(x => x.GuideMealFee); break; //984 导游房补
|
|
|
+ case 985: opCostTypePrice = opCost.Sum(x => x.GuideRoomFee); break; //985 导游交通
|
|
|
+ //case 96: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //96 接送机费 -- 暂无
|
|
|
+ //case 97: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //97 其他费用 -- 暂无
|
|
|
+ case 979: opCostTypePrice = opCost.Sum(x => x.DriverFee); break; //979 司机工资
|
|
|
+ case 980: opCostTypePrice = opCost.Sum(x => x.DriverTipFee); break; //980 司机小费
|
|
|
+ case 981: opCostTypePrice = opCost.Sum(x => x.DriverMealFee); break; //981 司机餐补
|
|
|
+ case 988: opCostTypePrice = opCost.Sum(x => x.ClientBreakfastFee); break; //988 客户早餐费用
|
|
|
+ case 93: opCostTypePrice = opCost.Sum(x => x.ClientDinnerFee); break; //93 客户午餐费用
|
|
|
+ case 989: opCostTypePrice = opCost.Sum(x => x.ClientLunchFee); break; //989 客户晚餐费用
|
|
|
+ case 990: opCostTypePrice = opCost.Sum(x => x.ScenicTicketFee); break; //990 景点门票费
|
|
|
+ case 991: opCostTypePrice = opCost.Sum(x => x.DrinkSnackFruitFee); break; //991 饮料/零食/水果
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //992 住补费用 -- 暂无
|
|
|
+ case 994: opCostTypePrice = opCost.Sum(x => x.TranslatorFee); break; //994 翻译费
|
|
|
+ case 1059: opCostTypePrice = opCost.Sum(x => x.GuideOverTimeFee); break; //1059 导游超时费用
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1070 尾款金额
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1071 其他额外费用
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1073 翻译超时费
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1074 早餐超支费用
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1075 午餐超支费用
|
|
|
+ //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1076 晚餐超支费用
|
|
|
+ }
|
|
|
+ opCostStr = $" /成本:{opCostTypePrice.ToString("#0.00")} {_groupCurrencyCode}(汇率:{_groupRate.ToString("#0.0000")})";
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ priceMsg += $"日期:{item.DatePrice?.ToString("yyyy-MM-dd") ?? "-"}<br/>" +
|
|
|
+ $"{typeName}:{item.Price.ToString("#0.00")} {carCurrencyCode}(汇率:{entity.DayRate.ToString("#0.0000")}) {opCostStr}<br/>" +
|
|
|
+ $"明细:{item.PriceContent ?? "-"}<br/>" +
|
|
|
+ $"备注:{item.Remark ?? "-"}<br/><br/>";
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1688,7 +1780,6 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
break;
|
|
|
case 81: //邀请/公务活动
|
|
|
-
|
|
|
Grp_InvitationOfficialActivities _ioa = _InvitationOfficialActivities.Where(s => s.Id == entity.CId).FirstOrDefault();
|
|
|
if (_ioa != null)
|
|
|
{
|