修改
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
he 2025-03-14 14:50:12 +08:00
parent 0f682dd184
commit 7a75d107dc
2 changed files with 12 additions and 5 deletions

View File

@ -12,6 +12,7 @@ namespace IRaCIS.Core.Application.Service
/// </summary>
[ApiExplorerSettings(GroupName = "Reviewer")]
public class AttachmentService(IRepository<Attachment> _attachmentrepository,
IRepository<Dictionary> _dictionaryRepository,
IRepository<Enroll> _enrollRepository,
IRepository<Doctor> _doctorrepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IAttachmentService
{
@ -104,6 +105,8 @@ namespace IRaCIS.Core.Application.Service
{
var doctorIds =await _enrollRepository.Where(x => x.TrialId == inDto.TrialId && x.EnrollStatus >= EnrollStatus.InviteIntoGroup).Select(x => x.DoctorId).ToListAsync();
var dicList=await _dictionaryRepository.Where(x => x.Parent.Code == "CertificateFileType").Select(x=>x.Code).ToListAsync();
var ids = doctorIds.Select(x=>(Guid?)x).ToList();
var attachmentList = await _attachmentrepository
@ -112,7 +115,11 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inDto.Type.IsNotNullOrEmpty(), x => x.Type == inDto.Type)
.WhereIf(inDto.FileName.IsNotNullOrEmpty(), x => inDto.FileName.Contains(x.FileName))
.Where(a => ids.Contains(a.DoctorId)||a.TrialId==inDto.TrialId ).ProjectTo<AttachmentDTO>(_mapper.ConfigurationProvider).ToPagedListAsync(inDto);
.Where(a => dicList.Contains(a.Type)||a.Type==string.Empty)
.Where(a => ids.Contains(a.DoctorId) || a.TrialId == inDto.TrialId)
.ProjectTo<AttachmentDTO>(_mapper.ConfigurationProvider).ToPagedListAsync(inDto);
return attachmentList;

View File

@ -73,10 +73,10 @@ namespace IRaCIS.Core.Application.Service
CreateMap<Attachment, AttachmentDTO>()
.ForMember(d => d.BlindName, u => u.MapFrom(t => t.Doctor.BlindName))
.ForMember(d => d.BlindNameCN, u => u.MapFrom(t => t.Doctor.BlindNameCN))
.ForMember(d => d.ChineseName, u => u.MapFrom(t => t.Doctor.ChineseName))
.ForMember(d => d.FirstName, u => u.MapFrom(t => t.Doctor.FirstName))
.ForMember(d => d.LastName, u => u.MapFrom(t => t.Doctor.LastName))
.ForMember(d => d.UserName, u => u.MapFrom(t => t.Doctor.UserRole.UserName))
.ForMember(d => d.ChineseName, u => u.MapFrom(t => t.Doctor.ChineseName))
.ForMember(d => d.FirstName, u => u.MapFrom(t => t.Doctor.FirstName))
.ForMember(d => d.LastName, u => u.MapFrom(t => t.Doctor.LastName))
.ForMember(d => d.UserName, u => u.MapFrom(t => t.Doctor.UserRole.UserName))
;
CreateMap<Doctor, GetTrialDoctorListOutDto>();
CreateMap<Doctor, ResumeConfirmDTO>();