From de5fc7c27781b290ee905f7a1f825d92e7b74162 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 25 Jul 2024 10:12:09 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=97=A0?= =?UTF-8?q?=E5=BA=8F=E9=87=8D=E9=98=85=20=E5=92=8C=E5=AE=A1=E6=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/VisitTaskService.cs | 33 +++++++++++++++---- .../Allocation/AllocationRelation.cs | 4 ++- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index e9aeb5a17..dc1eeddb7 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1416,6 +1416,13 @@ namespace IRaCIS.Core.Application.Service.Allocation { task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed; + + //在PM 的申请重阅的影响列表里也不能申请重阅 + + var pmApply = await _visitTaskReReadingRepository.Where(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect && t.OriginalReReadingTask.ReadingCategory == ReadingCategory.Visit + && t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.TrialGroupApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default).Include(t => t.OriginalReReadingTask).FirstOrDefaultAsync(); + + // 有序 if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder) { @@ -1429,10 +1436,6 @@ namespace IRaCIS.Core.Application.Service.Allocation } - //在PM 的申请重阅的影响列表里也不能申请重阅 - - var pmApply = await _visitTaskReReadingRepository.Where(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect && t.OriginalReReadingTask.ReadingCategory == ReadingCategory.Visit - && t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.TrialGroupApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default).Include(t => t.OriginalReReadingTask).FirstOrDefaultAsync(); if (pmApply != null) { @@ -1461,13 +1464,13 @@ namespace IRaCIS.Core.Application.Service.Allocation throw new BusinessValidationFailedException(_localizer["VisitTask_LastReading"]); } - if (task.ReadingCategory == ReadingCategory.Oncology && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Oncology))) + if (task.ReadingCategory == ReadingCategory.Oncology && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Oncology && t.ReadingTaskState==ReadingTaskState.HaveSigned))) { //---有序阅片,只允许申请该受试者阅片人最后一次完成肿瘤学任务重阅 throw new BusinessValidationFailedException(_localizer["VisitTask_LastOncologistRecheck"]); } - if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Judge))) + if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Judge && t.ReadingTaskState == ReadingTaskState.HaveSigned))) { //---有序阅片,只允许申请该受试者阅片人最后一次完成裁判的任务重阅 throw new BusinessValidationFailedException(_localizer["VisitTask_LastAdjudicatorRecheck"]); @@ -1476,6 +1479,22 @@ namespace IRaCIS.Core.Application.Service.Allocation } else { + + if (pmApply != null) + { + var originalTask = pmApply.OriginalReReadingTask; + + //PM 无序影响列表 + if (await _visitTaskRepository.Where(t => t.TrialId == originalTask.TrialId && t.SubjectId == originalTask.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated && t.IsAnalysisCreate == false && t.TrialReadingCriterionId == originalTask.TrialReadingCriterionId ) + .Where(t=>t.Id==originalTask.Id||t.Id==originalTask.JudgeVisitTaskId) + .AnyAsync(t => t.VisitTaskNum == task.VisitTaskNum)) + { + //---当前为无序阅片,影像存在问题,项目组已申请回退,暂不能申请重阅 + throw new BusinessValidationFailedException(_localizer["VisitTask_RandomInvalidRereading"]); + } + + } + //也要支持裁判重阅240701 if (task.ReadingCategory != ReadingCategory.Visit && task.ReadingCategory != ReadingCategory.Judge) @@ -1608,6 +1627,8 @@ namespace IRaCIS.Core.Application.Service.Allocation if ((origenalTask.TaskState != TaskState.Effect && origenalTask.TaskState != TaskState.Freeze)) { + await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new VisitTaskReReading() { RequestReReadingConfirmUserId = _userInfo.Id, RequestReReadingResultEnum = RequestReReadingResult.Invalid }); + //---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作 return ResponseOutput.NotOk(_localizer["VisitTask_ReapplyStatusConflict"]); } diff --git a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs index d5c6dec54..5159dd58a 100644 --- a/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs +++ b/IRaCIS.Core.Domain.Share/Allocation/AllocationRelation.cs @@ -368,7 +368,9 @@ namespace IRaCIS.Core.Domain.Share Agree = 1, - Reject = 2 + Reject = 2, + + Invalid = 3, } public enum ReReadingApplyState From 6311884a5c1d4b4f9c05331659094cc706665909 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 25 Jul 2024 12:22:56 +0800 Subject: [PATCH 2/7] =?UTF-8?q?dicom=20AE=20=20=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E6=8E=A8=E8=8D=90=20=20=E5=8F=91=E5=B8=83=E8=AE=B0=E5=BD=95=20?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Common/ExploreRecommendService.cs | 9 +++++---- .../Service/Common/PublishLogService.cs | 13 ++++++++----- .../Service/TrialSiteUser/TrialDicomAEService.cs | 3 ++- .../TrialSiteUser/TrialSiteDicomAEService.cs | 6 ++++-- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Common/ExploreRecommendService.cs b/IRaCIS.Core.Application/Service/Common/ExploreRecommendService.cs index 163b211a1..944a72442 100644 --- a/IRaCIS.Core.Application/Service/Common/ExploreRecommendService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExploreRecommendService.cs @@ -53,7 +53,8 @@ namespace IRaCIS.Core.Application.Service { VerifyExp = u => u.IsDeleted == addOrEditExploreRecommend.IsDeleted && u.ExploreType == addOrEditExploreRecommend.ExploreType, - VerifyMsg = "当前浏览器启用版本只允许有一个", + // "当前类型浏览器启用版本只允许有一个" + VerifyMsg = _localizer["ExploreRecommend_OnlyOneTypePerType"] , IsVerify = addOrEditExploreRecommend.IsDeleted == false }; @@ -68,7 +69,7 @@ namespace IRaCIS.Core.Application.Service [HttpDelete("{exploreRecommendId:guid}")] public async Task DeleteExploreRecommend(Guid exploreRecommendId) { - var success = await _exploreRecommendRepository.DeleteFromQueryAsync(t => t.Id == exploreRecommendId, true); + var success = await _exploreRecommendRepository.DeleteFromQueryAsync(t => t.Id == exploreRecommendId, true,true); return ResponseOutput.Ok(); } @@ -80,8 +81,8 @@ namespace IRaCIS.Core.Application.Service var result = await _exploreRecommendRepository.Where(t => t.IsDeleted == false).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); if (result .Count==0) - { - throw new QueryBusinessObjectNotExistException("系统浏览器版本推荐未维护,请联系维护人员"); + { //"系统浏览器版本推荐未维护,请联系维护人员" + throw new QueryBusinessObjectNotExistException(_localizer["ExploreRecommend_NoExporeRecord"]); } return result; diff --git a/IRaCIS.Core.Application/Service/Common/PublishLogService.cs b/IRaCIS.Core.Application/Service/Common/PublishLogService.cs index ca2eb25a0..f5e0bc35d 100644 --- a/IRaCIS.Core.Application/Service/Common/PublishLogService.cs +++ b/IRaCIS.Core.Application/Service/Common/PublishLogService.cs @@ -50,21 +50,24 @@ namespace IRaCIS.Core.Application.Service if (!Version.TryParse(addOrEditPublishLog.Version, out version)) { - return ResponseOutput.NotOk("版本号不符合要求"); + //"版本号不符合要求" + return ResponseOutput.NotOk(_localizer["PublishLog_NotValidVersion"] ); } var verifyExp1 = new EntityVerifyExp() { VerifyExp = u => u.Version == addOrEditPublishLog.Version, - VerifyMsg = "发布编号不能重复" + //"发布编号不能重复" + VerifyMsg = _localizer["PublishLog_RepeatVersion"] }; var verifyExp2 = new EntityVerifyExp() { VerifyExp = u => u.IsCurrentVersion == addOrEditPublishLog.IsCurrentVersion, - VerifyMsg = "当前发布版本只允许有一个", + //"当前发布版本只允许有一个" + VerifyMsg = _localizer["PublishLog_OnlyOneCurrentVersion"] , IsVerify=addOrEditPublishLog.IsCurrentVersion==true }; @@ -90,8 +93,8 @@ namespace IRaCIS.Core.Application.Service if (result == null) { - //系统当前版本未标记,请联系维护人员 - throw new QueryBusinessObjectNotExistException("系统当前版本未标记,请联系维护人员"); + //"系统当前版本未标记,请联系维护人员" + throw new QueryBusinessObjectNotExistException(_localizer["PublishLog_NoCurrentVersion"] ); } return result; diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs index 4c68b5992..7c24b56c9 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs @@ -72,7 +72,8 @@ namespace IRaCIS.Core.Application.Service { VerifyExp = u => u.IP == addOrEditDicomAE.IP && u.Port == addOrEditDicomAE.Port && u.TrialId == addOrEditDicomAE.TrialId, - VerifyMsg = "不允许添加相同的IP和端口的记录" + //"不允许添加相同的IP和端口的记录" + VerifyMsg = _localizer["TrialDicomAE_RepeatIPAndPort"] }; //var verifyExp2 = new EntityVerifyExp() diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteDicomAEService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteDicomAEService.cs index a0e9fa70e..7bd160513 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteDicomAEService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteDicomAEService.cs @@ -55,13 +55,15 @@ namespace IRaCIS.Core.Application.Service && u.CallingAE == addOrEditTrialSiteDicomAE.CallingAE && u.TrialId == addOrEditTrialSiteDicomAE.TrialId && u.TrialSiteId == addOrEditTrialSiteDicomAE.TrialSiteId, - VerifyMsg = "不允许添加相同的记录" + //"不允许添加相同的记录" + VerifyMsg = _localizer["TrialSiteDicomAE_RepeatRecord"] }; var verifyExp2 = new EntityVerifyExp() { VerifyExp = u => u.CallingAE == addOrEditTrialSiteDicomAE.CallingAE && u.TrialId == addOrEditTrialSiteDicomAE.TrialId && u.TrialSiteId!=addOrEditTrialSiteDicomAE.TrialSiteId, - VerifyMsg = "其他中心已有该CallingAE" + // "其他中心已有该CallingAE" + VerifyMsg = _localizer["TrialSiteDicomAE_OtherSiteExistCallingAE"] }; From 44bcdf797322e49fe7932f08a186a6d01c7babaf Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 25 Jul 2024 14:46:13 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E5=88=B0=E9=85=8D=E7=BD=AE=E9=A2=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Common/DTO/EmailNoticeConfigViewModel.cs | 2 ++ .../Service/Common/EmailNoticeConfigService.cs | 2 +- IRaCIS.Core.Domain/Common/EmailNoticeConfig.cs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Common/DTO/EmailNoticeConfigViewModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/EmailNoticeConfigViewModel.cs index 691b1e8bf..211be32dc 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/EmailNoticeConfigViewModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/EmailNoticeConfigViewModel.cs @@ -63,6 +63,8 @@ namespace IRaCIS.Core.Application.Contracts public bool? IsDistinguishCriteria { get; set; } + public bool IsSystemLevel { get; set; } = false; + } /// EmailNoticeConfigAddOrEdit 列表查询参数模型 diff --git a/IRaCIS.Core.Application/Service/Common/EmailNoticeConfigService.cs b/IRaCIS.Core.Application/Service/Common/EmailNoticeConfigService.cs index aa07c35c1..b634370e5 100644 --- a/IRaCIS.Core.Application/Service/Common/EmailNoticeConfigService.cs +++ b/IRaCIS.Core.Application/Service/Common/EmailNoticeConfigService.cs @@ -28,7 +28,7 @@ namespace IRaCIS.Core.Application.Contracts [HttpPost] public async Task> GetEmailNoticeConfigList(EmailNoticeConfigQuery queryEmailNoticeConfig) { - var emailNoticeConfigQueryable = _emailNoticeConfigrepository + var emailNoticeConfigQueryable = _emailNoticeConfigrepository.Where(t=>t.IsSystemLevel==queryEmailNoticeConfig.IsSystemLevel) .WhereIf(queryEmailNoticeConfig.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == queryEmailNoticeConfig.IsDistinguishCriteria) .WhereIf(queryEmailNoticeConfig.CriterionTypeEnum != null, t => t.CriterionTypeEnum == queryEmailNoticeConfig.CriterionTypeEnum) .WhereIf(queryEmailNoticeConfig.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryEmailNoticeConfig.BusinessScenarioEnum) diff --git a/IRaCIS.Core.Domain/Common/EmailNoticeConfig.cs b/IRaCIS.Core.Domain/Common/EmailNoticeConfig.cs index 74ab2ac60..31c4dfec9 100644 --- a/IRaCIS.Core.Domain/Common/EmailNoticeConfig.cs +++ b/IRaCIS.Core.Domain/Common/EmailNoticeConfig.cs @@ -69,6 +69,7 @@ namespace IRaCIS.Core.Domain.Models + public bool IsSystemLevel { get; set; } /// /// 是否区分标准 From 9a958276db7939c8a1db487bf415ae78a07fe6ca Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 25 Jul 2024 16:41:42 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=83=A8=E4=BD=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/BackGroundJob/IRaCISCHangfireJob.cs | 6 +++--- .../Service/TrialSiteUser/TrialConfigService.cs | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/BackGroundJob/IRaCISCHangfireJob.cs b/IRaCIS.Core.Application/BackGroundJob/IRaCISCHangfireJob.cs index 81da08136..f135121b6 100644 --- a/IRaCIS.Core.Application/BackGroundJob/IRaCISCHangfireJob.cs +++ b/IRaCIS.Core.Application/BackGroundJob/IRaCISCHangfireJob.cs @@ -142,7 +142,7 @@ namespace IRaCIS.Application.Services.BackGroundJob }; // 添加文件更改事件的处理程序 - FileSystemWatcher_US.Changed += (sender, e) => LoadJsonFile(usJsonPath); + FileSystemWatcher_US.Changed += (sender, e) => LoadJsonFile(StaticData.Folder.Resources+"\\"+ StaticData.En_US_Json); FileSystemWatcher_CN = new FileSystemWatcher @@ -153,7 +153,7 @@ namespace IRaCIS.Application.Services.BackGroundJob EnableRaisingEvents = true, }; - FileSystemWatcher_CN.Changed += (sender, e) => LoadJsonFile(cnJsonPath); + FileSystemWatcher_CN.Changed += (sender, e) => LoadJsonFile(StaticData.Folder.Resources + "\\" + StaticData.Zh_CN_Json); } @@ -163,7 +163,7 @@ namespace IRaCIS.Application.Services.BackGroundJob private void LoadJsonFile(string filePath) { Console.WriteLine("刷新json内存数据"); - IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile(filePath,false,true); + IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile(filePath,false,false); IConfigurationRoot enConfiguration = builder.Build(); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index f976c86ea..636a8c3b2 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -1346,12 +1346,15 @@ namespace IRaCIS.Core.Application public async Task AddOrUpdateTrialBodyPart(AddOrUpdateTrialBodyPartCommand incommand) { - var codeList = await _repository.Where(t => t.TrialId == incommand.TrialId).Select(t => t.Code).ToListAsync(); + var codeList = await _repository.Where(t => t.TrialId == incommand.TrialId) + .WhereIf(incommand.Id!=null,t=>t.Id!=incommand.Id) + .Select(t => t.Code).ToListAsync(); var newString = incommand.Code; // 检查字符串是否在集合中存在,如果存在,则在后面加上一个数字 int count = 1; + while (codeList.Contains(newString)) { newString = $"{newString}{count}"; From b0302d0e6db3822b5648c624934f369954985eb4 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 25 Jul 2024 13:54:57 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=90=8C=E6=84=8F=E9=87=8D=E9=98=85?= =?UTF-8?q?=EF=BC=8C=E6=88=90=E5=8A=9F=EF=BC=8C=E4=BD=86=E6=98=AF=E7=BB=99?= =?UTF-8?q?=E5=87=BA=E8=87=AA=E5=8A=A8=E5=A4=B1=E6=95=88=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index dc1eeddb7..0665ed727 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1630,7 +1630,7 @@ namespace IRaCIS.Core.Application.Service.Allocation await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new VisitTaskReReading() { RequestReReadingConfirmUserId = _userInfo.Id, RequestReReadingResultEnum = RequestReReadingResult.Invalid }); //---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作 - return ResponseOutput.NotOk(_localizer["VisitTask_ReapplyStatusConflict"]); + return ResponseOutput.Ok(_localizer["VisitTask_ReapplyStatusConflict"]); } From c6e5d31244381eba829beaf13b30104f97e857e1 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 25 Jul 2024 14:22:19 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E9=87=8D=E9=98=85=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=A4=B1=E6=95=88=EF=BC=8C=E9=94=99=E8=AF=AF=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E6=94=B9=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 0665ed727..b030d49ec 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1630,7 +1630,7 @@ namespace IRaCIS.Core.Application.Service.Allocation await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new VisitTaskReReading() { RequestReReadingConfirmUserId = _userInfo.Id, RequestReReadingResultEnum = RequestReReadingResult.Invalid }); //---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作 - return ResponseOutput.Ok(_localizer["VisitTask_ReapplyStatusConflict"]); + return ResponseOutput.Ok(string.Empty, msg:_localizer["VisitTask_ReapplyStatusConflict"]); } From cad7132b0a2d18efbc6f176b7eb2eb3c20635336 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 26 Jul 2024 09:04:34 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E9=80=9A=E8=BF=87=E7=9B=B8=E5=AF=B9?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=8E=B7=E5=8F=96=E6=8E=88=E6=9D=83=E7=AD=BE?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/OSSService.cs | 18 +++++++++++++----- .../IRaCIS.Core.Application.xml | 6 ------ IRaCIS.Core.Application/TestService.cs | 9 ++++++--- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs index 9d5a754ad..175367992 100644 --- a/IRaCIS.Core.Application/Helper/OSSService.cs +++ b/IRaCIS.Core.Application/Helper/OSSService.cs @@ -375,10 +375,6 @@ namespace IRaCIS.Core.Application.Helper .WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL) .Build(); - //var reqParams = new Dictionary(StringComparer.Ordinal) - // { - // { "response-content-type", "application/json" } - // }; var args = new PresignedGetObjectArgs() .WithBucket(minIOConfig.bucketName) @@ -404,7 +400,19 @@ namespace IRaCIS.Core.Application.Helper .WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL) .Build(); - return string.Empty; + var args = new PresignedGetObjectArgs() + .WithBucket(minIOConfig.bucketName) + .WithObject(ossRelativePath) + .WithExpiry(3600); + + var presignedUrl = await minioClient.PresignedGetObjectAsync(args); + + Uri uri = new Uri(presignedUrl); + + string relativePath = uri.PathAndQuery; + + + return relativePath; } else { diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 160a1ae97..1525d317b 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -14096,12 +14096,6 @@ - - - 获取临床数据集合 - - - 获取单个阅片临床数据的所有文件 diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index 98cd71e87..f00d2ac7a 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -120,11 +120,14 @@ namespace IRaCIS.Application.Services public async Task TestMinIO([FromServices] IOSSService oSSService) { - await oSSService.UploadToOSSAsync("C:\\Users\\Administrator\\Desktop\\TrialSiteUserImportTemplate.xlsx", "myfolder"); + var str= await oSSService.GetSignedUrl("/01000000-c0a8-0242-1c98-08dc7ebcd37d/Read/01000000-c0a8-0242-1c98-08dc7ebcd37d/Visit/1716872544006_1716872544003.png"); - await oSSService.DownLoadFromOSSAsync("/myfolder/TrialSiteUserImportTemplate.xlsx", "C:\\Users\\Administrator\\Desktop\\aws.xlsx"); - return ResponseOutput.Ok(); + //await oSSService.UploadToOSSAsync("C:\\Users\\Administrator\\Desktop\\TrialSiteUserImportTemplate.xlsx", "myfolder"); + + //await oSSService.DownLoadFromOSSAsync("/myfolder/TrialSiteUserImportTemplate.xlsx", "C:\\Users\\Administrator\\Desktop\\aws.xlsx"); + + return ResponseOutput.Ok(str); } [AllowAnonymous]