From 0cb74296c33ad435f7a9ab96ebfaf0425f5a9d6a Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 12 Jun 2024 15:01:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/ReadingCriterion/ReadingQuestionService.cs | 7 ++++--- IRaCIS.Core.Application/Service/Reading/_MapConfig.cs | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs index 0148fdfc3..f4ce30663 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs @@ -7,6 +7,7 @@ using Panda.DynamicWebApi.Attributes; using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Infrastructure; using Newtonsoft.Json; +using IRaCIS.Core.Domain.Models; namespace IRaCIS.Application.Services { @@ -1093,10 +1094,10 @@ namespace IRaCIS.Application.Services await _readingTableQuestionTrialRepository.BatchDeleteNoTrackingAsync(x => x.TrialCriterionId == trialCriterion.Id); - await _readingTableQuestionTrialRepository.AddRangeAsync(needAddTableDatas); - #endregion + await _readingTableQuestionTrialRepository.AddRangeAsync(_mapper.Map>(needAddTableDatas)); + #endregion - } + } } } diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index 96d607f32..e2a260e9f 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -232,7 +232,10 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id)); - CreateMap() + CreateMap(); + + + CreateMap() .ForMember(dest => dest.ReadingQuestionTrialList, opt => opt.Ignore()) .ForMember(d => d.ReadingQuestionCriterionSystemId, u => u.MapFrom(s => s.Id)); ; From ce11788878096cd3194c8e92d1d3b90d9dcbe248 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 12 Jun 2024 15:32:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/AuditingData.cs | 47 +++++++++++++++---- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 8c0bc8bf0..ec1e86542 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -165,11 +165,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common case "configTrialBasicInfo/ConfigTrialBasicInfoConfirm": extraIdentification = $"/{oldentity.IsTrialBasicLogicConfirmed.ToString()}"; break; - case "configTrialBasicInfo/ConfigTrialProcessInfoConfirm": - extraIdentification = $"/{oldentity.IsTrialProcessConfirmed.ToString()}"; - break; + case "configTrialBasicInfo/ConfigTrialProcessInfoConfirm": + extraIdentification = $"/{oldentity.IsTrialProcessConfirmed.ToString()}"; + break; - case "configTrialBasicInfo/ConfigTrialUrgentInfoConfirm": + case "configTrialBasicInfo/ConfigTrialUrgentInfoConfirm": extraIdentification = $"/{oldentity.IsTrialUrgentConfirmed.ToString()}"; break; @@ -245,11 +245,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common //项目流程确认 || _userInfo.RequestUrl == "configTrialBasicInfo/ConfigTrialProcessInfoConfirm" - //确认医学审核问题 - || _userInfo.RequestUrl == "ReadingMedicineQuestion/ConfirmReadingMedicineQuestion" + //确认医学审核问题 + || _userInfo.RequestUrl == "ReadingMedicineQuestion/ConfirmReadingMedicineQuestion" - //阅片单元 保存阅片规则 - || _userInfo.RequestUrl == "TrialConfig/setCriterionReadingInfo" + //阅片单元 保存阅片规则 + || _userInfo.RequestUrl == "TrialConfig/setCriterionReadingInfo" || _userInfo.RequestUrl == "configTrialBasicInfo/TrialReadingInfoSign") { @@ -284,7 +284,32 @@ namespace IRaCIS.Core.Infra.EFCore.Common .Select(t => new { t.AdditionalAssessmentType, t.IsSelected }).ToListAsync(); - await InsertInspection(entity, type, x => new InspectionConvertDTO() + var oncologyAssessIdsStr = string.Empty; + var allList = new List(); + + if (entitys.Any(x => x.Entity.GetType() == typeof(ReadingTrialCriterionDictionary))) + { + allList = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTrialCriterionDictionary)) + .Select(t => t.Entity as ReadingTrialCriterionDictionary).ToList().Where(x=> + x.CriterionId== entity.Id && + x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess).ToList(); + } + else + { + allList=await _dbContext.ReadingTrialCriterionDictionary.Where(x => + x.CriterionId == entity.Id && + x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess).ToListAsync(); + } + + + //查询出字典的Value ValueCN Des 保存 + var diclistOncologyAssess = allList.Select(t => t.DictionaryId).ToList(); + + var selectList = await _dbContext.Dictionary.Where(x => diclistOncologyAssess.Contains(x.Id)).Select(t => t.ValueCN).ToListAsync(); + + oncologyAssessIdsStr = string.Join(",", selectList); + + await InsertInspection(entity, type, x => new InspectionConvertDTO() { IsDistinctionInterface = isDistinctionInterface, @@ -296,7 +321,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common }, new { - EvaluationResultTypes = dicValueList.Count > 0 ? string.Join(",", dicValueList) : string.Empty, + OncologyAssessIdsStr= oncologyAssessIdsStr, + + EvaluationResultTypes = dicValueList.Count > 0 ? string.Join(",", dicValueList) : string.Empty, AdditionalAssessmentTypeList = addtionalAssesementList }); }