From 1af798fb0439990a0982cab7f027adc5a381c29e Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 8 Jul 2026 16:14:22 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E5=BD=B1=E5=83=8Fbug?= 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 09891cf59..8195a1b53 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -2267,7 +2267,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, _ = _taskSeriesRepository.AddAsync(newSeries).Result; - var studyInstanceList = taskInstanceList.Where(t => t.StudyId == taskStudy.Id).ToList(); + var studyInstanceList = taskInstanceList.Where(t => t.StudyId == taskStudy.Id && t.SeriesId == series.Id).ToList(); foreach (var instance in studyInstanceList) { From fd0ea313c28eec84b6dde9b15aed8678f146a5ba Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 8 Jul 2026 17:30:39 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=B0=83=E7=A0=94?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E9=80=80=E5=87=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 6 ++--- .../SiteSurvey/TrialSiteSurveyService.cs | 27 ++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 6ea8aa5ab..4083d5c21 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -17537,17 +17537,17 @@ - ���� + 质疑 - һ���Ժ˲� + 一致性核查 - ���� + 复制 diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index d3d722b04..fd8f853da 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -1137,23 +1137,26 @@ namespace IRaCIS.Core.Application.Contracts await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => userJoinIdList.Contains(t.Id), u => new TrialSiteUserSurvey() { IsJoin = true, SystemUserId = existSysUser.Id }); - //中心调研设置用户角色退出 - var needQuitUserList = item.Where(t => t.IsHistoryUser && t.IsHistoryUserOriginDeleted == false && t.IsHistoryUserDeleted == true).ToList(); - - var queitUserTypeIdList = needQuitUserList.Select(t => t.UserTypeId).ToList(); - - - await _trialSiteUserRoleRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId && queitUserTypeIdList.Contains(t.UserRole.UserTypeId), c => new TrialSiteUserRole() - { - IsDeleted = true, - DeletedTime = DateTime.Now, - }); - + await _trialSiteUserRoleRepository.SaveChangesAsync(); } + + //中心调研设置用户角色退出 + var needQuitUserList = allUserList.Where(t => t.IsHistoryUser && t.IsHistoryUserOriginDeleted == false && t.IsHistoryUserDeleted == true).ToList(); + + var queitUserTypeIdList = needQuitUserList.Select(t => t.UserTypeId).ToList(); + + + await _trialSiteUserRoleRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId && queitUserTypeIdList.Contains(t.UserRole.UserTypeId), c => new TrialSiteUserRole() + { + IsDeleted = true, + DeletedTime = DateTime.Now, + }); + + await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.SPMApproved, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.PMCreatedAndLock, ReviewerUserId = _userInfo.UserRoleId, ReviewerTime = DateTime.Now }); } From 92072d364007e453e75fe06cb922d5c45569f51e Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 9 Jul 2026 09:07:51 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=B0=83=E7=A0=94?= =?UTF-8?q?=E9=80=80=E5=87=BA=E5=90=8E=E6=94=B9=E5=8A=A0=E5=85=A5=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/SiteSurvey/TrialSiteSurveyService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index fd8f853da..4d27ac9aa 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -920,7 +920,7 @@ namespace IRaCIS.Core.Application.Contracts var trialType = _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialType).FirstOrDefault(); - foreach (var item in needGenerateList.GroupBy(t => t.Email)) + foreach (var item in needSendEmailList.GroupBy(t => t.Email)) { var addUserRoleList = item.ToList(); From 83111d3338f6207286c50d6094b93065574681d2 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 9 Jul 2026 09:53:34 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E7=B1=BB=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/CacheHelper.cs | 2 ++ .../Allocation/VisitTaskHelpeService.cs | 30 +++++++++---------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/CacheHelper.cs b/IRaCIS.Core.Application/Helper/CacheHelper.cs index 5d70a0928..e326c22c4 100644 --- a/IRaCIS.Core.Application/Helper/CacheHelper.cs +++ b/IRaCIS.Core.Application/Helper/CacheHelper.cs @@ -8,6 +8,8 @@ public static class CacheKeys //项目缓存 public static string Trial(string trialIdStr) => $"TrialId:{trialIdStr}"; + public static string TrialVisitTaskMaxCode(Guid trialId) => $"TrialVisitTaskMaxCode:{trialId}"; + //检查编号递增锁 public static string TrialStudyMaxCode(Guid trialId) => $"TrialStudyMaxCode:{trialId}"; diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 5a48de460..6afca5061 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -151,7 +151,7 @@ namespace IRaCIS.Core.Application.Service var dbMaxCode = _visitTaskRepository.Where(t => t.TrialId == trialId).Select(t => t.Code).DefaultIfEmpty().Max(); - var cacheMaxCodeInt = _fusionCache.GetOrDefault(CacheKeys.TrialStudyMaxCode(trialId)); + var cacheMaxCodeInt = _fusionCache.GetOrDefault(CacheKeys.TrialVisitTaskMaxCode(trialId)); int currentMaxCodeInt = cacheMaxCodeInt > dbMaxCode ? cacheMaxCodeInt : dbMaxCode; @@ -283,7 +283,7 @@ namespace IRaCIS.Core.Application.Service } - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); @@ -344,7 +344,7 @@ namespace IRaCIS.Core.Application.Service - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); @@ -590,7 +590,7 @@ namespace IRaCIS.Core.Application.Service var dbMaxCode = _visitTaskRepository.Where(t => t.TrialId == trialId).Select(t => t.Code).DefaultIfEmpty().Max(); - var cacheMaxCodeInt = _fusionCache.GetOrDefault(CacheKeys.TrialStudyMaxCode(trialId)); + var cacheMaxCodeInt = _fusionCache.GetOrDefault(CacheKeys.TrialVisitTaskMaxCode(trialId)); int currentMaxCodeInt = cacheMaxCodeInt > dbMaxCode ? cacheMaxCodeInt : dbMaxCode; @@ -747,7 +747,7 @@ namespace IRaCIS.Core.Application.Service } - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); #region 分配 @@ -920,7 +920,7 @@ namespace IRaCIS.Core.Application.Service currentMaxCodeInt = currentMaxCodeInt + 1; - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); } } @@ -992,7 +992,7 @@ namespace IRaCIS.Core.Application.Service currentMaxCodeInt = currentMaxCodeInt + 1; - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); } } @@ -1069,7 +1069,7 @@ namespace IRaCIS.Core.Application.Service currentMaxCodeInt = currentMaxCodeInt + 1; - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); #region 分配 @@ -1197,7 +1197,7 @@ namespace IRaCIS.Core.Application.Service currentMaxCodeInt = currentMaxCodeInt + 1; - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); } } @@ -1386,7 +1386,7 @@ namespace IRaCIS.Core.Application.Service currentMaxCodeInt = currentMaxCodeInt + 1; - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); //} @@ -1491,7 +1491,7 @@ namespace IRaCIS.Core.Application.Service currentMaxCodeInt = currentMaxCodeInt + 1; - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); } break; @@ -1538,7 +1538,7 @@ namespace IRaCIS.Core.Application.Service currentMaxCodeInt = currentMaxCodeInt + 1; - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); } break; @@ -1576,7 +1576,7 @@ namespace IRaCIS.Core.Application.Service await _visitTaskRepository.AddAsync(visitTask); currentMaxCodeInt = currentMaxCodeInt + 1; - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => generateTaskCommand.JudgeVisitTaskIdList.Contains(x.Id), x => new VisitTask() { @@ -1637,7 +1637,7 @@ namespace IRaCIS.Core.Application.Service }); currentMaxCodeInt = currentMaxCodeInt + 1; - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); } } @@ -1707,7 +1707,7 @@ namespace IRaCIS.Core.Application.Service TrialId = originalTaskInfo.TrialId }); - _fusionCache.Set(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); + _fusionCache.Set(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30)); } break; } From b9a79f0658a2473f62592ef74bd8c2dbe8b8757a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 9 Jul 2026 13:48:39 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9A=8F=E6=9C=BA?= =?UTF-8?q?=E9=98=85=E7=89=87=E4=BB=BB=E5=8A=A1=E7=9B=B2=E6=80=81=E5=90=8D?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 6 ++ .../Allocation/VisitTaskHelpeService.cs | 67 +++++++++++++++++-- .../Service/Allocation/VisitTaskService.cs | 15 +++-- .../ImageAndDoc/DownloadAndUploadService.cs | 5 +- .../ReadingMedicalReviewService.cs | 38 ++++++----- 5 files changed, 105 insertions(+), 26 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 4083d5c21..c7b848054 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -337,6 +337,12 @@ + + + 从 NewId 的后 3 个字节(24 位)生成一个 6 位十六进制字符串 + + + 获取GetIsClinicalDataSignTest diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 6afca5061..2296f7b35 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -124,6 +124,45 @@ namespace IRaCIS.Core.Application.Service } + #region 获取随机编号 + /// + /// 从 NewId 的后 3 个字节(24 位)生成一个 6 位十六进制字符串 + /// + /// + public static string GenerateTaskNo() + { + var bytes = NewId.Next().ToByteArray(); + + uint value = + BitConverter.ToUInt32(bytes, 0) + ^ BitConverter.ToUInt32(bytes, 4) + ^ BitConverter.ToUInt32(bytes, 8) + ^ BitConverter.ToUInt32(bytes, 12); + + return (value & 0xFFFFFF).ToString("X6"); + } + + private async Task GetRandomTaskName(Guid trialId, List existList) + { + var taskName = GenerateTaskNo(); + + while (existList.Any(t => t == taskName)) + { + taskName = GenerateTaskNo(); + } + + while (await _visitTaskRepository.AnyAsync(t => t.TaskBlindName == taskName && t.TrialId == trialId)) + { + taskName = GenerateTaskNo(); + } + + existList.Add(taskName); + + return taskName; + } + + #endregion + //基于标准签名 产生任务 (或者手动选择某些访视生成该标准的任务) public async Task BaseCritrionGenerateVisitTask(Guid trialId, Guid confirmedTrialReadingCriterionId, bool? isManualSelectVisit = null, List? subjectVisitIdList = null) @@ -155,7 +194,7 @@ namespace IRaCIS.Core.Application.Service int currentMaxCodeInt = cacheMaxCodeInt > dbMaxCode ? cacheMaxCodeInt : dbMaxCode; - + var randomTaskBlindNameList = new List(); foreach (var subjectGroup in needGenerateVisit.GroupBy(t => t.SubjectId).Select(g => new { SubjectId = g.Key, SubjectVisitList = g.ToList() })) { @@ -185,6 +224,10 @@ namespace IRaCIS.Core.Application.Service } } + else if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.Random) + { + blindTaskName = await GetRandomTaskName(trialId, randomTaskBlindNameList); + } else { blindTaskName = "Timepoint"; @@ -594,7 +637,7 @@ namespace IRaCIS.Core.Application.Service int currentMaxCodeInt = cacheMaxCodeInt > dbMaxCode ? cacheMaxCodeInt : dbMaxCode; - + var randomTaskBlindNameList = new List(); switch (generateTaskCommand.ReadingCategory) @@ -654,6 +697,7 @@ namespace IRaCIS.Core.Application.Service var isFrontTaskNeedSignButNotSign = await _visitTaskRepository.AnyAsync(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.VisitTaskNum < subjectVisit.VisitNum && t.IsNeedClinicalDataSign == true && t.IsClinicalDataSign == false); + var blindTaskName = string.Empty; if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder) @@ -668,6 +712,11 @@ namespace IRaCIS.Core.Application.Service } } + else if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.Random) + { + blindTaskName = await GetRandomTaskName(trialId, randomTaskBlindNameList); + } + //受试者随机 else { blindTaskName = "Timepoint"; @@ -1277,6 +1326,7 @@ namespace IRaCIS.Core.Application.Service var reReadingVisitTask = generateTaskCommand.ReReadingTask; + Guid? subjectVisitId = Guid.Empty; if (reReadingVisitTask.SourceSubjectVisitId == null) @@ -1317,6 +1367,10 @@ namespace IRaCIS.Core.Application.Service //&& t.TrialReadingCriterionId == reReadingVisitTask.TrialReadingCriterionId && t.TaskState == TaskState.Effect // && t.SourceSubjectVisitId == reReadingVisitTask.SourceSubjectVisitId && t.ArmEnum == reReadingVisitTask.ArmEnum && t.DoctorUserId == reReadingVisitTask.DoctorUserId).FirstOrDefault(); + var isRandomReading = trialReadingCriterionConfigList.FirstOrDefault(t => t.TrialReadingCriterionId == reReadingVisitTask.TrialReadingCriterionId)?.IsReadingTaskViewInOrder == ReadingOrder.Random; + + var taskBlindName = isRandomReading ? await GetRandomTaskName(trialId, randomTaskBlindNameList) : reReadingVisitTask.TaskBlindName; + var newTask = await _visitTaskRepository.AddAsync(new VisitTask() { @@ -1325,7 +1379,7 @@ namespace IRaCIS.Core.Application.Service SubjectId = reReadingVisitTask.SubjectId, ArmEnum = reReadingVisitTask.ArmEnum, TaskName = reReadingVisitTask.TaskName, - TaskBlindName = reReadingVisitTask.TaskBlindName, + TaskBlindName = taskBlindName, IsUrgent = reReadingVisitTask.IsAnalysisCreate ? false : subjectVisitUrgentInfo.IsUrgent, TaskUrgentType = reReadingVisitTask.IsAnalysisCreate ? null : taskUrgent, @@ -1548,6 +1602,11 @@ namespace IRaCIS.Core.Application.Service var subjectUser = await _subjectUserRepository.Where(x => x.SubjectId == firstTask.SubjectId && x.ArmEnum == Arm.JudgeArm && x.IsConfirmed && x.TrialReadingCriterionId == firstTask.TrialReadingCriterionId).FirstOrDefaultAsync(); + + var isRandom = trialReadingCriterionConfigList.FirstOrDefault(t => t.TrialReadingCriterionId == firstTask.TrialReadingCriterionId)?.IsReadingTaskViewInOrder == ReadingOrder.Random; + + var blindName = isRandom ? await GetRandomTaskName(trialId, randomTaskBlindNameList) : firstTask.TaskBlindName; + VisitTask visitTask = new VisitTask() { ArmEnum = Arm.JudgeArm, @@ -1564,7 +1623,7 @@ namespace IRaCIS.Core.Application.Service SouceReadModuleId = firstTask.SouceReadModuleId, TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)), TaskState = TaskState.Effect, - TaskBlindName = firstTask.TaskBlindName, + TaskBlindName = blindName, DoctorUserId = subjectUser == null ? null : subjectUser.DoctorUserId, TaskAllocationState = subjectUser == null ? TaskAllocationState.NotAllocate : TaskAllocationState.Allocated, AllocateTime = subjectUser == null ? null : DateTime.Now, diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 8195a1b53..165d7efe5 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -854,7 +854,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, /// /// [HttpPost] - public async Task> GetIRReReadingTaskList(VisitTaskQuery inQuery) + public async Task> > GetIRReReadingTaskList(VisitTaskQuery inQuery) { var visitTaskQueryable = _visitTaskReReadingRepository @@ -889,7 +889,11 @@ public class VisitTaskService(IRepository _visitTaskRepository, var pageList = await visitTaskQueryable.ToPagedListAsync(inQuery, defalutSortArray); - return pageList; + var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId) + .Select(t => new { t.IsReadingTaskViewInOrder }).FirstNotNullAsync(); + + return ResponseOutput.Ok(pageList, criterionInfo); + } @@ -1242,7 +1246,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, /// /// [HttpPost] - public async Task> GetIRHaveReadTaskList(VisitTaskQuery inQuery) + public async Task>> GetIRHaveReadTaskList(VisitTaskQuery inQuery) { @@ -1270,7 +1274,10 @@ public class VisitTaskService(IRepository _visitTaskRepository, var pageList = await visitTaskQueryable.ToPagedListAsync(inQuery, defalutSortArray); - return pageList; + var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId) + .Select(t => new { t.IsReadingTaskViewInOrder }).FirstNotNullAsync(); + + return ResponseOutput.Ok(pageList, criterionInfo); } diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index a08d0240f..7bb6f15f3 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -58,8 +58,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc { //subject 随机阅片 或者无序 有上传 才处理任务编号 if (_visitTaskRepository.Any(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && - (t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.SubjectRandom || - (t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.Random && t.TrialReadingCriterion.ImageDownloadEnum != ReadingImageDownload.None)))) + (t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.SubjectRandom + //||(t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.Random && t.TrialReadingCriterion.ImageDownloadEnum != ReadingImageDownload.None) + ))) { //找到 非一致性分析,未签名,状态正常的 并且任务名称是TimePoint的 任务 var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs index ccf72d147..3ce104226 100644 --- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs @@ -246,9 +246,9 @@ namespace IRaCIS.Core.Application.Service var visitTaskAnswer = await _readingTaskQuestionAnswerRepository.Where(x => taskIds.Contains(x.VisitTaskId) && x.ReadingQuestionTrial.IsJudgeQuestion).Select(x => new JudgeQuestionAnswerInfo { Answer = x.Answer, - Unit=x.ReadingQuestionTrial.Unit, - ValueType=x.ReadingQuestionTrial.ValueType, - CustomUnit=x.ReadingQuestionTrial.CustomUnit, + Unit = x.ReadingQuestionTrial.Unit, + ValueType = x.ReadingQuestionTrial.ValueType, + CustomUnit = x.ReadingQuestionTrial.CustomUnit, VisitTaskId = x.VisitTaskId, DictionaryCode = x.ReadingQuestionTrial.DictionaryCode, ShowOrder = x.ReadingQuestionTrial.ShowOrder, @@ -643,8 +643,8 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task TestGetJointMedicalReviewDialog(Guid id) { - var dialog = await _readingMedicalReviewDialogRepository.Where(x => x.Id == id) - .ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(); + var dialog = await _readingMedicalReviewDialogRepository.Where(x => x.Id == id) + .ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(); Dictionary i18NKeys = new Dictionary() @@ -661,11 +661,11 @@ namespace IRaCIS.Core.Application.Service }; var i18Values = i18NKeys.Select(x => x.Value).ToList(); - var i18nList=await _internationalizationRepository.Where(x => i18Values.Contains(x.Code)) - .Select(x => new + var i18nList = await _internationalizationRepository.Where(x => i18Values.Contains(x.Code)) + .Select(x => new { - Code= x.Code, - Value= _userInfo.IsEn_Us?x.Value:x.ValueCN + Code = x.Code, + Value = _userInfo.IsEn_Us ? x.Value : x.ValueCN }).ToListAsync(); List dictionaryCodeList = new List() @@ -676,16 +676,16 @@ namespace IRaCIS.Core.Application.Service "YesOrNo", }; - var dictionadParents=await _dictionaryRepository.Where(x=> dictionaryCodeList.Contains(x.Parent.Code)) + var dictionadParents = await _dictionaryRepository.Where(x => dictionaryCodeList.Contains(x.Parent.Code)) .Select(x => new { ParentCode = x.Parent.Code, - Code=x.Code, + Code = x.Code, Value = _userInfo.IsEn_Us ? x.Value : x.ValueCN }).ToListAsync(); JointMedicalReviewI18n i18N = new JointMedicalReviewI18n() { }; - foreach (var kv in i18NKeys) + foreach (var kv in i18NKeys) { PropertyInfo? pi = i18N.GetType().GetProperty(kv.Key); if (pi != null && pi.CanWrite) @@ -706,7 +706,7 @@ namespace IRaCIS.Core.Application.Service } } - return await JointMedicalReviewDialog(dialog,i18N); + return await JointMedicalReviewDialog(dialog, i18N); @@ -910,7 +910,7 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task GetNextIRMedicalFeedback(GetNextIRMedicalFeedbackInDto inDto) { - var list = await GetIRMedicalFeedbackList(new GetIRMedicalFeedbackListInDto() + var responseOutput = await GetIRMedicalFeedbackList(new GetIRMedicalFeedbackListInDto() { TrialId = inDto.TrialId, TrialReadingCriterionId = inDto.TrialReadingCriterionId, @@ -919,6 +919,8 @@ namespace IRaCIS.Core.Application.Service PageSize = 99999, }); + var list = responseOutput.Data; + var index = list.CurrentPageData.ToList().FindIndex(x => x.Id == inDto.TaskMedicalReviewId); var result = new GetIRMedicalFeedbackListOutDto() { }; @@ -949,7 +951,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - public async Task> GetIRMedicalFeedbackList(GetIRMedicalFeedbackListInDto inDto) + public async Task>> GetIRMedicalFeedbackList(GetIRMedicalFeedbackListInDto inDto) { var taskMedicalReviewquery = _taskMedicalReviewRepository.Where(x => x.TrialId == inDto.TrialId).Include(x => x.VisitTask) .Where(x => x.VisitTask.DoctorUserId == _userInfo.UserRoleId) @@ -1004,7 +1006,11 @@ namespace IRaCIS.Core.Application.Service var result = await taskMedicalReviewquery.ToPagedListAsync(inDto, nameof(GetIRMedicalFeedbackListOutDto.AuditState)); - return result; + var criterionInfo = await _taskMedicalReviewRepository.Where(t => t.Id == inDto.TrialReadingCriterionId) + .Select(t => new { t.VisitTask.TrialReadingCriterion.IsReadingTaskViewInOrder }).FirstNotNullAsync(); + + return ResponseOutput.Ok(result, criterionInfo); + } } } From 9abd8e2c54977b98f2c3e2f348f86971e7bb98d9 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 9 Jul 2026 14:00:03 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E5=8C=BB=E5=AD=A6=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E4=BB=93=E5=82=A8=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/MedicalAudit/ReadingMedicalReviewService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs index 3ce104226..f5d8437de 100644 --- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs @@ -1006,8 +1006,8 @@ namespace IRaCIS.Core.Application.Service var result = await taskMedicalReviewquery.ToPagedListAsync(inDto, nameof(GetIRMedicalFeedbackListOutDto.AuditState)); - var criterionInfo = await _taskMedicalReviewRepository.Where(t => t.Id == inDto.TrialReadingCriterionId) - .Select(t => new { t.VisitTask.TrialReadingCriterion.IsReadingTaskViewInOrder }).FirstNotNullAsync(); + var criterionInfo = await _readingQuestionCriterionTrial.Where(t => t.Id == inDto.TrialReadingCriterionId) + .Select(t => new { t.IsReadingTaskViewInOrder }).FirstNotNullAsync(); return ResponseOutput.Ok(result, criterionInfo); From 35c495f8a8fd6fc331567206952a45278929a261 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 9 Jul 2026 16:22:54 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs index f5d8437de..03bd134b2 100644 --- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs @@ -956,7 +956,7 @@ namespace IRaCIS.Core.Application.Service var taskMedicalReviewquery = _taskMedicalReviewRepository.Where(x => x.TrialId == inDto.TrialId).Include(x => x.VisitTask) .Where(x => x.VisitTask.DoctorUserId == _userInfo.UserRoleId) .Where(x => x.IsHaveQuestion) - .WhereIf(!inDto.TaskBlindName.IsNullOrEmpty(), x => x.VisitTask.TaskBlindName == inDto.TaskBlindName) + .WhereIf(!inDto.TaskBlindName.IsNullOrEmpty(), x => x.VisitTask.TaskBlindName.Contains(inDto.TaskBlindName)) .WhereIf(inDto.SubjectId != null, x => x.VisitTask.SubjectId == inDto.SubjectId!) .WhereIf(inDto.IsUrgent != null, x => x.VisitTask.IsUrgent == inDto.IsUrgent!) .WhereIf(inDto.AuditState != null, x => x.AuditState == inDto.AuditState!) From a96945201f2567538395caab3cb3aeee1ce308c6 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 9 Jul 2026 16:27:05 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E7=9B=B2=E6=80=81=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/DTO/VisitTaskViewModel.cs | 2 ++ .../Service/Allocation/VisitTaskService.cs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 4965a065e..60851d6ed 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -439,6 +439,8 @@ namespace IRaCIS.Core.Application.ViewModel public string TaskName { get; set; } = String.Empty; + public string TaskBlindName { get; set; } = String.Empty; + public Guid? DoctorUserId { get; set; } public ReadingCategory? ReadingCategory { get; set; } diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 165d7efe5..5d6242dad 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -854,7 +854,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, /// /// [HttpPost] - public async Task> > GetIRReReadingTaskList(VisitTaskQuery inQuery) + public async Task>> GetIRReReadingTaskList(VisitTaskQuery inQuery) { var visitTaskQueryable = _visitTaskReReadingRepository @@ -878,6 +878,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, .WhereIf(!string.IsNullOrEmpty(inQuery.TrialSiteCode), t => (t.OriginalReReadingTask.BlindTrialSiteCode.Contains(inQuery.TrialSiteCode!) && t.OriginalReReadingTask.IsAnalysisCreate) || (t.OriginalReReadingTask.Subject.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode!) && t.OriginalReReadingTask.IsAnalysisCreate == false)) .WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.OriginalReReadingTask.TaskName.Contains(inQuery.TaskName) || t.NewReReadingTask.TaskBlindName.Contains(inQuery.TaskName)) + .WhereIf(!string.IsNullOrEmpty(inQuery.TaskBlindName), t => t.NewReReadingTask.TaskBlindName.Contains(inQuery.TaskBlindName)) .WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => (t.OriginalReReadingTask.Subject.Code.Contains(inQuery.SubjectCode) && t.OriginalReReadingTask.IsAnalysisCreate == false) || (t.OriginalReReadingTask.BlindSubjectCode.Contains(inQuery.SubjectCode) && t.OriginalReReadingTask.IsAnalysisCreate)) .WhereIf(inQuery.BeginAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime > inQuery.BeginAllocateDate) .WhereIf(inQuery.EndAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime < inQuery.EndAllocateDate!.Value.AddDays(1)) @@ -1265,6 +1266,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, .WhereIf(inQuery.TaskState != null, t => t.TaskState == inQuery.TaskState) .WhereIf(!string.IsNullOrEmpty(inQuery.TrialSiteCode), t => (t.BlindTrialSiteCode.Contains(inQuery.TrialSiteCode!) && t.IsAnalysisCreate) || (t.Subject.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode!) && t.IsAnalysisCreate == false)) .WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.TaskName.Contains(inQuery.TaskName) || t.TaskBlindName.Contains(inQuery.TaskName)) + .WhereIf(!string.IsNullOrEmpty(inQuery.TaskBlindName), t => t.TaskBlindName.Contains(inQuery.TaskBlindName)) .WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => (t.Subject.Code.Contains(inQuery.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(inQuery.SubjectCode) && t.IsAnalysisCreate)) .WhereIf(inQuery.BeginAllocateDate != null, t => t.AllocateTime > inQuery.BeginAllocateDate) .WhereIf(inQuery.EndAllocateDate != null, t => t.AllocateTime < inQuery.EndAllocateDate!.Value.AddDays(1)) From 93410b4075aba92755274a6b4f772f686c5dcb74 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 10 Jul 2026 09:45:20 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A01s=E5=BB=B6=E6=97=B6?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=83=AD=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Common/DeployConfigService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Common/DeployConfigService.cs b/IRaCIS.Core.Application/Service/Common/DeployConfigService.cs index e9634987e..f6e85f0b3 100644 --- a/IRaCIS.Core.Application/Service/Common/DeployConfigService.cs +++ b/IRaCIS.Core.Application/Service/Common/DeployConfigService.cs @@ -73,6 +73,8 @@ public class DeployConfigService(IMapper _mapper, IDistributedLockProvider _dist // 重新写入appsettings.json string result = obj.ToString(); System.IO.File.WriteAllText(path, result); + + await Task.Delay(1000); } @@ -139,6 +141,8 @@ public class DeployConfigService(IMapper _mapper, IDistributedLockProvider _dist string result = obj.ToString(); System.IO.File.WriteAllText(path, result); + await Task.Delay(1000); + } return ResponseOutput.Ok(); From 503f99ccbe0e5e6990abc79f631e2f5787d4d3c4 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 10 Jul 2026 10:39:43 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E8=AF=BB=E5=8F=96=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/appsettings.Test_IRC.json | 108 ++---------------- .../Service/Common/DeployConfigService.cs | 37 ++++-- 2 files changed, 42 insertions(+), 103 deletions(-) diff --git a/IRaCIS.Core.API/appsettings.Test_IRC.json b/IRaCIS.Core.API/appsettings.Test_IRC.json index ce43480c8..50a4c7090 100644 --- a/IRaCIS.Core.API/appsettings.Test_IRC.json +++ b/IRaCIS.Core.API/appsettings.Test_IRC.json @@ -1,32 +1,28 @@ { - // 日志信息 "Logging": { - // 日志等级 "LogLevel": { - // 默认日志等级 "Default": "Information", - // 调试日志等级 "Microsoft": "Warning", - // ASP.NET Core 日志等级 "Microsoft.Hosting.Lifetime": "Information" } }, - // 数据库链接字符串 "ConnectionStrings": { - // 本地数据库链接字符串 "RemoteNew": "Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true", - // Hangfire 定时任务数据库链接字符串 "Hangfire": "Server=106.14.89.110,1435;Database=Test_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true" }, "WeComNoticeConfig": { "IsOpenWeComNotice": true, - "WebhookUrl": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=4355b98e-1e72-4678-8dfb-2fc6ad0bf449", //4355b98e-1e72-4678-8dfb-2fc6ad0bf449 //cdd97aab-d256-4f07-9145-a0a2b1555322 - "APINoticeUserList": [ "u", "wait..." ], - "VueNoticeUserList": [ "wangxiaoshuang", "6b7717a31647293621b97b96f74e6f3d" ] + "WebhookUrl": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=4355b98e-1e72-4678-8dfb-2fc6ad0bf449", + "APINoticeUserList": [ + "u", + "wait..." + ], + "VueNoticeUserList": [ + "wangxiaoshuang", + "6b7717a31647293621b97b96f74e6f3d" + ] }, - // 对象存储服务配置 "ObjectStoreService": { - // 使用的对象存储服务类型 "ObjectStoreUse": "AliyunOSS", "IsOpenStoreSync": true, "ApiDeployRegion": "CN", @@ -48,168 +44,88 @@ "IsOpenSync": true } ], - // 阿里云对象存储服务的配置 "AliyunOSS": { - // 阿里云 OSS 的 Region ID "RegionId": "cn-shanghai", - // 阿里云 OSS 的内部访问端点 "InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com", - // 阿里云 OSS 的外部访问端点 "EndPoint": "https://oss-cn-shanghai.aliyuncs.com", - // 阿里云 OSS 的访问密钥 ID "AccessKeyId": "LTAI5tRRZehUp2V9pyTPtAJm", - // 阿里云 OSS 的访问密钥 Secret "AccessKeySecret": "FLizxkHsMm4CGYHtkV8E3PNJJZU7oV", - // 阿里云 OSS 的角色 ARN "RoleArn": "acs:ram::1899121822495495:role/dev-oss-access", - // 阿里云 OSS 的Bucket名称 "BucketName": "zy-irc-test-store", - // 阿里云 OSS 的访问端点 "ViewEndpoint": "https://zy-irc-test-dev-cache.oss-cn-shanghai.aliyuncs.com", - // 阿里云 OSS 的预览端点 "Region": "oss-cn-shanghai", - // 阿里云 OSS 的临时访问凭证有效时间(秒) "DurationSeconds": 7200, - // 阿里云 OSS 的预览端点 "PreviewEndpoint": "https://test-oss.test.extimaging.com" }, - // MinIO 对象存储服务的配置 "MinIO": { - // MinIO 的访问端点 "EndPoint": "hir-oss.test.extimaging.com", - // MinIO 的端口 "Port": "443", - // 是否使用 SSL "UseSSL": true, - // MinIO 的角色 ARN "AccessKey": "fbStsVYCIPKHQneeqMwD", - // MinIO 的访问密钥 "SecretKey": "TzgvyA3zGXMUnpilJNUlyMYHfosl1hBMl6lxPmjy", - // MinIO 的BucketName "BucketName": "irc-test", - // MinIO 的访问端点 "ViewEndpoint": "https://hir-oss.test.extimaging.com/irc-test" }, - // AWS S3 对象存储服务的配置 "AWS": { - // AWS S3 的Region "Region": "us-east-1", - // AWS S3 的内部访问端点 "EndPoint": "s3.us-east-1.amazonaws.com", - // 是否使用 SSL "UseSSL": true, - // AWS S3 的角色 ARN "RoleArn": "arn:aws:iam::471112624751:role/uat_s3_access", - // AWS S3 的访问密钥 ID "AccessKeyId": "AKIAW3MEAFJX7IPXISP4", - // AWS S3 的访问密钥 Secret "SecretAccessKey": "Pgrg3le5jPxZQ7MR1yYNS30J0XRyJeKVyIIjElXc", - // AWS S3 的Bucket名称 "BucketName": "ei-med-s3-lili-uat-store", - // AWS S3 的访问端点 "ViewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com", - // AWS S3 的持续数秒 "DurationSeconds": 7200 } }, - // 系统配置 "BasicSystemConfig": { - // 启用质控风险控制功能 "QCRiskControl": true, - // 打开用户复杂密码 "OpenUserComplexPassword": false, - // 是否在开始工作前强制签署电子知情同意书 "OpenSignDocumentBeforeWork": false, - // 是否启用登录失败次数限制(防暴力破解) "OpenLoginLimit": false, - // 连续登录失败多少次后触发锁定 "LoginMaxFailCount": 5, - // 触发锁定后账号锁定时长(分钟) "LoginFailLockMinutes": 1, - // 无操作自动登出的超时时间(分钟) "AutoLoginOutMinutes": 10, - // 是否启用多因子登录认证(MFA) "OpenLoginMFA": false, - // 连续阅片的最长工作时间(分钟),超时后强制休息 "ContinuousReadingTimeMin": 120, - // 强制休息时长(分钟) "ReadingRestTimeMin": 10, - // 是否强制用户定期修改密码 "IsNeedChangePassWord": true, - // 密码有效期(天),到期后必须修改 "ChangePassWordDays": 90, - // 模板类型 1 Elevate(LiLi) 2 Extensive(展影) "TemplateType": 2, - // 是否打开项目关联删除 - "OpenTrialRelationDelete": true, - // 转换PDF服务配置 + "OpenTrialRelationDelete": false, "ThirdPdfUrl": "http://106.14.89.110:30088/api/v1/convert/file/pdf", - //MFA免验证发送天数 "UserMFAVerifyMinutes": 1440 }, - // 邮件服务配置(用于系统通知、找回密码、错误报警等) "SystemEmailSendConfig": { - - // 企业邮箱SMTP服务器地址 "Host": "smtp.qiye.aliyun.com", - // SMTP端口 "Port": 465, - "Imap": "imap.qiye.aliyun.com", "ImapPort": 993, - - // 发件人邮箱地址 "FromEmail": "test@extimaging.com", - // 发件人显示名称 "FromName": "Test EIC Imaging System", - // SMTP授权码 "AuthorizationCode": "SHzyyl2021", - // 系统对外访问地址 "SiteUrl": "http://irc.test.extimaging.com/login", - - - // 系统简称 - 一致性核查使用 "SystemShortName": "IRC", - // 组织英文名称-添加用户默认值 "OrganizationName": "ExtImaging", - // 组织中文名称 "OrganizationNameCN": "ExtImaging", - "PlatformName": "EICS", "PlatformNameCN": "展影云平台", - // 公司英文全称 "CompanyName": "Extensive Imaging", - // 公司中文全称 "CompanyNameCN": "上海展影医疗科技有限公司", - // 公司英文简称 "CompanyShortName": "Extensive Imaging", - // 公司中文简称 "CompanyShortNameCN": "展影医疗", - - // 是否为国际版环境 方便前端区分,用于区分lili 还是irc 做一些事情 "IsEnv_US": false, - // 邮箱格式校验正则表达式 "EmailRegexStr": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", - - //后端周期性邮件默认语言 "CronEmailDefaultCulture": "zh-CN" }, - // PACS 连接配置 "SystemPacsConfig": { - // PACS服务器端口 "Port": "11113", - // PACS服务器IP地址 "IP": "106.14.89.110" }, - // 重复请求配置 "RequestDuplicationOptions": { - // 是否启用重复请求检测 "IsEnabled": true, - // 重复请求时间窗口(毫秒) "DuplicationWindowMs": 500, - // 缓存请求时间(秒) "CacheTimeSeconds": 5, - "ExcludedPaths": [ - ] + "ExcludedPaths": [] } -} +} \ No newline at end of file diff --git a/IRaCIS.Core.Application/Service/Common/DeployConfigService.cs b/IRaCIS.Core.Application/Service/Common/DeployConfigService.cs index f6e85f0b3..28f875901 100644 --- a/IRaCIS.Core.Application/Service/Common/DeployConfigService.cs +++ b/IRaCIS.Core.Application/Service/Common/DeployConfigService.cs @@ -4,6 +4,7 @@ using Medallion.Threading; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; using Newtonsoft.Json.Linq; @@ -16,7 +17,7 @@ using System.Threading.Tasks; namespace IRaCIS.Core.Application.Service.Common; [ApiExplorerSettings(GroupName = "Common")] -public class DeployConfigService(IMapper _mapper, IDistributedLockProvider _distributedLockProvider, IUserInfo _userInfo, IWebHostEnvironment _hostEnvironment, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService +public class DeployConfigService(IMapper _mapper, IConfiguration _configuration, IDistributedLockProvider _distributedLockProvider, IUserInfo _userInfo, IWebHostEnvironment _hostEnvironment, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService { /// @@ -26,7 +27,18 @@ public class DeployConfigService(IMapper _mapper, IDistributedLockProvider _dist /// public async Task GetSystemBasicConfigInfo([FromServices] IOptionsMonitor options) { - return options.CurrentValue; + //var config = _configuration.GetSection("BasicSystemConfig").Get(); + //return config; + + + var path = Path.Combine( _hostEnvironment.ContentRootPath,$"appsettings.{_hostEnvironment.EnvironmentName}.json"); + + var json = File.ReadAllText(path); + + var obj = JObject.Parse(json); + + return obj["BasicSystemConfig"]!.ToObject()!; + } /// @@ -37,7 +49,8 @@ public class DeployConfigService(IMapper _mapper, IDistributedLockProvider _dist [HttpPost] public async Task UpdateSystemBasicConfig(ServiceVerifyConfigOption basicSystemConfigOption) { - var path = $"appsettings.{_hostEnvironment.EnvironmentName}.json"; + //var path = $"appsettings.{_hostEnvironment.EnvironmentName}.json"; + var path = Path.Combine(_hostEnvironment.ContentRootPath, $"appsettings.{_hostEnvironment.EnvironmentName}.json"); var @lock = _distributedLockProvider.CreateLock("WriteConfigFile"); @@ -74,7 +87,6 @@ public class DeployConfigService(IMapper _mapper, IDistributedLockProvider _dist string result = obj.ToString(); System.IO.File.WriteAllText(path, result); - await Task.Delay(1000); } @@ -88,7 +100,18 @@ public class DeployConfigService(IMapper _mapper, IDistributedLockProvider _dist /// public async Task GetEmailConfigInfo([FromServices] IOptionsMonitor options) { - return options.CurrentValue; + //两种方式都有问题 + //var config = _configuration.GetSection("BasicSystemConfig").Get(); + //return config; + //return options.CurrentValue; + + var path = Path.Combine(_hostEnvironment.ContentRootPath, $"appsettings.{_hostEnvironment.EnvironmentName}.json"); + + var json = File.ReadAllText(path); + + var obj = JObject.Parse(json); + + return obj["SystemEmailSendConfig"]!.ToObject()!; } @@ -100,7 +123,8 @@ public class DeployConfigService(IMapper _mapper, IDistributedLockProvider _dist [HttpPost] public async Task UpdateSystemEmailConfig(SystemEmailSendConfig emailConfig) { - var path = $"appsettings.{_hostEnvironment.EnvironmentName}.json"; + var path = Path.Combine(_hostEnvironment.ContentRootPath,$"appsettings.{_hostEnvironment.EnvironmentName}.json"); + //var path = $"appsettings.{_hostEnvironment.EnvironmentName}.json"; var @lock = _distributedLockProvider.CreateLock("WriteConfigFile"); @@ -141,7 +165,6 @@ public class DeployConfigService(IMapper _mapper, IDistributedLockProvider _dist string result = obj.ToString(); System.IO.File.WriteAllText(path, result); - await Task.Delay(1000); } From 4ca67212aa77de455b981362289a0737f382bfac Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 10 Jul 2026 11:13:42 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E5=8F=8C=E9=87=8D=E9=98=85=E7=89=87?= =?UTF-8?q?=EF=BC=8C=E7=9B=B2=E6=80=81=E5=90=8D=E7=A7=B0=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/VisitTaskHelpeService.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 2296f7b35..7435bd806 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -300,13 +300,14 @@ namespace IRaCIS.Core.Application.Service { currentMaxCodeInt = currentMaxCodeInt + 1; + var blindTaskName2= await GetRandomTaskName(trialId, randomTaskBlindNameList); task2 = await _visitTaskRepository.AddAsync(new VisitTask() { TrialId = trialId, SubjectId = subjectVisit.SubjectId, IsUrgent = subjectVisit.IsUrgent, - TaskBlindName = blindTaskName, + TaskBlindName = blindTaskName2, TaskName = subjectVisit.VisitName, TaskUrgentType = taskUrgentType, IsCanEditUrgentState = isCanEditUrgentState, @@ -770,11 +771,14 @@ namespace IRaCIS.Core.Application.Service if (!existCurrentVisitTaskList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2)) { currentMaxCodeInt = currentMaxCodeInt + 1; + + var blindTaskName2 = await GetRandomTaskName(trialId, randomTaskBlindNameList); + task2 = await _visitTaskRepository.AddAsync(new VisitTask() { TrialId = trialId, SubjectId = subjectVisit.SubjectId, - TaskBlindName = blindTaskName, + TaskBlindName = blindTaskName2, TaskName = subjectVisit.VisitName, IsUrgent = subjectVisit.IsUrgent, From 2be6757e236dbb8d2c35da68b6680c89a4f11ffb Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 10 Jul 2026 14:26:35 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E7=9B=B2=E6=80=81=E5=90=8D=E7=A7=B0?= =?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/VisitTaskHelpeService.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 7435bd806..0ee98e373 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -212,6 +212,8 @@ namespace IRaCIS.Core.Application.Service var blindTaskName = string.Empty; + var isRandom = false; + if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder) { if (visitNumList.IndexOf(subjectVisit.VisitNum) == 0 && subjectVisit.VisitNum == 0) @@ -227,6 +229,8 @@ namespace IRaCIS.Core.Application.Service else if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.Random) { blindTaskName = await GetRandomTaskName(trialId, randomTaskBlindNameList); + + isRandom = true; } else { @@ -300,7 +304,8 @@ namespace IRaCIS.Core.Application.Service { currentMaxCodeInt = currentMaxCodeInt + 1; - var blindTaskName2= await GetRandomTaskName(trialId, randomTaskBlindNameList); + + var blindTaskName2 = isRandom ? await GetRandomTaskName(trialId, randomTaskBlindNameList) : blindTaskName; task2 = await _visitTaskRepository.AddAsync(new VisitTask() { @@ -700,6 +705,7 @@ namespace IRaCIS.Core.Application.Service var blindTaskName = string.Empty; + var isFullRandom = false; if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder) { @@ -716,6 +722,7 @@ namespace IRaCIS.Core.Application.Service else if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.Random) { blindTaskName = await GetRandomTaskName(trialId, randomTaskBlindNameList); + isFullRandom = true; } //受试者随机 else @@ -772,7 +779,8 @@ namespace IRaCIS.Core.Application.Service { currentMaxCodeInt = currentMaxCodeInt + 1; - var blindTaskName2 = await GetRandomTaskName(trialId, randomTaskBlindNameList); + var blindTaskName2 = isFullRandom ? await GetRandomTaskName(trialId, randomTaskBlindNameList) : blindTaskName; + task2 = await _visitTaskRepository.AddAsync(new VisitTask() { @@ -1607,9 +1615,9 @@ namespace IRaCIS.Core.Application.Service var subjectUser = await _subjectUserRepository.Where(x => x.SubjectId == firstTask.SubjectId && x.ArmEnum == Arm.JudgeArm && x.IsConfirmed && x.TrialReadingCriterionId == firstTask.TrialReadingCriterionId).FirstOrDefaultAsync(); - var isRandom = trialReadingCriterionConfigList.FirstOrDefault(t => t.TrialReadingCriterionId == firstTask.TrialReadingCriterionId)?.IsReadingTaskViewInOrder == ReadingOrder.Random; + var isRandom = trialReadingCriterionConfigList.FirstOrDefault(t => t.TrialReadingCriterionId == firstTask.TrialReadingCriterionId)?.IsReadingTaskViewInOrder == ReadingOrder.Random; - var blindName = isRandom ? await GetRandomTaskName(trialId, randomTaskBlindNameList) : firstTask.TaskBlindName; + var blindName = isRandom ? await GetRandomTaskName(trialId, randomTaskBlindNameList) : firstTask.TaskBlindName; VisitTask visitTask = new VisitTask() {