修改查询

This commit is contained in:
2024-12-27 11:32:17 +08:00
parent c06681f379
commit 7853614d2d
34 changed files with 237 additions and 165 deletions
@@ -315,6 +315,8 @@ namespace IRaCIS.Application.Contracts
public string FullName { get; set; }
public DateTime? LastChangePassWordTime { get; set; }
public List<IdentityUserTypeDTO> UserRoleList { get; set; }
}
@@ -40,7 +40,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.EndCreatime != null, t => t.CreateTime == inQuery.EndCreatime)
.WhereIf(inQuery.UserTypeEnum != null, t => t.CreateUserRole.UserTypeEnum == inQuery.UserTypeEnum)
.WhereIf(!string.IsNullOrEmpty(inQuery.FeedBackUserKeyInfo), t => t.CreateUserRole.FullName.Contains(inQuery.FeedBackUserKeyInfo) || t.CreateUserRole.UserName.Contains(inQuery.FeedBackUserKeyInfo))
.WhereIf(!string.IsNullOrEmpty(inQuery.FeedBackUserKeyInfo), t => t.CreateUserRole.FullName.Contains(inQuery.FeedBackUserKeyInfo) || t.CreateUserRole.IdentityUser.UserName.Contains(inQuery.FeedBackUserKeyInfo))
.WhereIf(!string.IsNullOrEmpty(inQuery.QuestionDescription), t => t.QuestionDescription.Contains(inQuery.QuestionDescription))
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialKeyInfo), t => t.Trial.ExperimentName.Contains(inQuery.TrialKeyInfo) || t.Trial.TrialCode.Contains(inQuery.TrialKeyInfo))
.WhereIf(!string.IsNullOrEmpty(inQuery.SubejctAndVisitKeyInfo), t => t.Subject.Code.Contains(inQuery.SubejctAndVisitKeyInfo) || t.SubjectVisit.VisitName.Contains(inQuery.SubejctAndVisitKeyInfo))
@@ -97,7 +97,7 @@ namespace IRaCIS.Core.Application.Service
var userId = Guid.Empty;
CreateMap<SystemNotice, SystemNoticeView>()
.ForMember(t => t.PublishUserName, d => d.MapFrom(t => t.PublishedUser.UserName))
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUserRole.UserName))
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUserRole.IdentityUser.UserName))
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token));
@@ -105,7 +105,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<SystemNotice, SystemNoticeReadDTO>()
.ForMember(t => t.PublishUserName, d => d.MapFrom(t => t.PublishedUser.UserName))
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUserRole.UserName))
.ForMember(t => t.CreateUserName, d => d.MapFrom(t => t.CreateUserRole.IdentityUser.UserName))
.ForMember(t => t.IsRead, d => d.MapFrom(t => t.NoticeUserReadList.Any(t => t.CreateUserId == userId)))
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token));