代码修改
parent
6d4ce03c10
commit
fa9573cf54
|
@ -121,9 +121,23 @@ namespace IRaCIS.Core.Application.Service
|
|||
var questions = await _systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId)
|
||||
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
questions.ForEach(x => {
|
||||
x.GroupName = x.GroupEnName;
|
||||
x.QuestionName = x.QuestionEnName;
|
||||
});
|
||||
}
|
||||
var tableQuestions= await _systemClinicalTableQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId)
|
||||
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
tableQuestions.ForEach(x => {
|
||||
x.QuestionName = x.QuestionEnName;
|
||||
});
|
||||
}
|
||||
questions.ForEach(x => x.CreateTime = null);
|
||||
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
|
||||
|
||||
|
@ -146,10 +160,26 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var questions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId)
|
||||
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).OrderBy(x=>x.ShowOrder).ToListAsync();
|
||||
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
questions.ForEach(x => {
|
||||
x.GroupName = x.GroupEnName;
|
||||
x.QuestionName = x.QuestionEnName;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var tableQuestions = await _trialClinicalTableQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId)
|
||||
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
tableQuestions.ForEach(x => {
|
||||
x.QuestionName = x.QuestionEnName;
|
||||
});
|
||||
}
|
||||
|
||||
questions.ForEach(x => x.CreateTime = null);
|
||||
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).ToList();
|
||||
|
||||
|
|
|
@ -50,7 +50,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
// 预览
|
||||
CreateMap<TrialClinicalQuestion, ClinicalQuestionPreviewDto>();
|
||||
|
||||
CreateMap<SystemClinicalQuestion, ClinicalQuestionPreviewDto>();
|
||||
|
||||
CreateMap<SystemClinicalTableQuestion, ClinicalTablePreviewDto>();
|
||||
CreateMap<TrialClinicalTableQuestion, ClinicalTablePreviewDto>();
|
||||
#endregion
|
||||
|
|
Loading…
Reference in New Issue