From 7dbf3bee751459b067ce0bed73e01585bcd10e33 Mon Sep 17 00:00:00 2001 From: "{872297557@qq.com}" <872297557@qq.com> Date: Thu, 1 Dec 2022 15:37:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E8=A7=86=E4=BB=BB=E5=8A=A1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 2 +- .../Service/Allocation/VisitTaskService.cs | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index fe575282f..3ea518222 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -6070,7 +6070,7 @@ - 通过传递场景枚举 返回对应的下拉框数据 1:是外部 2:是内部 3:是Site调研 + 通过传递场景枚举 返回对应的下拉框数据 1:是外部 2:是内部 3:是Site调研 4: 邮件接收人,5:邮件抄送人 diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index ab24de692..fe811779f 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -968,19 +968,18 @@ namespace IRaCIS.Core.Application.Service.Allocation /// public async Task<(int, List)> GetOrderReadingIQueryable(GetOrderReadingIQueryableInDto inDto) { - var visitGroupQuery = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.DoctorUserId == _userInfo.Id) + var visitGroupQuery = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect) .Where(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId) .WhereIf(!string.IsNullOrEmpty(inDto.SubjectCode), t => t.Subject.Code.Contains(inDto.SubjectCode) || t.BlindSubjectCode.Contains(inDto.SubjectCode)) - .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 }); + //.Where(t => (t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)) + .GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode }); var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView() { SubjectId = x.Key.SubjectId, SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode, - UnReadTaskCount = x.Where(y => y.ReadingTaskState != ReadingTaskState.HaveSigned).Count(), - ExistReadingApply = x.Any(y => y.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed), + UnReadTaskCount = x.Where(y => y.ReadingTaskState != ReadingTaskState.HaveSigned && y.ReadingTaskState!=ReadingTaskState.HaveSigned).Count(), + ExistReadingApply = x.Any(y => y.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed ||y.ReReadingApplyState==ReReadingApplyState.TrialGroupHaveApplyed), UnReadTaskList = x.Where(y => y.ReadingTaskState != ReadingTaskState.HaveSigned).OrderBy(x => x.VisitTaskNum) .Select(u => new IRUnreadTaskView() {