Browse Source

酒店预订 基础数据源API
新增客户数据Data GuestName

leiy 1 year ago
parent
commit
c99d140155

+ 1 - 1
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -1390,7 +1390,7 @@ namespace OASystem.API.Controllers
                             Grp_HotelReservations hotelReservations = _HotelReservations.Where(s => s.Id == entity.CId).FirstOrDefault();
                             if (hotelReservations != null)
                             {
-                                _detail.PriceMsgContent = "信用卡金额:" + _detail.WaitPay + " " + hotelCurrncyCode + "(" + hotelCurrncyName + ")<br/>" +
+                                _detail.PriceMsgContent = "信用卡金额:" + _detail.WaitPay + " (" + hotelCurrncyName + ")<br/>" +
                                                           "房间说明:" + hotelReservations.Remark;
                                 _detail.PriceNameContent = hotelReservations.HotelName;
                             }

+ 9 - 3
OASystem/OASystem.Infrastructure/Repositories/Groups/HotelPriceRepository.cs

@@ -25,12 +25,14 @@ namespace OASystem.Infrastructure.Repositories.Groups
         private readonly IMapper _mapper;
         private readonly Result _result;
         private readonly TeamRateRepository _teamRateRep;
-        public HotelPriceRepository(SqlSugarClient sqlSugar, IMapper mapper, TeamRateRepository teamRateRep) :
-            base(sqlSugar)
+        private readonly TourClientListRepository _tourClientListRep;
+        public HotelPriceRepository(SqlSugarClient sqlSugar, IMapper mapper, TeamRateRepository teamRateRep, TourClientListRepository tourClientListRep) 
+            :base(sqlSugar)
         {
             this._mapper = mapper;
             _result = new Result() { Code = -1, Msg = "操作失败!" };
             _teamRateRep = teamRateRep;
+            _tourClientListRep = tourClientListRep;
         }
 
         #region 保留
@@ -793,6 +795,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     _CheckVolumeNo = checkVoumeNoData.Result.Data;
                 }
 
+                //客户名单
+                var guestNames = await _tourClientListRep._GuestNameItemByDiId(portType, diId);
+
                 var data = new
                 {
                     GuestType = _GuestType, //客人分类
@@ -801,7 +806,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     BankCard = _BankCard,
                     BookingWebsite = _BookingWebsite,
                     CheckPerson = _CheckPerson,
-                    CheckVolumeNo = _CheckVolumeNo
+                    CheckVolumeNo = _CheckVolumeNo,
+                    GuestName = guestNames
                 };
 
                 _result.Code = 0;

+ 25 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/TourClientListRepository.cs

@@ -35,6 +35,31 @@ namespace OASystem.Infrastructure.Repositories.Groups
             _mapper = mapper;
         }
 
+
+
+        /// <summary>
+        /// 根据团组Id客人名单List
+        /// </summary>
+        /// <param name="portId"></param>
+        /// <param name="diId"></param>
+        /// <returns></returns>
+        public async Task<List<SimplClientInfo>> _GuestNameItemByDiId(int portId, int diId)
+        {
+            List<SimplClientInfo> simplClients = new List<SimplClientInfo>();
+            if (portId == 1 || portId == 2 || portId == 3) // 1 web 2 Android 3 ios
+            {
+                string sql = $@"Select b.Id,b.Pinyin,b.lastName,b.firstName,b.phone From  Grp_TourClientList a, Crm_DeleClient b 
+                                Where a.clientid = b.id and a.isdel = 0 and a.diId = {diId}";
+                simplClients = await _sqlSugar.SqlQueryable<SimplClientInfo>(sql).ToListAsync();
+            }
+            else
+            {
+                _result.Msg = "请传入有效的PortType参数,1 Web 2 Android 3 IOS!";
+            }
+            return simplClients;
+        }
+
+
         /// <summary>
         /// 根据团组Id查询List
         /// </summary>