修改一版
parent
a37e2288f0
commit
daf014576f
|
@ -16,7 +16,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
Task<IResponseOutput> SubmitJudgeVisitTaskResult(SaveJudgeVisitTaskResult inDto);
|
||||
|
||||
|
||||
void FindChildQuestion(GetTrialReadingQuestionOutDto trialReadingQuestion, List<GetTrialReadingQuestionOutDto> questionlists);
|
||||
|
||||
|
||||
Task<IResponseOutput> SubmitGlobalReadingInfo(SubmitGlobalReadingInfoInDto inDto);
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<ReadingJudgeInfo> _readingJudgeInfoRepository;
|
||||
private readonly IRepository<ReadModule> _readModuleRepository;
|
||||
private readonly IRepository<ReadingTableQuestionSystem> _readingTableQuestionSystemRepository;
|
||||
private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
||||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository;
|
||||
|
@ -66,6 +67,7 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<ReadingJudgeInfo> readingJudgeInfoRepository,
|
||||
IRepository<ReadModule> readModuleRepository,
|
||||
IRepository<ReadingTableQuestionSystem> readingTableQuestionSystemRepository,
|
||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
||||
|
@ -89,6 +91,7 @@ namespace IRaCIS.Application.Services
|
|||
this._readingJudgeInfoRepository = readingJudgeInfoRepository;
|
||||
this._readModuleRepository = readModuleRepository;
|
||||
this._readingTableQuestionSystemRepository = readingTableQuestionSystemRepository;
|
||||
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
||||
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
||||
|
@ -722,7 +725,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
#region 获取项目的阅片问题
|
||||
/// <summary>
|
||||
/// 获取项目的阅片问题
|
||||
/// 获取项目的阅片问题ECRF预览
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// SinglePage 单页
|
||||
|
@ -745,6 +748,9 @@ namespace IRaCIS.Application.Services
|
|||
var formType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.ReadingQuestionCriterionTrialId).Select(x => x.FormType).FirstOrDefaultAsync();
|
||||
var groupList = new List<GetTrialReadingQuestionOutDto>();
|
||||
|
||||
var qusetionIds = qusetionList.Select(x => x.ReadingQuestionTrialId).ToList();
|
||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => qusetionIds.Contains(x.ReadingQuestionId))
|
||||
.ProjectTo<TableQuestionDataInfo>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
if (inDto.FormType != null)
|
||||
{
|
||||
formType = inDto.FormType.Value;
|
||||
|
@ -768,7 +774,7 @@ namespace IRaCIS.Application.Services
|
|||
var pageGroupList = newPageQusetionList.Where(x => x.Type == "group" || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
|
||||
pageGroupList.ForEach(x =>
|
||||
{
|
||||
this.FindChildQuestion(x, newPageQusetionList);
|
||||
this.FindChildQuestion(x, newPageQusetionList, tableQuestionList);
|
||||
});
|
||||
|
||||
page.Childrens = pageGroupList.Where(x => !(x.Type == "group" && x.Childrens.Count() == 0)).ToList();
|
||||
|
@ -785,7 +791,7 @@ namespace IRaCIS.Application.Services
|
|||
groupList = qusetionList.Where(x => x.Type == "group" || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
|
||||
groupList.ForEach(x =>
|
||||
{
|
||||
this.FindChildQuestion(x, qusetionList);
|
||||
this.FindChildQuestion(x, qusetionList, tableQuestionList);
|
||||
});
|
||||
|
||||
groupList = groupList.Where(x => !(x.Type == "group" && x.Childrens.Count() == 0)).ToList();
|
||||
|
@ -795,17 +801,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//List<GetTrialReadingQuestionOutDto> groupList = qusetionList.Where(x => x.ParentId == null).ToList();
|
||||
|
||||
|
||||
|
||||
//groupList.ForEach(x =>
|
||||
//{
|
||||
// this.FindChildQuestion(x, qusetionList);
|
||||
//});
|
||||
|
||||
return (result, new
|
||||
{
|
||||
readingTaskState = readingTaskState,
|
||||
|
@ -1176,15 +1172,19 @@ namespace IRaCIS.Application.Services
|
|||
/// </summary>
|
||||
/// <param name="trialReadingQuestion"></param>
|
||||
/// <param name="questionlists"></param>
|
||||
/// <param name="tableQuestionLists"></param>
|
||||
[NonDynamicMethod]
|
||||
public void FindChildQuestion(GetTrialReadingQuestionOutDto trialReadingQuestion, List<GetTrialReadingQuestionOutDto> questionlists)
|
||||
public void FindChildQuestion(GetTrialReadingQuestionOutDto trialReadingQuestion, List<GetTrialReadingQuestionOutDto> questionlists,List<TableQuestionDataInfo> tableQuestionLists)
|
||||
{
|
||||
trialReadingQuestion.Childrens = questionlists.Where(x => x.ParentId == trialReadingQuestion.ReadingQuestionTrialId || (trialReadingQuestion.Type == "group" && x.Type != "group" && x.ParentId == null && x.GroupName == trialReadingQuestion.GroupName)).ToList();
|
||||
trialReadingQuestion.TableQuestions = tableQuestionLists.Where(x => x.ReadingQuestionId == trialReadingQuestion.ReadingQuestionTrialId).ToList();
|
||||
|
||||
|
||||
if (trialReadingQuestion.Childrens != null && trialReadingQuestion.Childrens.Count != 0)
|
||||
{
|
||||
trialReadingQuestion.Childrens.ForEach(x =>
|
||||
{
|
||||
this.FindChildQuestion(x, questionlists);
|
||||
this.FindChildQuestion(x, questionlists, tableQuestionLists);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<ReadingQuestionSystem, GetSystemReadingQuestionOutDto>();
|
||||
|
||||
CreateMap<ReadingTableQuestionSystem, TableQuestionDataInfo>();
|
||||
CreateMap<ReadingTableQuestionTrial, TableQuestionDataInfo>();
|
||||
|
||||
CreateMap<ReadingTableQuestionSystem, ReadingTableQuestionSystemView>()
|
||||
.ForMember(d => d.DependShowOrder, u => u.MapFrom(s => s.DependParentQuestion.ShowOrder));
|
||||
|
|
Loading…
Reference in New Issue