This commit is contained in:
he
2022-07-13 16:34:21 +08:00
parent 353fc63f5e
commit b6ded90a84
6 changed files with 55 additions and 4 deletions
@@ -37,7 +37,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid ReadingQuestionCriterionTrialId{ get; set; }
}
/// <summary>
/// 是否公共分页
/// </summary>
public bool IsPublicPage { get; set; }
}
public class AddOrUpdateReadingQuestionCriterionTrialInDto
@@ -381,6 +386,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 当前ID
/// </summary>
public Guid? Id { get; set; }
public Guid? ReadingCriterionPageId { get; set; }
}
public class GetSystemCriterionOtherQuestionInDto
@@ -713,7 +713,7 @@ namespace IRaCIS.Application.Services
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName))
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
.WhereIf(inDto.ReadingCriterionPageId!=null, x => x.ReadingCriterionPageId==inDto.ReadingCriterionPageId)
.ProjectTo<ReadingQuestionTrialView>(_mapper.ConfigurationProvider);
.ProjectTo<ReadingQuestionTrialView>(_mapper.ConfigurationProvider).OrderBy(x=>x.ShowOrder);
return await query.ToListAsync();
}
@@ -732,6 +732,7 @@ namespace IRaCIS.Application.Services
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId)
.Where(x => types.Contains(x.Type))
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
.WhereIf(inDto.ReadingCriterionPageId != null, x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId)
.Select(x => new CriterionOtherQuestionOutDto()
{
QuestionId = x.Id,