This commit is contained in:
he
2023-04-28 14:42:33 +08:00
parent 9b73522a8e
commit f43c384a27
23 changed files with 417 additions and 84 deletions
@@ -357,10 +357,11 @@ namespace IRaCIS.Core.Application.Service
{
Id = data.Id,
Type = data.Type,
ParentTriggerValue = data.ParentTriggerValue,
ParentTriggerValue = data.ParentTriggerValue ,
QuestionEnName=data.QuestionEnName,
IsEnable = data.IsEnable,
IsConfirm = data.IsConfirm,
QuestionName = data.QuestionName,
QuestionName = data.QuestionName.LanguageName(data.QuestionEnName, _userInfo.IsEn_Us),
IsRequired = data.IsRequired,
ShowOrder = data.ShowOrder,
ParentId = data.ParentId,
@@ -52,7 +52,7 @@ namespace IRaCIS.Core.Application.Service
var query = _readingMedicineSystemQuestionRepository.AsQueryable()
.WhereIf(!inDto.TypeValue.IsNullOrEmpty(), x => x.TypeValue.Contains(inDto.TypeValue))
.WhereIf(!inDto.ParentTriggerValue.IsNullOrEmpty(), x => x.ParentTriggerValue.Contains(inDto.ParentTriggerValue))
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName))
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName) || x.QuestionEnName.Contains(inDto.QuestionName))
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
.WhereIf(inDto.CurrentCriterionType!=null,x=>x.CriterionTypeEnum==null||x.CriterionTypeEnum==inDto.CurrentCriterionType)
@@ -85,7 +85,8 @@ namespace IRaCIS.Core.Application.Service
.Select(x => new GetReadingMedicineTrialOtherQuestionOutDto()
{
Id = x.Id,
QuestionName = x.QuestionName,
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
QuestionEnName =x.QuestionEnName,
TypeValue = x.TypeValue,
ReadingCategory = x.ReadingCategory,
}).ToListAsync();
@@ -152,7 +153,7 @@ namespace IRaCIS.Core.Application.Service
.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == inDto.TrialReadingCriterionId)
.WhereIf(!inDto.TypeValue.IsNullOrEmpty(), x => x.TypeValue.Contains(inDto.TypeValue))
.WhereIf(!inDto.ParentTriggerValue.IsNullOrEmpty(), x => x.ParentTriggerValue.Contains(inDto.ParentTriggerValue))
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName))
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName)|| x.QuestionEnName.Contains(inDto.QuestionName))
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
.ProjectTo<ReadingMedicineTrialQuestionView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
@@ -190,7 +191,8 @@ namespace IRaCIS.Core.Application.Service
.Select(x => new GetReadingMedicineTrialOtherQuestionOutDto()
{
Id = x.Id,
QuestionName = x.QuestionName,
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
QuestionEnName=x.QuestionEnName,
TypeValue = x.TypeValue,
ReadingCategory = x.ReadingCategory,
}).ToListAsync();
@@ -209,7 +211,13 @@ namespace IRaCIS.Core.Application.Service
{
var trialQuestionList = await _readingMedicineTrialQuestionRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == inDto.TrialReadingCriterionId)
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
.ProjectTo<GetMedicineQuestionPreviewOutDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
.ProjectTo<GetMedicineQuestionPreviewOutDto>(_mapper.ConfigurationProvider, new
{
isEn_Us = _userInfo.IsEn_Us
})
.OrderBy(x => x.ShowOrder).ToListAsync();
List<GetMedicineQuestionPreviewOutDto> readingQuestionList = trialQuestionList.Where(x => x.ParentId == null).ToList();
readingQuestionList.ForEach(x =>
@@ -458,8 +466,9 @@ namespace IRaCIS.Core.Application.Service
Id = NewId.NextGuid(),
ShowOrder = x.ShowOrder,
IsEnable = x.IsEnable,
QuestionEnName=x.QuestionEnName,
IsRequired = x.IsRequired,
QuestionName = x.QuestionName,
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
TrialReadingCriterionId=inDto.TrialReadingCriterionId,
Type = x.Type,
ParentId=x.ParentId,