From b7a803678c6fb5b6d6cf9fb58d87f16218835298 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 30 Apr 2025 09:57:13 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E4=BF=AE=E6=94=B9=E7=A8=BD=E6=9F=A5"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 5064630d1f88d1b36fc864435039768b6e5445ff. --- .../Common/AuditingData.cs | 54 ++++++------------- .../Common/AuditingDto.cs | 14 ----- 2 files changed, 16 insertions(+), 52 deletions(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 19d3e3a38..4b30a1f6d 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -3161,7 +3161,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common TrialReadingCriterionId = t.ReadingQuestionTrial.ReadingQuestionCriterionTrialId, //标准Id Type = t.ReadingQuestionTrial.QuestionName, //病灶类型 t.ReadingQuestionTrial.Unit, - t.QuestionMark, t.ReadingQuestionTrial.CustomUnit, t.DictionaryCode, t.QuestionName, @@ -3171,7 +3170,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common AnswerType = t.Type, }) - .OrderBy(t => t.ShowOrder).ToListAsync(); + .OrderBy(t => t.ShowOrder).ToListAsync(); var trialReadingCriterionId = tableQuesionList.FirstOrDefault()?.TrialReadingCriterionId; @@ -3199,41 +3198,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common entity.RowMark = entity.OrderMark + entity.RowIndex.GetLesionMark(); - var tableAnswerList = tableQuestionAnswerList.Join(tableQuesionList, t => t.TableQuestionId, u => u.QuestionId, (t, u) => - new TableQuestionAnswerDto() - { - //如果问题类型是附件 特殊处理 方便前端解析 - Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer + unitDataList.Where(y => y.Unit == u.Unit).Select(x => x.UnitName).FirstIsNullReturnEmpty(), - //t.Answer /*u.Unit==ValueUnit.Custom? t.Answer+u.CustomUnit:(u.Unit != ValueUnit.None|| u.Unit != null)*/, - QuestionName=u.QuestionName, - QuestionEnName= u.QuestionEnName, - DictionaryCode= u.DictionaryCode, - QuestionMark= u.QuestionMark, - ShowOrder= u.ShowOrder, - } - ).OrderBy(t => t.ShowOrder).ToList(); - - var organ= await _dbContext.OrganInfo.Where(x => x.Id == entity.OrganInfoId).FirstOrDefaultAsync(); - if (organ != null) - { - foreach (var item1 in tableAnswerList) - { - switch (item1.QuestionMark) - { - case QuestionMark.Organ: - item1.Answer = _userInfo.IsEn_Us ? organ.TULOCEN : organ.TULOC; - break; - case QuestionMark.Location: - item1.Answer = _userInfo.IsEn_Us ? organ.TULATEN : organ.TULAT; - break; - case QuestionMark.Part: - item1.Answer = _userInfo.IsEn_Us ? organ.PartEN : organ.Part; - break; - } - } - } - - await InsertInspection(entity, type, x => new InspectionConvertDTO() { @@ -3249,7 +3213,21 @@ namespace IRaCIS.Core.Infra.EFCore.Common { OriginalRowMark = originalRowMark, //TableName = tableName, - QuestionAnswerList = tableAnswerList, + QuestionAnswerList = + + //需要手动添加病灶类型 + tableQuestionAnswerList.Join(tableQuesionList, t => t.TableQuestionId, u => u.QuestionId, (t, u) => + new + { + //如果问题类型是附件 特殊处理 方便前端解析 + Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer + unitDataList.Where(y => y.Unit == u.Unit).Select(x => x.UnitName).FirstIsNullReturnEmpty(), + //t.Answer /*u.Unit==ValueUnit.Custom? t.Answer+u.CustomUnit:(u.Unit != ValueUnit.None|| u.Unit != null)*/, + u.QuestionName, + u.QuestionEnName, + u.DictionaryCode, + u.ShowOrder + } + ).OrderBy(t => t.ShowOrder).ToList() },_userInfo.AuditIdentification); diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingDto.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingDto.cs index 7ffe36b11..8bc888aff 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingDto.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingDto.cs @@ -63,20 +63,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common public string SelectResult { get; set; } } - public class TableQuestionAnswerDto - { - public string Answer { get; set; } - - public string QuestionName { get; set; } - - public string QuestionEnName { get; set; } - - - public string DictionaryCode { get; set; } - public QuestionMark? QuestionMark { get; set; } - - public int ShowOrder { get; set; } - } public class InspectionConvertDTO : DataInspection { ///