From 4c60a32c7e5397113bf103b90aea09876a7fda89 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 7 Jul 2025 16:09:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=A3=80=E6=9F=A5=E6=8A=80?= =?UTF-8?q?=E6=9C=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/TrialService.cs | 2 + .../Common/AuditingData.cs | 42 +++++++++++-------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index e5e3f45fa..ce8be47c4 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -328,6 +328,8 @@ namespace IRaCIS.Core.Application.Service trial.DeclarationTypes = $"|{string.Join('|', updateModel.DeclarationTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|"; trial.AttendedReviewerTypes = $"|{string.Join('|', updateModel.AttendedReviewerTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|"; + trial.UpdateTime = DateTime.Now; + var success = await _trialRepository.SaveChangesAsync(); //维护CRO Sponsor diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 8ce111e68..819d4f7d5 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -169,6 +169,13 @@ namespace IRaCIS.Core.Infra.EFCore.Common var memoryClinicalDataSetNameList = entitys.Where(x => x.Entity.GetType() == typeof(ClinicalDataTrialSet)).Select(t => t.Entity as ClinicalDataTrialSet) .Where(t => t.TrialId == entity.Id && t.IsConfirm).Select(t => _userInfo.IsEn_Us ? t.ClinicalDataSetEnName : t.ClinicalDataSetName).ToList(); + //项目字典TrialDictionary + + var memoryModalityIdList = entitys.Where(x => x.Entity.GetType() == typeof(TrialDictionary)).Select(t => t.Entity as TrialDictionary) + .Where(t => t.TrialId == entity.Id && t.KeyName == StaticData.Modality).Select(t => t.DictionaryId).ToList(); + + var modalityList = _dbContext.Dictionary.Where(t => memoryModalityIdList.Contains(t.Id)).Select(t => _userInfo.IsEn_Us ? t.Value : t.ValueCN).ToList(); + Guid id = entity.Id; var oldentity = await _dbContext.Trial.Where(x => x.Id == id).Select(t => new @@ -210,6 +217,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common ExtraIndentification = extraIdentification, }, new { + ModalityListStr = string.Join(",", modalityList), //TrialDicList = string.Join(",", trialDics) //CalledAE = trialDicomAE?.CalledAE, @@ -224,7 +232,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common ClinicalDataSetNames = string.Join(",", clinicalDataSetNameList.Union(memoryClinicalDataSetNameList).Distinct().OrderBy(t => t)), - }); ; + }); } #region 已修改 @@ -2014,10 +2022,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common } break; - + } - if(_userInfo.RequestUrl== "NoneDicomStudy/deleteNoneDicomStudy"|| _userInfo.RequestUrl == "NoneDicomStudy/deleteNoneDicomStudyFile") + if (_userInfo.RequestUrl == "NoneDicomStudy/deleteNoneDicomStudy" || _userInfo.RequestUrl == "NoneDicomStudy/deleteNoneDicomStudyFile") { isDistinctionInterface = false; @@ -2176,8 +2184,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common SubjectVisitId = noneDicomStudy.SubjectVisitId, SubjectId = noneDicomStudy.SubjectId, ObjectRelationParentId = x.VisitTaskId, - ObjectRelationParentId2=x.NoneDicomStudyId, - ObjectRelationParentId3=x.OriginNoneDicomStudyId, + ObjectRelationParentId2 = x.NoneDicomStudyId, + ObjectRelationParentId3 = x.OriginNoneDicomStudyId, ExtraIndentification = extraIdentification }, new { @@ -2614,9 +2622,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common if (entity.ReadingScope == ReadingScopeEnum.Site) { var siteIds = entity.ReadingPeriodSites.Select(t => t.TrialSiteId).ToList(); - if(siteIds == null || siteIds.Count == 0) + if (siteIds == null || siteIds.Count == 0) { - siteIds= await _dbContext.ReadingPeriodSite.Where(c => c.ReadingPeriodSetId== entity.Id).Select(t => t.TrialSiteId).ToListAsync(); + siteIds = await _dbContext.ReadingPeriodSite.Where(c => c.ReadingPeriodSetId == entity.Id).Select(t => t.TrialSiteId).ToListAsync(); } var nameList = _dbContext.TrialSite.Where(c => c.TrialId == entity.TrialId && siteIds.Contains(c.Id)).Select(t => t.TrialSiteCode).ToList(); @@ -3137,12 +3145,12 @@ namespace IRaCIS.Core.Infra.EFCore.Common } - var mark = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionMark)).Select(x=>x.Entity as ReadingTaskQuestionMark).FirstOrDefault(); + var mark = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionMark)).Select(x => x.Entity as ReadingTaskQuestionMark).FirstOrDefault(); - var markName= string.Empty; + var markName = string.Empty; if (mark != null) { - markName=mark.OrderMarkName; + markName = mark.OrderMarkName; } await InsertInspection(cloneEntity, type, x => new InspectionConvertDTO() @@ -3158,8 +3166,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common }, new { - MarkName= markName, - PicturePath= mark!=null?mark.PicturePath:string.Empty, + MarkName = markName, + PicturePath = mark != null ? mark.PicturePath : string.Empty, QuestionAnswerList = taskQuestionAnswerList.Join(quesionList, t => t.ReadingQuestionTrialId, u => u.QuestionId, @@ -3193,16 +3201,16 @@ namespace IRaCIS.Core.Infra.EFCore.Common var tableQuestionAnswer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)).Select(x => x.Entity as ReadingTableQuestionAnswer) .Where(x => x.RowId == entity.RowId && x.TableQuestionId == entity.TableQuestionId).FirstOrDefault(); - var answer=string.Empty; - + var answer = string.Empty; + if (tableQuestionAnswer != null) { answer = tableQuestionAnswer.Answer; } - var rowMark= await _dbContext.ReadingTableAnswerRowInfo.Where(x => x.Id == entity.RowId).Select(x => x.RowMark).FirstOrDefaultAsync(); + var rowMark = await _dbContext.ReadingTableAnswerRowInfo.Where(x => x.Id == entity.RowId).Select(x => x.RowMark).FirstOrDefaultAsync(); - var tableQuestionName = await _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).Select(x => _userInfo.IsEn_Us? x.QuestionEnName:x.QuestionName).FirstOrDefaultAsync(); + var tableQuestionName = await _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync(); var questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync(); var liverSegmentation = await _dbContext.ReadingTableQuestionAnswer.Where(x => x.RowId == entity.RowId && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.liverSegmentation).Select(x => x.Answer).FirstOrDefaultAsync(); @@ -3219,7 +3227,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common TableQuestionName = tableQuestionName, Answer = answer, LiverSegmentation = liverSegmentation, - },_userInfo.AuditIdentification); + }, _userInfo.AuditIdentification); }