修改
This commit is contained in:
@@ -49,6 +49,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
public ReadingCategory ReadingCategory { get; set; }
|
||||
}
|
||||
|
||||
///<summary>ReadingMedicineSystemQuestionQuery 列表查询参数模型</summary>
|
||||
@@ -59,6 +64,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
public ReadingCategory? ReadingCategory { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +82,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
public ReadingCategory ReadingCategory { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteReadingMedicineTrialQuestion
|
||||
@@ -114,6 +129,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public int? ShowOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
public ReadingCategory? ReadingCategory { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +181,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
public ReadingCategory ReadingCategory { get; set; }
|
||||
}
|
||||
|
||||
public class ReadingMedicineTrialQuestionView
|
||||
@@ -182,12 +207,22 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public bool? IsConfirm { get; set; }
|
||||
|
||||
public int? ParentShowOrder { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
public ReadingCategory ReadingCategory { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetMedicineQuestionPreviewInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
public ReadingCategory? ReadingCategory { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -270,6 +305,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
public ReadingCategory ReadingCategory { get; set; }
|
||||
|
||||
}
|
||||
|
||||
///<summary> ReadingMedicineTrialQuestionAddOrEdit 列表查询参数模型</summary>
|
||||
@@ -288,7 +328,12 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public int ShowOrder { get; set; }
|
||||
public Guid? ParentId { get; set; }
|
||||
public bool? IsConfirm { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
public ReadingCategory ReadingCategory { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.WhereIf(!inDto.ParentTriggerValue.IsNullOrEmpty(), x => x.ParentTriggerValue.Contains(inDto.ParentTriggerValue))
|
||||
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName))
|
||||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
|
||||
.WhereIf(inDto.ReadingCategory!=null, x => x.ReadingCategory==inDto.ReadingCategory)
|
||||
.ProjectTo<ReadingMedicineSystemQuestionView>(_mapper.ConfigurationProvider).OrderBy(x=>x.ShowOrder);
|
||||
return await query.ToListAsync();
|
||||
}
|
||||
@@ -105,6 +106,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.WhereIf(!inDto.ParentTriggerValue.IsNullOrEmpty(), x => x.ParentTriggerValue.Contains(inDto.ParentTriggerValue))
|
||||
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.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);
|
||||
|
||||
|
||||
@@ -125,6 +127,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
public async Task<List<GetMedicineQuestionPreviewOutDto>> GetMedicineQuestionPreview(GetMedicineQuestionPreviewInDto inDto)
|
||||
{
|
||||
var trialQuestionList = await _readingMedicineTrialQuestionRepository.Where(x=>x.TrialId==inDto.TrialId)
|
||||
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
|
||||
.ProjectTo<GetMedicineQuestionPreviewOutDto>(_mapper.ConfigurationProvider).OrderBy(x=>x.ShowOrder).ToListAsync();
|
||||
|
||||
List<GetMedicineQuestionPreviewOutDto> readingQuestionList = trialQuestionList.Where(x => x.ParentId == null).ToList();
|
||||
@@ -188,12 +191,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
.Where(x => types.Contains(x.Type))
|
||||
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
|
||||
.WhereIf(inDto.ShowOrder != null, x => x.ShowOrder <inDto.ShowOrder)
|
||||
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
|
||||
.Select(x => new GetReadingMedicineTrialOtherQuestionOutDto()
|
||||
{
|
||||
Id = x.Id,
|
||||
QuestionName = x.QuestionName,
|
||||
TypeValue=x.TypeValue,
|
||||
|
||||
ReadingCategory=x.ReadingCategory,
|
||||
}).ToListAsync();
|
||||
|
||||
return questionList;
|
||||
@@ -217,6 +221,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IsRequired = x.IsRequired,
|
||||
QuestionName = x.QuestionName,
|
||||
Type = x.Type,
|
||||
ReadingCategory=x.ReadingCategory,
|
||||
TypeValue = x.TypeValue,
|
||||
TrialId=inDto.TrialId,
|
||||
}).ToList();
|
||||
|
||||
Reference in New Issue
Block a user