diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs index 77076f59c..ca0cec296 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs @@ -24,7 +24,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate IRepository _visitTaskRepository, IRepository _readingQuestionCriterionTrialRepository, ILogger _logger, - + IRepository _organInfoRepository, IRepository _readingTableQuestionTrialRepository, IRepository _readingTableAnswerRowInfoRepository, IRepository _readingQuestionTrialRepository, @@ -877,7 +877,77 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate return string.Empty; } var answer = string.Empty; - if (answerData.ReadingTableQuestionTrial.TableQuestionType == TableQuestionType.Dictionary) + + var needChangeType = new List() { + QuestionMark.Organ, + QuestionMark.Location, + QuestionMark.Part, + }; + if (needChangeType.Contains(questionMark)) + { + + var rowinfo = _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == taskId && x.ReadingQuestionTrial.LesionType == lesionType && x.RowIndex == rowIndex).FirstOrDefault(); + if (rowinfo != null) + { + var organInfo = _organInfoRepository.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault(); + if (organInfo != null) + { + if (_userInfo.IsEn_Us) + { + switch (questionMark) + { + case QuestionMark.Organ: + answer = organInfo.TULOCEN; + + + break; + case QuestionMark.Location: + if (organInfo.IsCanEditPosition) + { + answer = answerData.Answer; + } + else + { + answer = organInfo.TULATEN; + } + break; + case QuestionMark.Part: + answer = organInfo.PartEN; + break; + + } + + } + else + { + switch (questionMark) + { + case QuestionMark.Organ: + answer = organInfo.TULOC; + break; + case QuestionMark.Location: + if (organInfo.IsCanEditPosition) + { + answer = answerData.Answer; + } + else + { + answer = organInfo.TULAT; + + } + break; + case QuestionMark.Part: + answer = organInfo.Part; + break; + + } + } + } + + } + + } + else if (answerData.ReadingTableQuestionTrial.TableQuestionType == TableQuestionType.Dictionary) { if (_userInfo.IsEn_Us) { @@ -887,7 +957,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { answer = dictionList.Where(x => x.Code == answerData.ReadingTableQuestionTrial.DictionaryCode).SelectMany(x => x.ChildList).Where(x => x.Code == answerData.Answer).Select(x => x.ValueCN).FirstIsNullReturnEmpty(); } - + } else @@ -954,7 +1024,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { picNum += 1; - return $"图{picNum} "; + return $"{_localizer["CriterionCalculateExport_Pic"]}{picNum} "; } else