Compare commits

...

2 Commits

Author SHA1 Message Date
he 2654f85c32 Merge branch 'Test.IRC' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test.IRC
continuous-integration/drone/push Build is passing Details
2023-12-20 16:56:30 +08:00
he fa9573cf54 代码修改 2023-12-20 16:56:18 +08:00
2 changed files with 32 additions and 0 deletions

View File

@ -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();

View File

@ -50,7 +50,9 @@ namespace IRaCIS.Core.Application.Service
// 预览
CreateMap<TrialClinicalQuestion, ClinicalQuestionPreviewDto>();
CreateMap<SystemClinicalQuestion, ClinicalQuestionPreviewDto>();
CreateMap<SystemClinicalTableQuestion, ClinicalTablePreviewDto>();
CreateMap<TrialClinicalTableQuestion, ClinicalTablePreviewDto>();
#endregion