Browse Source

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

leiy 11 months ago
parent
commit
3ce4381ce3

+ 5 - 0
OASystem/OASystem.Domain/ViewModels/Groups/CarTouristCreditCardPaymentView.cs

@@ -46,6 +46,11 @@ namespace OASystem.Domain.ViewModels.Groups
         /// 费用标识文本
         /// </summary>
         public string OrbitalPrivateTransferStr { get; set; }
+
+        /// <summary>
+        /// GM是否审核
+        /// </summary>
+        public int IsAuditGM { get; set; }
     }
 
     public class CarTouristGuideGroundReservationsContentView

+ 6 - 10
OASystem/OASystem.Infrastructure/Repositories/Groups/CarTouristGuideGroundRepository.cs

@@ -9,6 +9,7 @@ using OASystem.Domain.ViewModels.Groups;
 using OASystem.Infrastructure.Tools;
 using SqlSugar.Extensions;
 using System.Collections.Generic;
+using System.Reflection;
 
 namespace OASystem.Infrastructure.Repositories.Groups
 {
@@ -188,7 +189,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 var groupResult = carTouristGuides.GroupBy(x => x.SId).ToDictionary(x => x.Key, x => x.ToList());
                 foreach (var item in groupResult.Keys)
                 {
-                    while (groupResult[item].Count < day)
+                    while (groupResult[item].Count <= day)
                     {
                         groupResult[item] = groupResult[item].OrderByDescending(x => x.DatePrice).ToList();
                         if (groupResult[item][0]?.DatePrice is not null)
@@ -415,7 +416,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
             catch (Exception)
             {
                 return result = new Result() { Code = -2, Msg = "未知错误" };
-                throw;
             }
             return result;
         }
@@ -455,16 +455,12 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     Grp_CarTouristGuideGroundReservationsContent QueryData = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservationsContent>().First(a => a.SId == item.SId && a.Id == item.Id && a.DiId == item.DiId && a.IsDel==0);
                     if (QueryData==null)
                     {
-                        if (item.Price!=0)
+                        int id = await _sqlSugar.Insertable(item).ExecuteReturnIdentityAsync();
+                        if (id == 0)
                         {
-                            int id = await _sqlSugar.Insertable(item).ExecuteReturnIdentityAsync();
-                            if (id == 0)
-                            {
-                                RollbackTran();
-                                return result = new Result() { Code = -2, Msg = "添加失败" };
-                            }
+                            RollbackTran();
+                            return result = new Result() { Code = -2, Msg = "添加失败" };
                         }
-                       
                     }
                     else
                     {