Pārlūkot izejas kodu

添加客户名单信息

yuanrf 1 gadu atpakaļ
vecāks
revīzija
eca7992048

+ 15 - 2
OASystem/OASystem.Infrastructure/Repositories/Groups/AirTicketResRepository.cs

@@ -305,6 +305,12 @@ namespace OASystem.Infrastructure.Repositories.Groups
             Result result = new Result() { Code = -2, Msg = "未知错误" };
             try
             {
+                if (dto.DiId < 1)
+                {
+                    result.Msg += "请输入正确的diid";
+                    return result;
+                }
+
                 #region 团组下拉框
 
 
@@ -351,20 +357,27 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 List<Res_AirTicketAgent> _AirTicketAgents = _sqlSugar.Queryable<Res_AirTicketAgent>().Where(a => a.IsDel == 0).ToList();
 
                 #endregion
+
+                #region 客人名单下拉框
+                string sqlClient = string.Format("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 = {0}", dto.DiId);
+                var clientArr = _sqlSugar.SqlQueryable<SimplClientInfo>(sqlClient).ToList();
+                #endregion
+
                 var data = new
                 {
                     TicketClass = _TicketClassa,
                     Payment = _Payment,
                     CardType = _CardType,
                     GroupName = grp_NameView,
-                    AirTicketAgents = _AirTicketAgents
+                    AirTicketAgents = _AirTicketAgents,
+                    clientArr
                 };
+
                 return result = new Result() { Code = 0, Msg = "查询成功!", Data = data };
             }
             catch (Exception ex)
             {
                 return result = new Result() { Code = -2, Msg = "程序错误" };
-                throw;
             }
         }