diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs index 06d71d365..9da354d11 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs @@ -4,10 +4,12 @@ // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 //-------------------------------------------------------------------- +using DocumentFormat.OpenXml.Spreadsheet; using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.Filter; using IRaCIS.Core.Application.Interfaces; using IRaCIS.Core.Application.ViewModel; +using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; using Microsoft.AspNetCore.Mvc; @@ -123,20 +125,18 @@ namespace IRaCIS.Core.Application.Service [HttpGet("{trialId:guid}")] public async Task> GetDoctorUserSelectList(Guid trialId, [FromServices] IRepository _enrollRepository) { - var query = from enroll in _enrollRepository.Where(t => t.TrialId == trialId && t.EnrollStatus >= EnrollStatus.ConfirmIntoGroup) - join user in _userRoleRepository.AsQueryable() on enroll.DoctorId equals user.DoctorId - select new TrialDoctorUserSelectView() - { - TrialId = enroll.TrialId, - //ReadingType = enroll.Trial.ReadingType, - DoctorUserId = user.Id, - FullName = user.IdentityUser.FullName, - UserCode = user.IdentityUser.UserCode, - UserName = user.IdentityUser.UserName, - UserTypeEnum = user.UserTypeRole.UserTypeEnum, - ReadingCategoryList = enroll.EnrollReadingCategoryList.Select(t => t.ReadingCategory).ToList() + var query = _enrollRepository.Where(t => t.TrialId == trialId && t.EnrollStatus >= EnrollStatus.ConfirmIntoGroup) + .Select(x => new TrialDoctorUserSelectView { - }; + TrialId = x.TrialId, + //ReadingType = enroll.Trial.ReadingType, + DoctorUserId = x.DoctorUser.Id, + FullName = x.DoctorUser.IdentityUser.FullName, + UserCode = x.DoctorUser.IdentityUser.UserCode, + UserName = x.DoctorUser.IdentityUser.UserName, + UserTypeEnum = x.DoctorUser.UserTypeRole.UserTypeEnum, + ReadingCategoryList = x.EnrollReadingCategoryList.Select(t => t.ReadingCategory).ToList() + }); return await query.ToListAsync(); } diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs index 78a96a770..4a12e84c2 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs @@ -371,7 +371,7 @@ namespace IRaCIS.Core.Application.Service var doctorPageList = await doctorQuery .WhereIf(inQuery.HospitalId!=null,x=>x.HospitalId==inQuery.HospitalId.Value) .WhereIf(inQuery.SpecialityId != null, x => x.SpecialityId == inQuery.SpecialityId.Value) - .WhereIf(inQuery.SubspecialityId != null, x => x.SubspecialityIds.Contains(inQuery.SpecialityId.Value)) + .WhereIf(inQuery.SubspecialityId != null, x => x.DictionaryList.Any(x=>x.Id==inQuery.SubspecialityId.Value)) .ToPagedListAsync(inQuery); var enrollStateList = await _enrollDetailRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus > EnrollStatus.InviteIntoGroup)