Browse Source

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

LEIYI 5 months ago
parent
commit
fa03525f99
1 changed files with 4 additions and 2 deletions
  1. 4 2
      OASystem/OASystem.Api/Controllers/FinancialController.cs

+ 4 - 2
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -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);