查询撤销
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
he 2025-03-18 10:33:43 +08:00
parent 11c9cebf47
commit 5cf8c7a898
1 changed files with 13 additions and 11 deletions

View File

@ -125,18 +125,20 @@ namespace IRaCIS.Core.Application.Service
[HttpGet("{trialId:guid}")]
public async Task<List<TrialDoctorUserSelectView>> GetDoctorUserSelectList(Guid trialId, [FromServices] IRepository<Enroll> _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();
}