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/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/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index e9aeb5a17..b030d49ec 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,8 +1627,10 @@ 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"]); + return ResponseOutput.Ok(string.Empty, msg:_localizer["VisitTask_ReapplyStatusConflict"]); } 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.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/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}"; 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"] }; 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] 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 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; } /// /// 是否区分标准