Browse Source

1、预案检索全文搜索查询不准确修复
2、新增预案添加附件上传失败修复

libin 3 months ago
parent
commit
ca3bd41917
1 changed files with 6 additions and 12 deletions
  1. 6 12
      src/Hotline.Application/Planlibrary/PlanApplication.cs

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

@@ -222,23 +222,17 @@ namespace Hotline.Application.Planlibrary
                 .WhereIF(OrgSeedData.CenterId != pagedDto.CreateOrgId && !string.IsNullOrEmpty(pagedDto.CreateOrgId), x => x.CreatorOrgId != null && x.CreatorOrgId.StartsWith(pagedDto.CreateOrgId!))
                 .WhereIF(!string.IsNullOrEmpty(pagedDto.Attribution), x => x.Attribution == pagedDto.Attribution)
 
-                .WhereIF(!string.IsNullOrEmpty(pagedDto.Title) &&
-                          string.IsNullOrEmpty(pagedDto.Content) &&
-                          string.IsNullOrEmpty(pagedDto.Keywords), x => x.Title.Contains(pagedDto.Title))
+                // 预案库没有关键词、去掉关键词查询
 
-                .WhereIF(string.IsNullOrEmpty(pagedDto.Title) &&
-                        !string.IsNullOrEmpty(pagedDto.Content) &&
-                         string.IsNullOrEmpty(pagedDto.Keywords), x => x.Content.Contains(pagedDto.Content))
+                .WhereIF(!string.IsNullOrEmpty(pagedDto.Title) &&
+                          string.IsNullOrEmpty(pagedDto.Content), x => x.Title.Contains(pagedDto.Title))
 
                 .WhereIF(string.IsNullOrEmpty(pagedDto.Title) &&
-                         string.IsNullOrEmpty(pagedDto.Content) &&
-                        !string.IsNullOrEmpty(pagedDto.Keywords), x => x.Keywords.Contains(pagedDto.Keywords))
+                        !string.IsNullOrEmpty(pagedDto.Content), x => x.Content.Contains(pagedDto.Content))
 
                 .WhereIF(!string.IsNullOrEmpty(pagedDto.Title) &&
-                         !string.IsNullOrEmpty(pagedDto.Content) &&
-                         !string.IsNullOrEmpty(pagedDto.Keywords), x => x.Title.Contains(pagedDto.Title!) ||
-                                                                   x.Content!.Contains(pagedDto.Content!) ||
-                                                                   x.Keywords!.Contains(pagedDto.Keywords!))
+                         !string.IsNullOrEmpty(pagedDto.Content), x => x.Title.Contains(pagedDto.Title!) ||
+                                                                   x.Content!.Contains(pagedDto.Content!))
 
                 .WhereIF(pagedDto.Status.HasValue && pagedDto.Status == EPlanStatus.OnShelf, x => x.Status == EPlanStatus.OnShelf)
                 .WhereIF(pagedDto.Status.HasValue && pagedDto.Status == EPlanStatus.OffShelf, x => x.Status == EPlanStatus.OffShelf)