Kaynağa Gözat

自贡12345 - 预案库列表

libin 4 ay önce
ebeveyn
işleme
793c8dc918

+ 6 - 6
src/Hotline.Application/Planlibrary/PlanApplication.cs

@@ -181,10 +181,10 @@ namespace Hotline.Application.Planlibrary
         /// <returns></returns>
         public async Task<(int, IList<PlanDataDto>)> QueryAllPlanListAsync(PlanListDto pagedDto, CancellationToken cancellationToken)
         {
-            if (!_sessionContext.OrgIsCenter)
-            {// 部门只能查询【部门预案库】
-                pagedDto.Attribution = "部门预案库";
-            }
+            //if (!_sessionContext.OrgIsCenter)
+            //{// 部门只能查询【部门预案库】
+            //    pagedDto.Attribution = "部门预案库";
+            //}
 
             var typeSpliceName = string.Empty;
             var hotspotHotSpotFullName = string.Empty;
@@ -203,8 +203,8 @@ namespace Hotline.Application.Planlibrary
 
             //单表分页
             var (total, temp) = await _planListRepository.Queryable()
-                //.Includes(x => x.PlanTypes)
-
+                .Includes(x => x.PlanTypes)
+                .Includes(x => x.HotspotType)
                 .Where(x => x.IsDeleted == false)
                 .Where(x => (x.Status == EPlanStatus.Drafts && x.CreatorId == _sessionContext.UserId) || (x.Status != EPlanStatus.Drafts))
                 .WhereIF(OrgSeedData.CenterId != pagedDto.CreateOrgId && !string.IsNullOrEmpty(pagedDto.CreateOrgId), x => x.CreatorOrgId != null && x.CreatorOrgId.StartsWith(pagedDto.CreateOrgId!))

+ 15 - 15
src/Hotline.Share/Dtos/Planlibrary/PlanDataDto.cs

@@ -93,38 +93,38 @@ namespace Hotline.Share.Dtos.Planlibrary
         /// </summary>
         public string StatusName => NewStatus.GetDescription();
 
-        public HotspotDto HotspotType { get; set; }
-
-        /// <summary>
-        /// 热点
-        /// </summary>
-        public string HotspotName => HotspotType != null ? HotspotType.HotSpotFullName : string.Empty;
-
         /// <summary>
-        /// 知识分类名称
+        /// 预案分类
         /// </summary>
-        public string KnowledgeTypeText => GetKnowledgeTypeText(KnowledgeType);
+        public List<PlanRelationTypeDto> PlanTypes { get; set; }
 
         /// <summary>
-        /// 知识分类
+        /// 预案分类名称
         /// </summary>
-        public List<PlanRelationTypeDto> KnowledgeType { get; set; }
+        public string PlanTypeText => GetPlanTypeText(PlanTypes);
 
         /// <summary>
-        /// 获取知识分类名称
+        /// 获取预案分类名称
         /// </summary>
         /// <returns></returns>
-        public string GetKnowledgeTypeText(List<PlanRelationTypeDto> items)
+        public string GetPlanTypeText(List<PlanRelationTypeDto> items)
         {
 
-            if (KnowledgeType != null && KnowledgeType.Any())
+            if (PlanTypes != null && PlanTypes.Any())
             {
-                var names = KnowledgeType.Select(x => x.PlanTypeName).ToList();
+                var names = PlanTypes.Select(x => x.PlanTypeName).ToList();
                 return string.Join(",", names);
             }
             return "";
         }
 
+        public HotspotDto HotspotType { get; set; }
+
+        /// <summary>
+        /// 热点
+        /// </summary>
+        public string HotspotName => HotspotType != null ? HotspotType.HotSpotFullName : string.Empty;
+
     }
 
     public record PlanRelationTypeDto