From 144b24f79af72ba98e1f2c784230b48fd3db839d Mon Sep 17 00:00:00 2001 From: "{872297557@qq.com}" <872297557@qq.com> Date: Wed, 21 Dec 2022 14:36:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=A0=87=E5=87=86=E7=A8=BD?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/AuditingData.cs | 77 ++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 1f74fbaa4..8ddd0856c 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -324,6 +324,81 @@ namespace IRaCIS.Core.Infra.EFCore.Common } + //系统器官 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(OrganInfo))) + { + var type = GetEntityAuditOpt(item); + + var entity = item.Entity as OrganInfo; + + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + IsDistinctionInterface = false, + + ObjectRelationParentId= entity.SystemCriterionId + + + }); + } + //项目器官 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(OrganTrialInfo))) + { + var type = GetEntityAuditOpt(item); + + var entity = item.Entity as OrganTrialInfo; + + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + IsDistinctionInterface = false, + + TrialReadingCriterionId = entity.TrialCriterionId, + + ObjectRelationParentId = entity.TrialCriterionId + + }); + } + + //病灶管理 区分项目 还是系统的 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(CriterionNidus))) + { + var type = GetEntityAuditOpt(item); + + var entity = item.Entity as CriterionNidus; + + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + IsDistinctionInterface = false, + + ObjectRelationParentId = entity.CriterionId, + + TrialReadingCriterionId= entity.IsSystemCriterion==false?entity.CriterionId:null + + + }); + } + + //疗效评估 + + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TumorAssessment))) + { + var type = GetEntityAuditOpt(item); + + var entity = item.Entity as TumorAssessment; + + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + IsDistinctionInterface = false, + + ObjectRelationParentId = entity.CriterionId + + }); + } + + #endregion @@ -899,7 +974,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common }, new { - VisitQuestionAnswerList= visitAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.DictionaryCode, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList(), + VisitQuestionAnswerList = visitAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.DictionaryCode, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList(), Reason = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.Reason).FirstOrDefault()?.Answer, AgreeOrNot = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.AgreeOrNot).FirstOrDefault()?.Answer, UpdateType = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.UpdateType).FirstOrDefault()?.Answer,