yuanrf 1 тиждень тому
батько
коміт
dcef8acf5b

+ 9 - 11
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -5533,27 +5533,26 @@ FROM
         }
         #endregion
 
+        /// <summary>
+        /// 世运会数据
+        /// </summary>
+        /// <returns></returns>
         [HttpGet]
         public IActionResult WorldGamesData()
         {
-            var setData = _sqlSugar.Queryable<Sys_SetData>()
-                                    .Where(x => x.IsDel == 0 && x.STid == 117)
-                                    .ToList();
-
+            var setData = _sqlSugar.Queryable<Grp_GamesBudgetMaster>().Where(x => x.IsDel == 0).ToList();
+            var groupMenu = setData.GroupBy(x => x.T0);
             var resultArr = new List<DecreasePaymentsWorldGamesDataView>();
 
-            foreach (var item in setData)
+            foreach (var item in groupMenu)
             {
                 resultArr.Add(new DecreasePaymentsWorldGamesDataView
                 {
                     Data = new SetDataView
                     {
-                        Id = item.Id,
-                        Name = item.Name,
-                        Remark = item.Remark,
-                        STid = item.STid,
+                        Name = item.Key
                     },
-                    Child = JsonConvert.DeserializeObject<List<string>>(item.Remark) ?? new List<string>()
+                    Child = item.Select(x => x.CalculationContent).ToList()
                 });
             }
 
@@ -5561,7 +5560,6 @@ FROM
         }
 
 
-
         #endregion
 
         #region 文件上传、删除

+ 2 - 2
OASystem/OASystem.Domain/Entities/Groups/Grp_GamesBudgetMaster‌.cs

@@ -9,8 +9,8 @@ namespace OASystem.Domain.Entities.Groups
     /// <summary>
     /// 世运会成本预算明细‌
     /// </summary>
-    [SugarTable(tableName: "Grp_GamesBudgetMaster", tableDescription: "世运会成本预算明细")]
-    public class Grp_GamesBudgetMaster : EntityBase
+    [SugarTable(tableName: "Grp_GamesBudgetMaster", tableDescription: "世运会成本预算明细")]
+    public class Grp_GamesBudgetMaster : EntityBase
     {
         /// <summary>
         /// 直属父级