修改一版
parent
fa0a2b55b9
commit
d5cf6b28e3
|
@ -362,7 +362,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public class GetTrialReadingQuestionInDto
|
public class GetTrialReadingQuestionInDto
|
||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid ReadingQuestionCriterionTrialId { get; set; }
|
public Guid ReadingQuestionCriterionSystemId { get; set; }
|
||||||
|
|
||||||
public Guid? VisitTaskId { get; set; }
|
public Guid? VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<ReadModule> _readModuleRepository;
|
private readonly IRepository<ReadModule> _readModuleRepository;
|
||||||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository;
|
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository;
|
||||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
||||||
|
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository;
|
||||||
|
private readonly IRepository<ReadingQuestionSystem> _readingQuestionSystem;
|
||||||
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,6 +62,8 @@ namespace IRaCIS.Application.Services
|
||||||
IRepository<ReadModule> readModuleRepository,
|
IRepository<ReadModule> readModuleRepository,
|
||||||
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||||
|
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
||||||
|
IRepository<ReadingQuestionSystem> ReadingQuestionSystem,
|
||||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -78,6 +82,8 @@ namespace IRaCIS.Application.Services
|
||||||
this._readModuleRepository = readModuleRepository;
|
this._readModuleRepository = readModuleRepository;
|
||||||
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
||||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||||
|
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
||||||
|
this._readingQuestionSystem = ReadingQuestionSystem;
|
||||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -613,6 +619,55 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 获取系统的阅片问题
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取系统的阅片问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<GetTrialReadingQuestionPageDto> GetSystemReadingQuestion(GetTrialReadingQuestionInDto inDto)
|
||||||
|
{
|
||||||
|
var result = new GetTrialReadingQuestionPageDto();
|
||||||
|
|
||||||
|
var query = from data in _readingQuestionSystem.Where(x => x.ReadingQuestionCriterionSystemId == inDto.ReadingQuestionCriterionSystemId)
|
||||||
|
select new GetTrialReadingQuestionOutDto()
|
||||||
|
{
|
||||||
|
ReadingQuestionTrialId = data.Id,
|
||||||
|
ParentTriggerValue = data.ParentTriggerValue,
|
||||||
|
GroupName = data.GroupName,
|
||||||
|
QuestionName = data.QuestionName,
|
||||||
|
IsRequired = data.IsRequired,
|
||||||
|
ShowOrder = data.ShowOrder,
|
||||||
|
ParentId = data.ParentId,
|
||||||
|
TypeValue = data.TypeValue,
|
||||||
|
Answer = string.Empty,
|
||||||
|
PageShowOrder = data.ShowOrder,
|
||||||
|
};
|
||||||
|
|
||||||
|
var qusetionList = await query.OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
|
var groupList = new List<GetTrialReadingQuestionOutDto>();
|
||||||
|
|
||||||
|
qusetionList = qusetionList.Where(x => x.ReadingCriterionPageId == null).ToList();
|
||||||
|
|
||||||
|
groupList = qusetionList.Where(x => x.Type == "group" || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
|
||||||
|
groupList.ForEach(x =>
|
||||||
|
{
|
||||||
|
this.FindChildQuestion(x, qusetionList);
|
||||||
|
});
|
||||||
|
|
||||||
|
groupList = groupList.Where(x => !(x.Type == "group" && x.Childrens.Count() == 0)).ToList();
|
||||||
|
|
||||||
|
result.SinglePage = groupList;
|
||||||
|
|
||||||
|
|
||||||
|
return (result);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 获取阅片任务和答案
|
#region 获取阅片任务和答案
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取阅片任务和答案
|
/// 获取阅片任务和答案
|
||||||
|
|
Loading…
Reference in New Issue