修改site关联

This commit is contained in:
2024-06-03 14:37:38 +08:00
parent 4db3860ade
commit 0e23719c7b
101 changed files with 354 additions and 3290 deletions
@@ -166,11 +166,11 @@ namespace IRaCIS.Application.Services
var subjectIds = await subjectQuery.OrderBy(dto.SortField).Select(x => x.SubjectId).Distinct().Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
List<ReadModuleView> ReadModuleViewList = await subjectQuery.Where(x => subjectIds.Contains(x.SubjectId)).OrderBy(dto.SortField).ToListAsync();
List<GetReadModuleDtoOut> getReadList = ReadModuleViewList.GroupBy(x => new { x.SubjectId, x.SiteId, x.TrialSiteCode, x.SubjectCode })
List<GetReadModuleDtoOut> getReadList = ReadModuleViewList.GroupBy(x => new { x.SubjectId, x.TrialSiteId, x.TrialSiteCode, x.SubjectCode })
.Select(x => new GetReadModuleDtoOut()
{
TrialSiteCode = x.Key.TrialSiteCode,
SiteId = x.Key.SiteId,
TrialSiteId = x.Key.TrialSiteId,
SubjectCode = x.Key.SubjectCode,
SubjectId = x.Key.SubjectId,
Data = x.OrderBy(x=>x.ModuleType).ThenBy(x=>x.VisitNum).ToList(),