修改翻译字典名
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
f518b44007
commit
cf9d42dc49
|
@ -919,7 +919,7 @@
|
||||||
<param name="trialReadingCriterionId"></param>
|
<param name="trialReadingCriterionId"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetCommonEvaluationList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetCommonEvaluationList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||||
<summary>
|
<summary>
|
||||||
阅片结果表、阅片结果明细,评估病灶明细表, 裁判明细表导出,条件通过 ReadingExportType ( 1,2,3,4)区分
|
阅片结果表、阅片结果明细,评估病灶明细表, 裁判明细表导出,条件通过 ReadingExportType ( 1,2,3,4)区分
|
||||||
</summary>
|
</summary>
|
||||||
|
|
|
@ -2167,8 +2167,12 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
public async Task<IActionResult> GetCommonEvaluationList_Export(VisitTaskQuery inQuery,
|
public async Task<IActionResult> GetCommonEvaluationList_Export(VisitTaskQuery inQuery,
|
||||||
[FromServices] IRepository<CommonDocument> _commonDocumentRepository,
|
[FromServices] IRepository<CommonDocument> _commonDocumentRepository,
|
||||||
[FromServices] IDictionaryService _dictionaryService,
|
[FromServices] IDictionaryService _dictionaryService,
|
||||||
|
[FromServices] IRepository<ReadingQuestionTrial> _trialReadingQuestionRepository,
|
||||||
|
[FromServices] IRepository<ReadingTableQuestionTrial> _trialReadingTableQuestionRepository,
|
||||||
[FromServices] IRepository<Trial> _trialRepository)
|
[FromServices] IRepository<Trial> _trialRepository)
|
||||||
{
|
{
|
||||||
|
var trialId = inQuery.TrialId;
|
||||||
|
var trialReadingCriterionId = inQuery.TrialReadingCriterionId;
|
||||||
//每次查询必须是单标准的
|
//每次查询必须是单标准的
|
||||||
var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionGroup, t.IsGlobalReading, t.IsArbitrationReading, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync();
|
var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionGroup, t.IsGlobalReading, t.IsArbitrationReading, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync();
|
||||||
|
|
||||||
|
@ -2433,8 +2437,8 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
//处理裁判标记
|
//处理裁判标记
|
||||||
list = DealJudgeMark(criterion.ArbitrationRule, criterion.IsGlobalReading, list);
|
list = DealJudgeMark(criterion.ArbitrationRule, criterion.IsGlobalReading, list);
|
||||||
|
|
||||||
//合并之前获取翻译的字典名,否则有的没法翻译
|
////合并之前获取翻译的字典名,否则有的没法翻译
|
||||||
var translateDicNameList = list.SelectMany(t => t.QuestionAnswerList).Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Distinct().ToList();
|
//var translateDicNameList = list.SelectMany(t => t.QuestionAnswerList).Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Distinct().ToList();
|
||||||
|
|
||||||
|
|
||||||
if (inQuery.ReadingExportType != ExportResult.CDISC)
|
if (inQuery.ReadingExportType != ExportResult.CDISC)
|
||||||
|
@ -2520,13 +2524,43 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t => t.ReadingCategory != ReadingCategory.Global).ToList(), _userInfo.TimeZoneId);
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t => t.ReadingCategory != ReadingCategory.Global).ToList(), _userInfo.TimeZoneId);
|
||||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||||
|
|
||||||
|
|
||||||
|
#region 问题名称字典 列名
|
||||||
|
|
||||||
var dynamicColumnConfig = new DynamicColumnConfig();
|
var dynamicColumnConfig = new DynamicColumnConfig();
|
||||||
|
|
||||||
|
//查询配置的问题名称,不是从答案表中连接取问题名称,因为目前有些保存,有些问题,虽然配置了,但是没填,导致导表有些配置的列没出来
|
||||||
|
var trialConfigQuestionList = _trialReadingQuestionRepository.Where(t => t.TrialId == trialId && t.ReadingQuestionCriterionTrialId == trialReadingCriterionId).Where(t => t.ExportResultStr.Contains(((int)inQuery.ReadingExportType).ToString())).OrderBy(t => t.ShowOrder).Select(t => new
|
||||||
|
{
|
||||||
|
QuestionId = t.Id,
|
||||||
|
QuestionName = _userInfo.IsEn_Us ? t.QuestionEnName : t.QuestionName,
|
||||||
|
t.CDISCCode,
|
||||||
|
TranslateDicName = t.DictionaryCode
|
||||||
|
}).ToList();
|
||||||
|
var trialConfigTableQuestionList = _trialReadingTableQuestionRepository.Where(t => t.TrialId == trialId).Where(t => t.ExportResultStr.Contains(((int)inQuery.ReadingExportType).ToString())).OrderBy(t => t.ShowOrder).Select(t => new
|
||||||
|
{
|
||||||
|
QuestionId = t.Id,
|
||||||
|
QuestionName = _userInfo.IsEn_Us ? t.QuestionEnName : t.QuestionName,
|
||||||
|
t.CDISCCode,
|
||||||
|
TranslateDicName = t.DictionaryCode
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
var totalCoumNameList = trialConfigQuestionList.Union(trialConfigTableQuestionList).ToList();
|
||||||
|
|
||||||
|
var columNameList = totalCoumNameList.Select(t => t.QuestionName).ToList();
|
||||||
|
|
||||||
|
var translateDicList = totalCoumNameList.Where(t => t.TranslateDicName.IsNotNullOrEmpty()).Select(t => t.TranslateDicName).Distinct().ToList();
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
if (inQuery.ReadingExportType != ExportResult.CDISC)
|
if (inQuery.ReadingExportType != ExportResult.CDISC)
|
||||||
{
|
{
|
||||||
|
|
||||||
//合并之后获取最后的列名
|
//之前从问题答案取 合并之后获取最后的列名
|
||||||
var columNameList = list.SelectMany(t => t.QuestionAnswerList).Where(t => t.QuestionName.IsNotNullOrEmpty()).Select(t => t.QuestionName).Distinct().ToList();
|
//var columNameList = list.SelectMany(t => t.QuestionAnswerList).Where(t => t.QuestionName.IsNotNullOrEmpty()).Select(t => t.QuestionName).Distinct().ToList();
|
||||||
|
|
||||||
dynamicColumnConfig = new DynamicColumnConfig()
|
dynamicColumnConfig = new DynamicColumnConfig()
|
||||||
{
|
{
|
||||||
|
@ -2538,8 +2572,8 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
DynamicItemTitleName = "QuestionName",
|
DynamicItemTitleName = "QuestionName",
|
||||||
DynamicListName = "QuestionAnswerList",
|
DynamicListName = "QuestionAnswerList",
|
||||||
RemoveColunmIndexList = removeColumnIndexList,
|
RemoveColunmIndexList = removeColumnIndexList,
|
||||||
ColumnNameList = columNameList ?? new List<string>(),
|
ColumnNameList = columNameList,
|
||||||
TranslateDicNameList = translateDicNameList ?? new List<string>()
|
TranslateDicNameList = translateDicList
|
||||||
};
|
};
|
||||||
|
|
||||||
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig);
|
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig);
|
||||||
|
@ -2553,10 +2587,14 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
var nameList = list.SelectMany(t => t.QuestionAnswerList).Where(t => t.QuestionName.IsNotNullOrEmpty() && t.CDISCCode.IsNotNullOrEmpty()).Select(t => new { t.QuestionName, t.CDISCCode }).Distinct().ToList();
|
var cdiscCodeList = totalCoumNameList.Select(t => t.CDISCCode).ToList();
|
||||||
|
|
||||||
var columNameList = nameList.Select(t => t.QuestionName).Distinct().ToList();
|
#region 之前从问题答案取
|
||||||
var cdiscCodeList = nameList.Select(t => t.CDISCCode).Distinct().ToList();
|
|
||||||
|
//var nameList = list.SelectMany(t => t.QuestionAnswerList).Where(t => t.QuestionName.IsNotNullOrEmpty() && t.CDISCCode.IsNotNullOrEmpty()).Select(t => new { t.QuestionName, t.CDISCCode }).Distinct().ToList();
|
||||||
|
//var columNameList = nameList.Select(t => t.QuestionName).Distinct().ToList();
|
||||||
|
//var cdiscCodeList = nameList.Select(t => t.CDISCCode).Distinct().ToList();
|
||||||
|
#endregion
|
||||||
|
|
||||||
dynamicColumnConfig = new DynamicColumnConfig()
|
dynamicColumnConfig = new DynamicColumnConfig()
|
||||||
{
|
{
|
||||||
|
@ -2568,9 +2606,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
DynamicItemTitleName = "QuestionName",
|
DynamicItemTitleName = "QuestionName",
|
||||||
DynamicListName = "QuestionAnswerList",
|
DynamicListName = "QuestionAnswerList",
|
||||||
RemoveColunmIndexList = removeColumnIndexList,
|
RemoveColunmIndexList = removeColumnIndexList,
|
||||||
ColumnNameList = columNameList ?? new List<string>(),
|
ColumnNameList = columNameList,
|
||||||
CDISCList = cdiscCodeList,
|
CDISCList = cdiscCodeList,
|
||||||
TranslateDicNameList = translateDicNameList ?? new List<string>()
|
TranslateDicNameList = translateDicList
|
||||||
};
|
};
|
||||||
|
|
||||||
var (memoryStream, fileName) = await ExcelExportHelper.CDISC_DataExport_Async(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig);
|
var (memoryStream, fileName) = await ExcelExportHelper.CDISC_DataExport_Async(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig);
|
||||||
|
|
|
@ -1171,8 +1171,11 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public class CommonQuesionInfo
|
public class CommonQuesionInfo
|
||||||
{
|
{
|
||||||
|
//问题标识,肿瘤评估用于区分是什么问题
|
||||||
public QuestionType? QuestionType { get; set; }
|
public QuestionType? QuestionType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public Guid QuestionId { get; set; }
|
||||||
public string QuestionName { get; set; }
|
public string QuestionName { get; set; }
|
||||||
|
|
||||||
public string QuestionValue { get; set; }
|
public string QuestionValue { get; set; }
|
||||||
|
@ -1289,6 +1292,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
public Guid TableQuesionId { get; set; }
|
||||||
|
|
||||||
public string QuestionName { get; set; }
|
public string QuestionName { get; set; }
|
||||||
|
|
||||||
public string QuestionValue { get; set; }
|
public string QuestionValue { get; set; }
|
||||||
|
|
|
@ -242,6 +242,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
QuestionType = c.ReadingQuestionTrial.QuestionType,
|
QuestionType = c.ReadingQuestionTrial.QuestionType,
|
||||||
QuestionName = isEn_Us ? c.ReadingQuestionTrial.QuestionEnName : c.ReadingQuestionTrial.QuestionName,
|
QuestionName = isEn_Us ? c.ReadingQuestionTrial.QuestionEnName : c.ReadingQuestionTrial.QuestionName,
|
||||||
QuestionValue = c.IsGlobalChange ? c.GlobalChangeAnswer : c.Answer,
|
QuestionValue = c.IsGlobalChange ? c.GlobalChangeAnswer : c.Answer,
|
||||||
|
QuestionId = c.ReadingQuestionTrial.Id,
|
||||||
TranslateDicName = c.ReadingQuestionTrial.DictionaryCode,
|
TranslateDicName = c.ReadingQuestionTrial.DictionaryCode,
|
||||||
CDISCCode = c.ReadingQuestionTrial.CDISCCode
|
CDISCCode = c.ReadingQuestionTrial.CDISCCode
|
||||||
})))
|
})))
|
||||||
|
@ -277,6 +278,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.Select(c => new CommonQuesionInfo()
|
.Select(c => new CommonQuesionInfo()
|
||||||
{
|
{
|
||||||
QuestionType = c.ReadingQuestionTrial.QuestionType,
|
QuestionType = c.ReadingQuestionTrial.QuestionType,
|
||||||
|
QuestionId = c.ReadingQuestionTrial.Id,
|
||||||
QuestionName = isEn_Us ? c.ReadingQuestionTrial.QuestionEnName : c.ReadingQuestionTrial.QuestionName,
|
QuestionName = isEn_Us ? c.ReadingQuestionTrial.QuestionEnName : c.ReadingQuestionTrial.QuestionName,
|
||||||
QuestionValue = c.IsGlobalChange ? c.GlobalChangeAnswer : c.Answer,
|
QuestionValue = c.IsGlobalChange ? c.GlobalChangeAnswer : c.Answer,
|
||||||
TranslateDicName = c.ReadingQuestionTrial.DictionaryCode,
|
TranslateDicName = c.ReadingQuestionTrial.DictionaryCode,
|
||||||
|
@ -297,6 +299,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
//.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Lesion.RowMark))
|
//.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Lesion.RowMark))
|
||||||
//.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType))
|
//.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType))
|
||||||
.ForMember(o => o.QuestionMark, t => t.MapFrom(u => u.ReadingTableQuestionTrial.QuestionMark))
|
.ForMember(o => o.QuestionMark, t => t.MapFrom(u => u.ReadingTableQuestionTrial.QuestionMark))
|
||||||
|
.ForMember(o => o.TableQuesionId, t => t.MapFrom(u => u.ReadingTableQuestionTrial.Id))
|
||||||
.ForMember(o => o.QuestionName, t => t.MapFrom(u => isEn_Us ? u.ReadingTableQuestionTrial.QuestionEnName : u.ReadingTableQuestionTrial.QuestionName))
|
.ForMember(o => o.QuestionName, t => t.MapFrom(u => isEn_Us ? u.ReadingTableQuestionTrial.QuestionEnName : u.ReadingTableQuestionTrial.QuestionName))
|
||||||
.ForMember(o => o.QuestionValue, t => t.MapFrom(u => u.Answer))
|
.ForMember(o => o.QuestionValue, t => t.MapFrom(u => u.Answer))
|
||||||
.ForMember(o => o.CDISCCode, t => t.MapFrom(u => u.ReadingTableQuestionTrial.CDISCCode))
|
.ForMember(o => o.CDISCCode, t => t.MapFrom(u => u.ReadingTableQuestionTrial.CDISCCode))
|
||||||
|
|
Loading…
Reference in New Issue