修改项目中心查询,文档查询
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-05-15 16:17:17 +08:00
parent f58ee6f63a
commit 6b807f419b
5 changed files with 13 additions and 5 deletions
@@ -36,6 +36,8 @@ namespace IRaCIS.Core.Application.Contracts
public bool? IsDeleted { get; set; }
public Guid? FileTypeId { get; set; }
public Guid? UserTypeId { get; set; }
public string Name { get; set; } = String.Empty;
[NotDefault]
@@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Authorization;
using IRaCIS.Core.Application.Auth;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Application.Filter;
using System.Linq;
namespace IRaCIS.Core.Application.Services
{
@@ -63,6 +64,7 @@ namespace IRaCIS.Core.Application.Services
var trialDocumentQueryable = _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == queryTrialDocument.TrialId)
.WhereIf(!string.IsNullOrEmpty(queryTrialDocument.Name), t => t.Name.Contains(queryTrialDocument.Name))
.WhereIf(queryTrialDocument.FileTypeId != null, t => t.FileTypeId == queryTrialDocument.FileTypeId)
.WhereIf(queryTrialDocument.UserTypeId != null, t => t.NeedConfirmedUserTypeList.Any(t=>t.NeedConfirmUserTypeId== queryTrialDocument.UserTypeId) )
.WhereIf(queryTrialDocument.IsDeleted != null, t => t.IsDeleted == queryTrialDocument.IsDeleted)
.ProjectTo<TrialDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, isEn_Us = _userInfo.IsEn_Us });