From 98ceaa007cac6614678942782c45f6c44851aca6 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 2 Aug 2022 10:26:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/IRaCIS.Core.API.xml | 7 ++++++ .../IRaCIS.Core.Application.xml | 9 +++++++- .../Service/Allocation/VisitTaskService.cs | 22 +++++++++++-------- .../Allocation/AllocationRelation.cs | 14 ++++++++++-- 4 files changed, 40 insertions(+), 12 deletions(-) diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml index bf3440224..5b7bd656b 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.xml +++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml @@ -90,6 +90,13 @@ + + + 提交肿瘤学阅片任务 + + + + 提交全局阅片任务 diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 69e154e4f..f2e7b6b80 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -5860,7 +5860,7 @@ - 修改全局阅片信息 + 修改肿瘤学阅片信息 @@ -5995,6 +5995,13 @@ + + + 提交肿瘤阅片结果 + + + + 提交全局阅片结果 diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 3e097529b..b9634d7cb 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1104,16 +1104,16 @@ namespace IRaCIS.Core.Application.Service.Allocation { var visitGroupQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id) .Where(x => !x.Subject.IsDeleted) - .Where(t => (t.ReadingTaskState != ReadingTaskState.HaveSigned || t.ReReadingApplyState == ReReadingApplyState.HaveApplyed) && t.TaskState == TaskState.Effect) + .Where(t => (t.ReadingTaskState != ReadingTaskState.HaveSigned || t.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed) && 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.ReReadingApplyState != ReReadingApplyState.HaveApplyed).Count(), - ExistReadingApply = x.Any(y => y.ReReadingApplyState == ReReadingApplyState.HaveApplyed), - UnReadTaskList = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.HaveApplyed).OrderBy(x => x.VisitTaskNum) + UnReadTaskCount = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.DocotorHaveApplyed).Count(), + ExistReadingApply = x.Any(y => y.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed), + UnReadTaskList = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.DocotorHaveApplyed).OrderBy(x => x.VisitTaskNum) .Select(u => new IRUnreadTaskView() { Id = u.Id, @@ -1130,7 +1130,7 @@ namespace IRaCIS.Core.Application.Service.Allocation var count = visitGroupQuery.Select(x => new { - UnReadTaskCount = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.HaveApplyed).Count(), + UnReadTaskCount = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.DocotorHaveApplyed).Count(), }).Where(x => x.UnReadTaskCount > 0).Count(); return (count, visitTaskQuery); } @@ -1197,7 +1197,7 @@ namespace IRaCIS.Core.Application.Service.Allocation throw new BusinessValidationFailedException("未阅片完成,或者未生效的任务不允许申请重阅"); } - if (task.ReReadingApplyState == ReReadingApplyState.HaveApplyed || task.ReReadingApplyState == ReReadingApplyState.Agree) + if (task.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.Agree) { throw new BusinessValidationFailedException("重阅已申请,或者重阅已同意状态下不允许申请重阅"); } @@ -1216,6 +1216,7 @@ namespace IRaCIS.Core.Application.Service.Allocation throw new BusinessValidationFailedException("PM 仅仅允许对访视类型的任务申请重阅"); } + task.ReReadingApplyState = ReReadingApplyState.TrialGroupHaveApplyed; //// 有序 @@ -1235,6 +1236,8 @@ namespace IRaCIS.Core.Application.Service.Allocation } if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer) { + task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed; + // 有序 if (trialConfig.IsReadingTaskViewInOrder) { @@ -1273,7 +1276,6 @@ namespace IRaCIS.Core.Application.Service.Allocation - task.ReReadingApplyState = ReReadingApplyState.HaveApplyed; var rootReReadingTaskId = _visitTaskReReadingRepository.Where(t => t.NewReReadingTaskId == task.Id).Select(u => u.RootReReadingTaskId).FirstOrDefault(); @@ -1423,7 +1425,8 @@ namespace IRaCIS.Core.Application.Service.Allocation #region PM 申请双重阅片 同一访视 其他已申请的任务也修改为同意 await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.OriginalReReadingTask.SubjectId == visitTaskReReadingAppply.OriginalReReadingTask.SubjectId && - t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.HaveApplyed && + t.OriginalReReadingTask.ReReadingApplyState==ReReadingApplyState.TrialGroupHaveApplyed && + //t.RequestReReadingResultEnum==RequestReReadingResult.Default && t.RequestReReadingType == RequestReReadingType.TrialGroupApply && t.OriginalReReadingTask.VisitTaskNum == origenalTask.VisitTaskNum && t.Id != item.Id, u => new VisitTaskReReading() @@ -1432,8 +1435,9 @@ namespace IRaCIS.Core.Application.Service.Allocation RequestReReadingResultEnum = RequestReReadingResult.Agree, }); + //只更新 PM 申请 同一访视的数据 await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == origenalTask.SubjectId && - t.ReReadingApplyState == ReReadingApplyState.HaveApplyed && + t.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed && t.IsAnalysisCreate == origenalTask.IsAnalysisCreate && t.VisitTaskNum == origenalTask.VisitTaskNum && t.Id != origenalTask.Id, u => new VisitTask() diff --git a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs index c8c8fc259..8d43de8f8 100644 --- a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs +++ b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs @@ -307,11 +307,21 @@ namespace IRaCIS.Core.Domain.Share { Default = 0, - HaveApplyed = 1, Agree = 2, - Reject = 3 + Reject = 3, + + + //IR 申请 + DocotorHaveApplyed = 4, + + //PM 申请 + TrialGroupHaveApplyed = 5 + + + + }