Przeglądaj źródła

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

yuanrf 4 dni temu
rodzic
commit
e295967605

+ 106 - 124
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -1215,16 +1215,12 @@ namespace OASystem.API.Controllers
                             }
 
                             //计算费用总和
-                            decimal AllPrice = airPrice + cityTranffic + dac1.Sum(x => x.SubTotal) + dac2.Sum(x => x.SubTotal) +
-                                               dac3.Sum(x => x.SubTotal) + dac4.Sum(x => x.SubTotal) + _EnterExitCosts.Visa + _EnterExitCosts.Safe +
+                            decimal AllPrice = airPrice + cityTranffic + _EnterExitCosts.Visa + _EnterExitCosts.Safe +
                                                +_EnterExitCosts.YiMiao + _EnterExitCosts.YiMiao + _EnterExitCosts.Ticket + _EnterExitCosts.Service;
-                            WordAllPrice += AllPrice;
-
-                            UsersTop += firstName + "出访费用为¥" + AllPrice.ToString("#0.00") + "元、";
-
+                            
                             TeableBookmarkArr.Add("jp", airPrice.ToString("#0.00") + " 元"); //机票金额
                             TeableBookmarkArr.Add("cs", $"{cityTranffic:#0.00} 元"); //城市交通费用
-                            TeableBookmarkArr.Add("zs", dac1.Sum(x => Convert.ToDecimal(x.SubTotal)).ToString("#0.00") + " 元"); //住宿费
+                            
                             string zsinfo = string.Empty;
                             string hsinfo = string.Empty;
                             string gzinfo = string.Empty;
@@ -1235,166 +1231,148 @@ namespace OASystem.API.Controllers
                             Aspose.Words.Tables.Table ChildTable1 = (Aspose.Words.Tables.Table)FirstTable.GetChild(NodeType.Table, 1, true);
                             Aspose.Words.Tables.Table ChildTable2 = (Aspose.Words.Tables.Table)FirstTable.GetChild(NodeType.Table, 2, true);
 
+                            var totalAccom = 0.00M;  // 住宿费合计
                             int rowIndex = 0;
                             if (dac1.Count <= 0 && ChildTable != null) ChildTable.Remove(); //删除表格
                             foreach (var item in dac1)
                             {
-                                if (string.IsNullOrWhiteSpace(item.Place))
-                                {
-                                    continue;
-                                }
+                                if (string.IsNullOrWhiteSpace(item.Place) || placeArr.Contains(item.Place)) continue;
 
-                                if (placeArr.Contains(item.Place))
-                                {
-                                    continue;
-                                }
-                                else
+                                placeArr.Add(item.Place);
+
+                                if (rowIndex > ChildTable.Rows.Count - 1)
                                 {
-                                    placeArr.Add(item.Place);
+                                    var chitableRow = ChildTable.LastRow.Clone(true);
+                                    ChildTable.AppendChild(chitableRow);
                                 }
-                                if (!string.IsNullOrWhiteSpace(item.Place))
+
+                                decimal currencyRate = item.SubTotal / item.Cost;
+                                string currencyCode = $"Unknown";
+                                var sys_currencyInfo = _currencyDatas.Find(x => item.Currency == x.Id);
+                                if (sys_currencyInfo != null)
                                 {
-                                    if (rowIndex > ChildTable.Rows.Count - 1)
+                                    var sys_currencyCode = sys_currencyInfo.Name;
+                                    var eec_currencyInfo = _EnterExitCostCurrencys.Find(x => x.Code.Equals(sys_currencyCode));
+                                    if (eec_currencyInfo != null)
                                     {
-                                        var chitableRow = ChildTable.LastRow.Clone(true);
-                                        ChildTable.AppendChild(chitableRow);
+                                        currencyRate = eec_currencyInfo.Rate;
+                                        currencyCode = eec_currencyInfo.Name;
                                     }
-                                    int days = dac1.FindAll(x => x.Place == item.Place).Count;
-                                    SetCells(ChildTable, doc, rowIndex, 0, item.Place);
-                                    SetCells(ChildTable, doc, rowIndex, 1, days + "晚");
+                                }
 
-                                    string currencyCode = currData.Find(it => it.Id == item.Currency)?.Remark ?? "Unknown";
-                                    SetCells(ChildTable, doc, rowIndex, 2, item.Cost.ToString("#0.00") + currencyCode + "/晚");
+                                int days = dac1.FindAll(x => x.Place == item.Place).Count;
+                                SetCells(ChildTable, doc, rowIndex, 0, item.Place);
+                                SetCells(ChildTable, doc, rowIndex, 1, $"{days}晚");
+                                SetCells(ChildTable, doc, rowIndex, 2, $"{item.Cost:0.00}{currencyCode}/晚");
+                                SetCells(ChildTable, doc, rowIndex, 3, $"汇率{currencyRate:0.0000}");
 
-                                    var currencyRate = DecimalToString((item.SubTotal / item.Cost), 4);
-                                    var sys_currencyInfo = _currencyDatas.Find(x => item.Currency == x.Id);
-                                    if (sys_currencyInfo != null)
-                                    {
-                                        var sys_currencyCode = sys_currencyInfo.Name;
-                                        var eec_currencyInfo = _EnterExitCostCurrencys.Find(x => x.Code.Equals(sys_currencyCode));
-                                        if (eec_currencyInfo != null)
-                                        {
-                                            currencyRate = DecimalToString(eec_currencyInfo.Rate, 4);
-                                        }
-                                    }
-
-                                    SetCells(ChildTable, doc, rowIndex, 3, "汇率" + currencyRate);
-                                    SetCells(ChildTable, doc, rowIndex, 4, "CNY " + item.SubTotal + "\r\n");
-                                    rowIndex++;
-                                    zsinfo += item.Place + "  " + days + "晚 " + item.Cost.ToString("#0.00") + currencyCode + "/晚" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.0000") + "   CNY " + item.SubTotal * days + "\r\n";
-                                }
+                                decimal currSubTotal = Math.Round(days * item.Cost * currencyRate, 2);
+                                SetCells(ChildTable, doc, rowIndex, 4, $"CNY {currSubTotal:0.00}\r\n");
 
+                                zsinfo += $"{item.Place}  {days}晚 {item.Cost:0.00}/晚 汇率{currencyRate:0.0000}   CNY{currSubTotal:0.00}\r\n";
+                                totalAccom += currSubTotal;
+                                rowIndex++;
                             }
                             placeArr.Clear();
 
+                            AllPrice += totalAccom;
+                            TeableBookmarkArr.Add("zs", $"{totalAccom:0.00} 元"); // 住宿费
+                            TeableBookmarkArr.Add("zsinfo", zsinfo);              // 住宿费详情
+
+                            decimal totalMeal = 0.00m;       // 伙食费合计
                             rowIndex = 0;
                             if (dac2.Count <= 0 && ChildTable1 != null) ChildTable1.Remove(); //删除表格
                             foreach (var item in dac2)
                             {
-                                if (string.IsNullOrWhiteSpace(item.Place))
-                                {
-                                    continue;
-                                }
+                                if (string.IsNullOrWhiteSpace(item.Place) || placeArr.Contains(item.Place)) continue;
 
-                                if (placeArr.Contains(item.Place))
-                                {
-                                    continue;
-                                }
-                                else
+                                placeArr.Add(item.Place);
+
+                                if (rowIndex > ChildTable1.Rows.Count - 1)
                                 {
-                                    placeArr.Add(item.Place);
+                                    var chitableRow = ChildTable1.LastRow.Clone(true);
+                                    ChildTable1.AppendChild(chitableRow);
                                 }
-                                if (!string.IsNullOrWhiteSpace(item.Place))
+
+                                decimal currencyRate = item.SubTotal / item.Cost; //默认汇率
+                                string currencyCode = "Unknown";
+                                var sys_currencyInfo = _currencyDatas.Find(x => item.Currency == x.Id);
+                                if (sys_currencyInfo != null)
                                 {
-                                    if (rowIndex > ChildTable1.Rows.Count - 1)
+                                    var sys_currencyCode = sys_currencyInfo.Name;
+                                    var eec_currencyInfo = _EnterExitCostCurrencys.Find(x => x.Code.Equals(sys_currencyCode));
+                                    if (eec_currencyInfo != null)
                                     {
-                                        var chitableRow = ChildTable1.LastRow.Clone(true);
-                                        ChildTable1.AppendChild(chitableRow);
+                                        currencyRate = eec_currencyInfo.Rate;
+                                        currencyCode = eec_currencyInfo.Name;
                                     }
-                                    int days = dac2.FindAll(x => x.Place == item.Place).Count;
-                                    SetCells(ChildTable1, doc, rowIndex, 0, item.Place);
-                                    SetCells(ChildTable1, doc, rowIndex, 1, days + "天");
-
-                                    string currencyCode = currData.Find(it => it.Id == item.Currency)?.Remark ?? "Unknown";
-                                    SetCells(ChildTable1, doc, rowIndex, 2, item.Cost.ToString("#0.00") + currencyCode + "/天");
+                                }
 
-                                    var currencyRate = DecimalToString((item.SubTotal / item.Cost), 4);
-                                    var sys_currencyInfo = _currencyDatas.Find(x => item.Currency == x.Id);
-                                    if (sys_currencyInfo != null)
-                                    {
-                                        var sys_currencyCode = sys_currencyInfo.Name;
-                                        var eec_currencyInfo = _EnterExitCostCurrencys.Find(x => x.Code.Equals(sys_currencyCode));
-                                        if (eec_currencyInfo != null)
-                                        {
-                                            currencyRate = DecimalToString(eec_currencyInfo.Rate, 4);
-                                        }
-                                    }
+                                int days = dac2.FindAll(x => x.Place == item.Place).Count;
+                                SetCells(ChildTable1, doc, rowIndex, 0, item.Place);
+                                SetCells(ChildTable1, doc, rowIndex, 1, $"{days}天");
+                                SetCells(ChildTable1, doc, rowIndex, 2, $"{item.Cost:0.00}{currencyCode}/天");
+                                SetCells(ChildTable1, doc, rowIndex, 3, "汇率" + currencyRate);
 
-                                    SetCells(ChildTable1, doc, rowIndex, 3, "汇率" + currencyRate);
-                                    SetCells(ChildTable1, doc, rowIndex, 4, "CNY " + item.SubTotal);
-                                    rowIndex++;
-                                    hsinfo += item.Place + "  " + days + "天 " + item.Cost.ToString("#0.00") + currencyCode + "/天" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.0000") + "   CNY " + item.SubTotal * days + "\r\n";
-                                }
+                                decimal currSubTotal = Math.Round(days * item.Cost * currencyRate, 2);
+                                SetCells(ChildTable1, doc, rowIndex, 4, $"CNY {currSubTotal:0.00}");
 
+                                totalMeal += currSubTotal;
+                                rowIndex++;
+                                hsinfo += $"{item.Place}  {days}天 {item.Cost:0.00}{currencyCode}/天 汇率{currencyRate:0.0000}   CNY{currSubTotal}\r\n";
                             }
                             placeArr.Clear();
 
+                            AllPrice += totalMeal;
+                            TeableBookmarkArr.Add("hs", $"{totalMeal} 元"); //伙食费
+                            TeableBookmarkArr.Add("hsinfo", hsinfo);        //伙食费详情
+
+                            decimal totalMisc= 0.00M;       // 公杂费合计
                             rowIndex = 0;
                             if (dac2.Count <= 0 && ChildTable2 != null) ChildTable2.Remove(); //删除表格
                             foreach (var item in dac3)
                             {
-                                if (string.IsNullOrWhiteSpace(item.Place))
-                                {
-                                    continue;
-                                }
+                                if (string.IsNullOrWhiteSpace(item.Place) || placeArr.Contains(item.Place)) continue;
 
-                                if (placeArr.Contains(item.Place))
-                                {
-                                    continue;
-                                }
-                                else
+                                placeArr.Add(item.Place);
+
+                                if (rowIndex > ChildTable2.Rows.Count - 1)
                                 {
-                                    placeArr.Add(item.Place);
+                                    var chitableRow = ChildTable2.LastRow.Clone(true);
+                                    ChildTable2.AppendChild(chitableRow);
                                 }
-                                if (!string.IsNullOrWhiteSpace(item.Place))
-                                {
-                                    if (rowIndex > ChildTable2.Rows.Count - 1)
-                                    {
-                                        var chitableRow = ChildTable2.LastRow.Clone(true);
-                                        ChildTable2.AppendChild(chitableRow);
-                                    }
-                                    int days = dac3.FindAll(x => x.Place == item.Place).Count;
-                                    SetCells(ChildTable2, doc, rowIndex, 0, item.Place);
-                                    SetCells(ChildTable2, doc, rowIndex, 1, days + "天");
-
-                                    string currencyCode = currData.Find(it => it.Id == item.Currency)?.Remark ?? "Unknown";
-                                    SetCells(ChildTable2, doc, rowIndex, 2, item.Cost.ToString("#0.00") + currencyCode + "/天");
 
-                                    var currencyRate = DecimalToString((item.SubTotal / item.Cost), 4);
-                                    var sys_currencyInfo = _currencyDatas.Find(x => item.Currency == x.Id);
-                                    if (sys_currencyInfo != null)
+                                decimal currencyRate = item.SubTotal / item.Cost;
+                                string currencyCode = "Unknown";
+                                var sys_currencyInfo = _currencyDatas.Find(x => item.Currency == x.Id);
+                                if (sys_currencyInfo != null)
+                                {
+                                    var sys_currencyCode = sys_currencyInfo.Name;
+                                    var eec_currencyInfo = _EnterExitCostCurrencys.Find(x => x.Code.Equals(sys_currencyCode));
+                                    if (eec_currencyInfo != null)
                                     {
-                                        var sys_currencyCode = sys_currencyInfo.Name;
-                                        var eec_currencyInfo = _EnterExitCostCurrencys.Find(x => x.Code.Equals(sys_currencyCode));
-                                        if (eec_currencyInfo != null)
-                                        {
-                                            currencyRate = DecimalToString(eec_currencyInfo.Rate, 4);
-                                        }
+                                        currencyRate = eec_currencyInfo.Rate;
+                                        currencyCode = eec_currencyInfo.Name;
                                     }
-                                    SetCells(ChildTable2, doc, rowIndex, 3, "汇率" + currencyRate);
-                                    SetCells(ChildTable2, doc, rowIndex, 4, "CNY " + item.SubTotal + "\r\n");
-                                    rowIndex++;
-                                    gzinfo += item.Place + "  " + days + "天 " + item.Cost.ToString("#0.00") + currencyCode + "/天" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00") + "   CNY " + item.SubTotal * days + "\r\n";
                                 }
 
+                                int days = dac3.FindAll(x => x.Place == item.Place).Count;
+                                SetCells(ChildTable2, doc, rowIndex, 0, item.Place);
+                                SetCells(ChildTable2, doc, rowIndex, 1, $"{days}天");
+                                SetCells(ChildTable2, doc, rowIndex, 2, $"{item.Cost:0.00}{currencyCode}/天");
+                                SetCells(ChildTable2, doc, rowIndex, 3, $"汇率{currencyRate:0.0000}");
+
+                                decimal currSubTotal = Math.Round(days * item.Cost * currencyRate, 2);
+                                SetCells(ChildTable2, doc, rowIndex, 4, $"CNY {currSubTotal:0.00}\r\n");
+                                totalMisc += currSubTotal;
+                                gzinfo += $"{item.Place}  {days}天 {item.Cost:0.00}{currencyCode}/天 汇率{currencyRate:0.0000}   CNY {currSubTotal:0.00}\r\n";
+                                rowIndex++;
                             }
                             placeArr.Clear();
+                            AllPrice += totalMisc;
 
-                            TeableBookmarkArr.Add("zsinfo", zsinfo); //住宿费详情
-                            TeableBookmarkArr.Add("hs", dac2.Sum(x => Convert.ToDecimal(x.SubTotal)).ToString("#0.00") + " 元"); //伙食费
-                            TeableBookmarkArr.Add("hsinfo", hsinfo); //伙食费详情
-                            TeableBookmarkArr.Add("gz", dac3.Sum(x => Convert.ToDecimal(x.SubTotal)).ToString("#0.00") + " 元"); //公杂费
-                            TeableBookmarkArr.Add("gzinfo", gzinfo); //公杂费详情
+                            TeableBookmarkArr.Add("gz",$"{totalMisc:0.00} 元"); //公杂费
+                            TeableBookmarkArr.Add("gzinfo", gzinfo);            //公杂费详情
 
                             string otherFeestr = "";
                             decimal otherFee = 0.00M;
@@ -1429,11 +1407,15 @@ namespace OASystem.API.Controllers
                                 otherFeestr += "等费用";
                             }
 
-                            TeableBookmarkArr.Add("qt", otherFee.ToString("#0.00") + " 元");//其他费用
+                            WordAllPrice += AllPrice;
+
+                            UsersTop +=  $"{firstName}出访费用为¥{AllPrice:0.00}元、";
+
+                            TeableBookmarkArr.Add("qt", $"{otherFee:0.00} 元");//其他费用
                             TeableBookmarkArr.Add("qtinfo", otherFeestr);//其他费用第二列
 
-                            TeableBookmarkArr.Add("fw", _EnterExitCosts.Service.ToString("#0.00") + "元/人");//服务费
-                            TeableBookmarkArr.Add("AllPrice", AllPrice.ToString("#0.00") + "元/人");//表格合计费用
+                            TeableBookmarkArr.Add("fw", $"{_EnterExitCosts.Service:0.00}元/人");//服务费
+                            TeableBookmarkArr.Add("AllPrice", $"{AllPrice:0.00}元/人");//表格合计费用
                             TeableBookmarkArr.Add("title", $"费用清单-{airName}({firstName})");
                             foreach (var book in TeableBookmarkArr.Keys)
                             {
@@ -1456,7 +1438,7 @@ namespace OASystem.API.Controllers
                             TeableBookmarkArr.Clear();
                         }
 
-                        bookmarkArr.Add("VisitPrice", WordAllPrice.ToString());//出访费用总额
+                        bookmarkArr.Add("VisitPrice", $"{WordAllPrice:0.00}");//出访费用总额
                         bookmarkArr.Add("CnAllPrice", WordAllPrice.ConvertCNYUpper());//出访费用总额中文
                         bookmarkArr.Add("namesPrice", UsersTop.TrimEnd('、'));//各人员出访费用  付辰同志出访费用为¥73,604.8元
 

Plik diff jest za duży
+ 650 - 225
OASystem/OASystem.Api/Controllers/GroupsController.cs


+ 156 - 1
OASystem/OASystem.Api/Controllers/SearchController.cs

@@ -211,7 +211,6 @@ namespace OASystem.API.Controllers
 
         }
 
-
         /// <summary>
         /// 客户资料
         /// </summary>
@@ -466,5 +465,161 @@ namespace OASystem.API.Controllers
                 return Ok(JsonView(true, $"搜索服务暂时不可用!"));
             }
         }
+
+        /// <summary>
+        /// 团组各项费用录入 关键字输入提示(智能版)
+        /// 76	酒店预订
+        /// 79	车/导游地接
+        /// 80	签证
+        /// 81	邀请/公务活动
+        /// 82	团组客户保险
+        /// 85	机票预订
+        /// 98	其他款项
+        /// 285	收款退还
+        /// 1015 超支费用
+        /// 1081 文档下载
+        /// 1466 会务相关
+        /// </summary>
+        /// <param name="userId">用户Id</param>
+        /// <param name="feeType">费用类型</param>
+        /// <param name="keyword">关键字</param>
+        /// <returns></returns>
+        [HttpGet("GroupFeeKeywordSearch/{userId}/{feeType}/{keyword}")]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> GroupFeeKeywordSearch(int userId, int feeType, string keyword)
+        {
+            try
+            {
+                #region 参数验证
+
+                // 基本参数验证
+                if (userId <= 0)
+                    return Ok(JsonView(false, "用户ID必须大于0!"));
+
+                if (feeType <= 0)
+                    return Ok(JsonView(false, "费用类型必须大于0!"));
+
+                // 验证用户是否存在
+                var userExists = await _sqlSugar.Queryable<Sys_Users>()
+                    .Where(x => x.IsDel == 0 && x.Id == userId)
+                    .AnyAsync();
+
+                if (!userExists)
+                {
+                    return Ok(JsonView(false, "用户不存在或已被删除"));
+                }
+
+                // 验证费用类型是否有效
+                var feeTypeExists = await _sqlSugar.Queryable<Sys_SetData>()
+                    .Where(x => x.IsDel == 0 && x.STid == 16 && x.Id == feeType)
+                    .AnyAsync();
+
+                if (!feeTypeExists)
+                {
+                    return Ok(JsonView(false, "无效的费用类型"));
+                }
+
+                // 验证关键字
+                if (string.IsNullOrWhiteSpace(keyword))
+                {
+                    return Ok(JsonView(false, "请输入搜索关键字"));
+                }
+
+                #endregion
+
+                #region 获取用户有权限的团组ID
+
+                // 获取用户有权限访问的团组ID列表
+                var authorizedGroupIds = await _sqlSugar.Queryable<Grp_GroupsTaskAssignment>()
+                    .Where(x => x.IsDel == 0 && x.UId == userId && x.CTId == feeType)
+                    .Select(x => x.DIId)
+                    .Distinct()
+                    .ToListAsync();
+
+                if (!authorizedGroupIds.Any())
+                {
+                    return Ok(JsonView(true, "暂无数据", new List<object>(), 0));
+                }
+
+                #endregion
+
+                #region 构建搜索请求
+
+                var searchRequest = new DynamicSearchRequest
+                {
+                    Keyword = keyword.Trim(),
+                    RequireAllSingleChars = true,
+                    PageIndex = 1,
+                    PageSize = 20, // 限制返回数量,提高性能
+                    FieldWeights = new Dictionary<string, int>
+                    {
+                        { "TeamName", 10 }
+                    },
+                    Filters = new List<SearchFilter>
+                    {
+                        new SearchFilter { Field = "IsDel", Operator = "eq", Value = "0" },
+                        new SearchFilter { Field = "Id", Operator = "in", Values = authorizedGroupIds.ConvertAll<object>(x => x) }
+                    },
+                    OrderBy = "VisitDate", // 添加排序方向
+                    ReturnFields = new List<string> { "Id", "TeamName" } // 添加ID字段
+                };
+
+                #endregion
+
+                #region 字段配置验证
+
+                var validation = _groupSearchService.ValidateFieldConfig(
+                    searchRequest.FieldWeights,
+                    searchRequest.ReturnFields);
+
+                if (!validation.IsValid)
+                {
+                    return Ok(JsonView(false, $"字段配置错误: {validation.Message}"));
+                }
+
+                #endregion
+
+                #region 执行搜索
+
+                var result = await _groupSearchService.SearchAsync(searchRequest);
+
+                if (!result.Success)
+                {
+                    return Ok(JsonView(false, result.Message ?? "搜索失败"));
+                }
+
+                if (result.Items == null || !result.Items.Any())
+                {
+                    return Ok(JsonView(true, "未找到匹配的团组", new List<object>(), 0));
+                }
+
+                #endregion
+
+                #region 构建返回数据
+
+                var responseData = result.Items
+                    .Where(item => item.Data != null)
+                    .Select(item => new
+                    {
+                        Id = item.Data.Id,
+                        TeamName = item.Data.TeamName
+                    })
+                    .Where(x => !string.IsNullOrWhiteSpace(x.TeamName)) // 过滤空名称
+                    .Distinct() // 去重
+                    .ToList();
+
+                #endregion
+
+                return Ok(JsonView(true, "搜索成功", responseData, responseData.Count));
+            }
+            catch (Exception ex)
+            {
+                // 记录日志(实际项目中应该使用日志框架)
+                // _logger.LogError(ex, "团组费用关键字搜索失败,用户ID: {UserId}, 费用类型: {FeeType}", userId, feeType);
+
+                // 生产环境中不要返回详细的错误信息
+                return Ok(JsonView(false, "搜索服务暂时不可用,请稍后重试"));
+            }
+        }
     }
 }

+ 4 - 4
OASystem/OASystem.Infrastructure/Repositories/Groups/AirTicketResRepository.cs

@@ -327,7 +327,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 #region 团组下拉框
 
                 List<Grp_GroupsTaskAssignment> grp_GroupsTaskAssignment = Query<Grp_GroupsTaskAssignment>(a => a.IsDel == 0 && a.UId == dto.UserId && a.CTId == 85).ToList();
-                var grp_NameView = new List<GroupNameView>();
+                var grp_NameView = new List<dynamic>();
                 string DiId = "";
                 foreach (var item in grp_GroupsTaskAssignment)
                 {
@@ -347,10 +347,10 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                     foreach (var item in grp_Delegations)
                     {
-                        var groupNameView = new GroupNameView
+                        var groupNameView = new
                         {
-                            Id = item.Id,
-                            GroupName = item.TeamName
+                            item.Id,
+                            item.TeamName
                         };
                         grp_NameView.Add(groupNameView);
                     }