diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index d2616588e..2a861eb65 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -490,10 +490,11 @@ namespace IRaCIS.Core.Application.Service.Common .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) // CRC 只负责他管理site的受试者 - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) - .ProjectTo(_mapper.ConfigurationProvider) - .WhereIf(inQuery.IsMissingImages != null, t => t.IsMissingImages == inQuery.IsMissingImages) - .ProjectTo(_mapper.ConfigurationProvider); + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .ProjectTo(_mapper.ConfigurationProvider) + .WhereIf(inQuery.IsMissingImages == true, t => t.MissingSubmmitCount> 0) + .WhereIf(inQuery.IsMissingImages == false, t => t.MissingSubmmitCount == 0) + ; var list = subjectQuery.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.Code).ToList(); diff --git a/IRaCIS.Core.Application/Service/Common/MailService.cs b/IRaCIS.Core.Application/Service/Common/MailService.cs index 4a5c6764d..97c0ba219 100644 --- a/IRaCIS.Core.Application/Service/Common/MailService.cs +++ b/IRaCIS.Core.Application/Service/Common/MailService.cs @@ -766,18 +766,14 @@ namespace IRaCIS.Application.Services (isHaveTrialId ? t.UserTrials.Any(t => t.TrialId == feedBack.TrialId) : true)).Select(t => new { t.EMail, t.UserTypeEnum, t.FullName }).ToListAsync(); + foreach (var email in emailList) + { + messageToSend.To.Add(new MailboxAddress(email.FullName, email.EMail)); + } + //影像阅片反馈 pm if (feedBack.VisitTaskId != null) { - foreach (var email in emailList) - { - if (email.UserTypeEnum == UserTypeEnum.ProjectManager) - { - //收件地址 - messageToSend.To.Add(new MailboxAddress(email.FullName, email.EMail)); - } - } - var userNames = string.Join(',', emailList.Where(email => email.UserTypeEnum == UserTypeEnum.ProjectManager).Select(t => t.FullName)); var emailType = await _repository.Where(t => t.Parent.Code == "Email_BusinessScenario" && t.ParentId != null && t.Code == ((int)EmailBusinessScenario.UserResetEmail).ToString()).Select(t => _userInfo.IsEn_Us ? t.Value : t.ValueCN).FirstOrDefaultAsync(); @@ -811,15 +807,6 @@ namespace IRaCIS.Application.Services //项目相关的反馈 pm admin else if (feedBack.TrialId != null) { - foreach (var email in emailList) - { - if (email.UserTypeEnum == UserTypeEnum.ProjectManager || email.UserTypeEnum == UserTypeEnum.Admin) - { - //收件地址 - messageToSend.To.Add(new MailboxAddress(email.FullName, email.EMail)); - } - } - var userNames = string.Join(',', emailList.Where(email => email.UserTypeEnum == UserTypeEnum.ProjectManager || email.UserTypeEnum == UserTypeEnum.Admin).Select(t => t.FullName)); var emailType = await _repository.Where(t => t.Parent.Code == "Email_BusinessScenario" && t.ParentId != null && t.Code == ((int)EmailBusinessScenario.UserResetEmail).ToString()).Select(t => _userInfo.IsEn_Us ? t.Value : t.ValueCN).FirstOrDefaultAsync(); @@ -851,14 +838,6 @@ namespace IRaCIS.Application.Services //项目无关的反馈 admin zyss else { - foreach (var email in emailList) - { - if (email.UserTypeEnum == UserTypeEnum.ZYSS || email.UserTypeEnum == UserTypeEnum.Admin) - { - //收件地址 - messageToSend.To.Add(new MailboxAddress(email.FullName, email.EMail)); - } - } var userNames = string.Join(',', emailList.Where(email => email.UserTypeEnum == UserTypeEnum.ZYSS || email.UserTypeEnum == UserTypeEnum.Admin).Select(t => t.FullName)); diff --git a/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs b/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs index f965b0b78..5f987f320 100644 --- a/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs @@ -114,7 +114,7 @@ namespace IRaCIS.Core.Application.Service if (addOrEditUserFeedBack.VisitTaskId != null || addOrEditUserFeedBack.Id == null) { - //await mailService.UserFeedBackMail(entity.Id); + await mailService.UserFeedBackMail(entity.Id); } return ResponseOutput.Ok(entity.Id.ToString()); diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index 7d9c33e72..12e02ab62 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -342,6 +342,7 @@ namespace IRaCIS.Core.Application.Contracts public class SubjectExportDTO { + public string Code { get; set; } = String.Empty; //public int? Age { get; set; } @@ -393,6 +394,8 @@ namespace IRaCIS.Core.Application.Contracts public string LatestVisitName { get; set; } = string.Empty; public string LatestBlindName { get; set; } = string.Empty; + + [DictionaryTranslateAttribute("YesOrNo")] public bool IsMissingImages => MissingSubmmitCount > 0;