From d60a2567c1202b7fbd52e4641849f5f6e93949b0 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 22 May 2024 17:48:59 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/DTO/VisitTaskViewModel.cs | 5 ++++- .../Service/Allocation/VisitTaskService.cs | 6 +++--- .../Reading/ReadingImageTask/ReadingImageTaskService.cs | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 7ec04337f..b2e87fb4b 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -358,7 +358,10 @@ namespace IRaCIS.Core.Application.ViewModel { public Guid TrialId { get; set; } - public Guid TrialReadingCriterionId { get; set; } + + public Guid? SubjectId { get; set; } + + public Guid TrialReadingCriterionId { get; set; } public string? SubjectCode { get; set; } = null; diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 109779bd1..9bf93330a 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -661,9 +661,9 @@ namespace IRaCIS.Core.Application.Service.Allocation var visitQuery = _visitTaskRepository .Where(x => x.TrialId == inDto.TrialId && x.TaskState == TaskState.Effect) - - //PI 读基线的时候,subject 如果PI基线没阅片完,SR就不能看 - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllBaseline && readingDivisionEnum == ReadingDivisionEnum.PIandSR, + .WhereIf(inDto.SubjectId!=null,t=>t.SubjectId==inDto.SubjectId) + //PI 读基线的时候,subject 如果PI基线没阅片完,SR就不能看 + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllBaseline && readingDivisionEnum == ReadingDivisionEnum.PIandSR, t => t.Subject.SubjectVisitTaskList.Any(c => c.SourceSubjectVisit.IsBaseLine == true && c.ReadingTaskState == ReadingTaskState.HaveSigned && c.TaskState == TaskState.Effect && c.TrialReadingCriterionId == trialReadingCriterionId)) //PI 读随访的时候, subject 如果SR基线没阅片完,PI就不能看 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 8cb2864ef..9c3afee0c 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -2329,6 +2329,7 @@ namespace IRaCIS.Application.Services var subjectTaskList = (await _visitTaskService.GetOrderReadingIQueryable(new GetOrderReadingIQueryableInDto() { TrialId = inDto.TrialId, + SubjectId=inDto.SubjectId, TrialReadingCriterionId = trialReadingCriterionId!.Value, Page = new PageInput() { From 400421a337750d76844381ef7a44806fb7726b3c Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 22 May 2024 17:53:31 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingImageTask/ReadingImageTaskService.cs | 4 ++-- .../_IRaCIS/Output/ApiResponseCodeEnum.cs | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 9c3afee0c..39adb7875 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -2351,7 +2351,7 @@ namespace IRaCIS.Application.Services if (currentSubject == null) { - throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"]); + throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows); } task = currentSubject.UnReadCanReadTaskList.Select(x => new GetReadingTaskDto() @@ -2424,7 +2424,7 @@ namespace IRaCIS.Application.Services if (task == null) { - throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"]); + throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows); } if (task.SubjectCode.IsNullOrEmpty()) diff --git a/IRaCIS.Core.Infrastructure/_IRaCIS/Output/ApiResponseCodeEnum.cs b/IRaCIS.Core.Infrastructure/_IRaCIS/Output/ApiResponseCodeEnum.cs index 73b9597ae..91e809fdb 100644 --- a/IRaCIS.Core.Infrastructure/_IRaCIS/Output/ApiResponseCodeEnum.cs +++ b/IRaCIS.Core.Infrastructure/_IRaCIS/Output/ApiResponseCodeEnum.cs @@ -24,11 +24,15 @@ namespace IRaCIS.Core.Infrastructure.Extention ProgramException = 4, //需要提示 ,需要提示 从Result 取数据 ( 0 可以继续处理提交 ,1 不能进行继续处理提交 ,2 刷新列表 ) - NeedTips = 5, + NeedTips = 5, + /// + /// 关闭当前页面 + /// + CloseCurrentWindows=6, - //在其他地方登陆,被迫下线 - LoginInOtherPlace = -1, + //在其他地方登陆,被迫下线 + LoginInOtherPlace = -1, //没有带token访问(未登陆) NoToken=10, From 10fc07ec030a96de46f9ab8cde85aa7c9a33ffbc Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 22 May 2024 17:56:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessValidationFailedException.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Infrastructure/_IRaCIS/Exception/BusinessValidationFailedException.cs b/IRaCIS.Core.Infrastructure/_IRaCIS/Exception/BusinessValidationFailedException.cs index ccda66221..bda936380 100644 --- a/IRaCIS.Core.Infrastructure/_IRaCIS/Exception/BusinessValidationFailedException.cs +++ b/IRaCIS.Core.Infrastructure/_IRaCIS/Exception/BusinessValidationFailedException.cs @@ -1,17 +1,22 @@ -using System; +using IRaCIS.Core.Infrastructure.Extention; +using System; namespace IRaCIS.Core.Infrastructure { public class BusinessValidationFailedException : Exception { + public ApiResponseCodeEnum Code { get; set; } - public BusinessValidationFailedException() + public BusinessValidationFailedException() { } - public BusinessValidationFailedException( string message) : base(message) - { - } + public BusinessValidationFailedException(string message, ApiResponseCodeEnum code = ApiResponseCodeEnum.BusinessValidationFailed) : base(message) + { + Code = code; + + } + } }