From 5ac6e186c09a1b90374689581d962de545091bd1 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 10 Apr 2024 14:54:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=AD=E5=BF=83=E8=B0=83?= =?UTF-8?q?=E7=A0=94bug=20=E9=9C=80=E8=A6=81=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs | 2 +- .../Service/SiteSurvey/TrialSiteSurveyService.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs index bd658172b..949817005 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs @@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Contracts public bool? IsGenerateAccount { get; set; } - public Guid? TrialRoleNameId { get; set; } + public int? TrialRoleCode { get; set; } public TrialSiteUserStateEnum? State { get; set; } diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index e5c673fbd..5ee28c5e4 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -531,6 +531,7 @@ namespace IRaCIS.Core.Application.Contracts var groupSelectIdQuery = _trialSiteSurveyRepository.Where(t => t.TrialId == queryParam.TrialId) .WhereIf(queryParam.SiteId != null, t => t.SiteId == queryParam.SiteId) + .WhereIf(!string.IsNullOrEmpty(queryParam.FormWriterKeyInfo), t => (t.UserName).Contains(queryParam.FormWriterKeyInfo) || t.Email.Contains(queryParam.FormWriterKeyInfo) || t.Phone.Contains(queryParam.FormWriterKeyInfo)) .GroupBy(t => t.SiteId) .Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First()); @@ -538,6 +539,7 @@ namespace IRaCIS.Core.Application.Contracts var query = _trialSiteUserSurveyRepository .Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId)) + .WhereIf(queryParam.TrialRoleCode != null, t => t.TrialRoleCode == queryParam.TrialRoleCode) .WhereIf(queryParam.UserTypeId != null, t => t.UserTypeId == queryParam.UserTypeId) .WhereIf(queryParam.IsGenerateAccount != null, t => t.IsGenerateAccount == queryParam.IsGenerateAccount) .WhereIf(queryParam.State != null && queryParam.State != TrialSiteUserStateEnum.OverTime, t => t.InviteState == queryParam.State)