From 5cf8c7a898fdbadca30e883218c6ce7fb1b1e928 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 18 Mar 2025 10:33:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=92=A4=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/TaskAllocationRuleService.cs | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs index 9da354d11..f01f99ede 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskAllocationRuleService.cs @@ -125,18 +125,20 @@ namespace IRaCIS.Core.Application.Service [HttpGet("{trialId:guid}")] public async Task> GetDoctorUserSelectList(Guid trialId, [FromServices] IRepository _enrollRepository) { - var query = _enrollRepository.Where(t => t.TrialId == trialId && t.EnrollStatus >= EnrollStatus.ConfirmIntoGroup) - .Select(x => new TrialDoctorUserSelectView { + 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() - 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(); }