修改可导出列表接口
parent
cf0bf46f7e
commit
a4396c07d9
|
@ -640,6 +640,23 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
public string Code { get; set; }
|
public string Code { get; set; }
|
||||||
|
|
||||||
public string FileName { get; set; }
|
public string FileName { get; set; }
|
||||||
|
|
||||||
|
public ExportCatogory ExportCatogory { get;set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public enum ExportCatogory
|
||||||
|
{
|
||||||
|
// 整体肿瘤评估
|
||||||
|
OverallTumorEvaluation =1,
|
||||||
|
|
||||||
|
//肿瘤疗效评估
|
||||||
|
EvaluationOfTumorEfficacy = 2,
|
||||||
|
|
||||||
|
//评估病灶明细
|
||||||
|
DetailedOfEvaluatedLesion = 3,
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -650,19 +667,24 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
public async Task<List<ExportDocumentDes>> GetTrialReadingCriterionCanExportDocumentList(Guid trialReadingCriterionId)
|
public async Task<List<ExportDocumentDes>> GetTrialReadingCriterionCanExportDocumentList(Guid trialReadingCriterionId)
|
||||||
{
|
{
|
||||||
|
|
||||||
var list = new List<string>();
|
var list = new List<ExportDocumentDes>();
|
||||||
var criterionType = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == trialReadingCriterionId).Select(t => t.CriterionType).FirstOrDefaultAsync();
|
var criterionType = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == trialReadingCriterionId).Select(t => t.CriterionType).FirstOrDefaultAsync();
|
||||||
|
|
||||||
if (criterionType == CriterionType.RECIST1Pointt1)
|
if (criterionType == CriterionType.RECIST1Pointt1)
|
||||||
{
|
{
|
||||||
list.Add(StaticData.Export.OverallTumorEvaluation_Export);
|
list.Add( new ExportDocumentDes() { Code= StaticData.Export.OverallTumorEvaluation_Export ,ExportCatogory=ExportCatogory.OverallTumorEvaluation} );
|
||||||
list.Add(StaticData.Export.RECIST1Point1EvaluationOfTumorEfficacy_Export);
|
list.Add(new ExportDocumentDes() { Code = StaticData.Export.RECIST1Point1EvaluationOfTumorEfficacy_Export, ExportCatogory = ExportCatogory.EvaluationOfTumorEfficacy });
|
||||||
list.Add(StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export);
|
list.Add(new ExportDocumentDes() { Code = StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion });
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = _repository.Where<CommonDocument>(t => list.Contains(t.Code)).Select(c => new ExportDocumentDes() { Code = c.Code, FileName = c.Name }).ToList();
|
var result = _repository.Where<CommonDocument>(t => list.Select(c=>c.Code).Contains(t.Code)).Select(c => new ExportDocumentDes() { Code = c.Code, FileName = c.Name }).ToList();
|
||||||
|
|
||||||
return result;
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
item.FileName = result.Where(t => t.Code == item.Code).FirstOrDefault()?.FileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue