|
@@ -3961,8 +3961,10 @@ Group by PriceType ", dto.diId);
|
|
|
|
|
|
if (dicSoure.Keys.Contains(x.PriceDetailType))
|
|
|
{
|
|
|
- var CarCenter = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservationsContent>().Where(x1 => x1.CTGGRId == x.CarParentId && x1.IsDel == 0
|
|
|
- && x1.SId == mealsDic.First(x2 => x2.Value == dicSoure[x.PriceDetailType]).Key).ToList().First(x1 => (DateTime.Compare(x1.DatePrice.ObjToDate(), x.PriceDt) == 0));
|
|
|
+ var carCenterList = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservationsContent>().Where(x1 => x1.CTGGRId == x.CarParentId && x1.IsDel == 0
|
|
|
+ && x1.SId == mealsDic.First(x2 => x2.Value == dicSoure[x.PriceDetailType]).Key).ToList();
|
|
|
+ var CarCenter = carCenterList.FirstOrDefault(x1 => (DateTime.Compare(x1.DatePrice.ObjToDate(), x.PriceDt) == 0)) ?? new
|
|
|
+ Grp_CarTouristGuideGroundReservationsContent();
|
|
|
costPirce += (CarCenter.Price * CarCenter.Count * x.Rate);
|
|
|
oldPrice += (CarCenter.Price * CarCenter.Count);
|
|
|
|