diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 6e07a112c..4f4f30199 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1013,7 +1013,7 @@ namespace IRaCIS.Core.Application.Service.Allocation SuggesteFinishedTime = u.SuggesteFinishedTime, ReadingCategory = u.ReadingCategory, }).ToList(), - }).OrderBy(x => x.SubjectId); + }).Where(x => x.UnReadTaskCount > 0).OrderBy(x => x.SubjectId); diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index b0e1bee25..f7d705cb5 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -145,6 +145,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto { public Guid? SubjectId { get; set; } + public string SubjectCode { get; set; }=string.Empty; public Guid TrialId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 1a583b02b..0f00ce427 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -295,7 +295,7 @@ namespace IRaCIS.Application.Services index++; }); - var subjectIndex = subjectTaskList.Where(x => x.SubjectId == inDto.SubjectId).Select(x => x.Index).FirstOrDefault(); + var subjectIndex = subjectTaskList.Where(x => x.SubjectId == inDto.SubjectId&&x.SubjectCode==inDto.SubjectCode).Select(x => x.Index).FirstOrDefault(); var currentSubject = subjectTaskList.Where(x => x.Index >= subjectIndex&&!x.ExistReadingApply).OrderBy(x => x.Index).FirstOrDefault();