diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index a114ab42a..04276cb09 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -324,7 +324,7 @@ - + 获取有序阅片IQuery对象 diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 7c05491b8..f268216ae 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -206,6 +206,8 @@ namespace IRaCIS.Core.Application.ViewModel public Guid? VisistId { get; set; } public DateTime? SuggesteFinishedTime { get; set; } + + public Guid TrialReadingCriterionId { get; set; } } @@ -281,6 +283,9 @@ namespace IRaCIS.Core.Application.ViewModel public string SubjectCode { get; set; } + [NotDefault] + public Guid TrialReadingCriterionId { get; set; } + } public class IRUnReadOutDto @@ -309,6 +314,7 @@ namespace IRaCIS.Core.Application.ViewModel /// 建议完成时间 /// public DateTime? SuggesteFinishedTime { get; set; } + } public class SubjectAssignQuery : PageInput diff --git a/IRaCIS.Core.Application/Service/Allocation/Interface/IVisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/Interface/IVisitTaskService.cs index 58fc73fc1..1d6ef842a 100644 --- a/IRaCIS.Core.Application/Service/Allocation/Interface/IVisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/Interface/IVisitTaskService.cs @@ -16,6 +16,6 @@ namespace IRaCIS.Core.Application.Service Task ConfirmReReading(ConfirmReReadingCommand agreeReReadingCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService); - (int, IOrderedQueryable) GetOrderReadingIQueryable(Guid trialId); + (int, IOrderedQueryable) GetOrderReadingIQueryable(Guid trialId, Guid? trialReadingCriterionId); } } \ No newline at end of file diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 0c84e6699..fe195561d 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1029,6 +1029,8 @@ namespace IRaCIS.Core.Application.Service.Allocation { var trialId = iRUnReadSubjectQuery.TrialId; + var trialReadingCriterionId = iRUnReadSubjectQuery.TrialReadingCriterionId; + #region 按照任务的维度统计分组 //var query = _visitTaskRepository.Where(t => t.TrialId == trialId) @@ -1065,7 +1067,7 @@ namespace IRaCIS.Core.Application.Service.Allocation // .Where(t => t.UnReadTaskCount > 0); - var visitTaskQuery = GetOrderReadingIQueryable(trialId); + var visitTaskQuery = GetOrderReadingIQueryable(trialId, trialReadingCriterionId); var totalCount = visitTaskQuery.Item1; var currentPageData = await visitTaskQuery.Item2.Skip((iRUnReadSubjectQuery.PageIndex - 1) * iRUnReadSubjectQuery.PageSize) @@ -1091,7 +1093,7 @@ namespace IRaCIS.Core.Application.Service.Allocation else { - var taskQuery = _visitTaskRepository.Where(x => x.TrialId == iRUnReadSubjectQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect) + var taskQuery = _visitTaskRepository.Where(x => x.TrialId == iRUnReadSubjectQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId==trialReadingCriterionId) .Where(x => !x.Subject.IsDeleted); IRUnReadOutDto iRUnReadOut = new IRUnReadOutDto() @@ -1125,9 +1127,10 @@ namespace IRaCIS.Core.Application.Service.Allocation /// /// /// - public (int, IOrderedQueryable) GetOrderReadingIQueryable(Guid trialId) + public (int, IOrderedQueryable) GetOrderReadingIQueryable(Guid trialId,Guid? trialReadingCriterionId) { - var visitGroupQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id) + var visitGroupQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id ) + .WhereIf(trialReadingCriterionId!=null,t=>t.TrialReadingCriterionId==trialReadingCriterionId) .Where(x => !x.Subject.IsDeleted) .Where(t => (t.ReadingTaskState != ReadingTaskState.HaveSigned || t.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || t.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed) && t.TaskState == TaskState.Effect) .GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode }); @@ -1149,6 +1152,8 @@ namespace IRaCIS.Core.Application.Service.Allocation SuggesteFinishedTime = u.SuggesteFinishedTime, ReadingCategory = u.ReadingCategory, IsAnalysisCreate = u.IsAnalysisCreate, + + TrialReadingCriterionId=u.TrialReadingCriterionId, }).ToList(), }).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 436ebf623..5c461505c 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -753,6 +753,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid TrialId { get; set; } + [NotDefault] + public Guid TrialReadingCriterionId { get; set; } public Guid? VisistTaskId { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 65a8e536d..364ebea6b 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -1273,7 +1273,7 @@ namespace IRaCIS.Application.Services //}).OrderBy(x => x.VisitNum).ThenBy(x => x.ReadingCategory); #endregion - var subjectTaskList = await _visitTaskService.GetOrderReadingIQueryable(inDto.TrialId).Item2.ToListAsync(); + var subjectTaskList = await _visitTaskService.GetOrderReadingIQueryable(inDto.TrialId, inDto.TrialReadingCriterionId).Item2.ToListAsync(); var index = 0; subjectTaskList.ForEach(x =>