Uat_Study
he 2022-07-14 15:29:29 +08:00
parent c4a7e8f632
commit a032c23f5c
3 changed files with 39 additions and 46 deletions

View File

@ -5891,13 +5891,6 @@
<param name="indto"></param> <param name="indto"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.GetPreviewTheQuestion(IRaCIS.Core.Application.Service.Reading.Dto.GetPreviewTheQuestionInDto)">
<summary>
获取预览问题信息
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.SetTrialReadingQuestionCriterionIsIsCompleteConfig(IRaCIS.Core.Application.Service.Reading.Dto.SetSystemReadingQuestionCriterionIsIsCompleteConfig)"> <member name="M:IRaCIS.Application.Services.ReadingQuestionService.SetTrialReadingQuestionCriterionIsIsCompleteConfig(IRaCIS.Core.Application.Service.Reading.Dto.SetSystemReadingQuestionCriterionIsIsCompleteConfig)">
<summary> <summary>
设置项目标准是否完成配置 设置项目标准是否完成配置

View File

@ -354,11 +354,11 @@ namespace IRaCIS.Application.Services
IsPublicPage = firstData.IsPublicPage, IsPublicPage = firstData.IsPublicPage,
}; };
var pageGroupList = newPageQusetionList.Where(x => x.ParentId == null).ToList(); var pageGroupList = newPageQusetionList.Where(x =>x.IsPage|| (x.ParentId == null&&x.PageName.IsNullOrEmpty())).ToList();
pageGroupList.ForEach(x => pageGroupList.ForEach(x =>
{ {
this.FindChildQuestion(x, newPageQusetionList); this.FindChildQuestion(x, newPageQusetionList);
}); });
page.Childrens = pageGroupList; page.Childrens = pageGroupList;
groupList.Add(page); groupList.Add(page);
@ -371,7 +371,7 @@ namespace IRaCIS.Application.Services
{ {
qusetionList = qusetionList.Where(x => x.ReadingCriterionPageId == null).ToList(); qusetionList = qusetionList.Where(x => x.ReadingCriterionPageId == null).ToList();
groupList = qusetionList.Where(x => x.ParentId == null).ToList(); groupList = qusetionList.Where(x => x.IsPage || (x.ParentId == null && x.PageName.IsNullOrEmpty())).ToList();
groupList.ForEach(x => groupList.ForEach(x =>
{ {
this.FindChildQuestion(x, qusetionList); this.FindChildQuestion(x, qusetionList);
@ -540,7 +540,7 @@ namespace IRaCIS.Application.Services
[NonDynamicMethod] [NonDynamicMethod]
public void FindChildQuestion(GetTrialReadingQuestionOutDto trialReadingQuestion, List<GetTrialReadingQuestionOutDto> questionlists) public void FindChildQuestion(GetTrialReadingQuestionOutDto trialReadingQuestion, List<GetTrialReadingQuestionOutDto> questionlists)
{ {
trialReadingQuestion.Childrens = questionlists.Where(x => x.ParentId == trialReadingQuestion.ReadingQuestionTrialId).ToList(); trialReadingQuestion.Childrens = questionlists.Where(x => x.ParentId == trialReadingQuestion.ReadingQuestionTrialId||(trialReadingQuestion.IsPage&&x.ParentId==null&&x.GroupName==trialReadingQuestion.GroupName)).ToList();
if (trialReadingQuestion.Childrens != null && trialReadingQuestion.Childrens.Count != 0) if (trialReadingQuestion.Childrens != null && trialReadingQuestion.Childrens.Count != 0)
{ {
trialReadingQuestion.Childrens.ForEach(x => trialReadingQuestion.Childrens.ForEach(x =>

View File

@ -579,39 +579,39 @@ namespace IRaCIS.Application.Services
return ResponseOutput.Ok(entity.Id.ToString()); return ResponseOutput.Ok(entity.Id.ToString());
} }
/// <summary> ///// <summary>
/// 获取预览问题信息 ///// 获取预览问题信息
/// </summary> ///// </summary>
/// <param name="inDto"></param> ///// <param name="inDto"></param>
/// <returns></returns> ///// <returns></returns>
[HttpPost] //[HttpPost]
public async Task<List<GetTrialReadingQuestionOutDto>> GetPreviewTheQuestion(GetPreviewTheQuestionInDto inDto) //public async Task<List<GetTrialReadingQuestionOutDto>> GetPreviewTheQuestion(GetPreviewTheQuestionInDto inDto)
{ //{
var trialQuestionQuery = from trialQuestion in _readingQuestionTrialRepository.Where(x=>x.ReadingQuestionCriterionTrialId== inDto.Id) // var trialQuestionQuery = from trialQuestion in _readingQuestionTrialRepository.Where(x=>x.ReadingQuestionCriterionTrialId== inDto.Id)
select new GetTrialReadingQuestionOutDto() // select new GetTrialReadingQuestionOutDto()
{ // {
ReadingQuestionTrialId = trialQuestion.Id, // ReadingQuestionTrialId = trialQuestion.Id,
ReadingQuestionCriterionTrialId = trialQuestion.ReadingQuestionCriterionTrialId, // ReadingQuestionCriterionTrialId = trialQuestion.ReadingQuestionCriterionTrialId,
TrialId = trialQuestion.TrialId, // TrialId = trialQuestion.TrialId,
Type = trialQuestion.Type, // Type = trialQuestion.Type,
ParentTriggerValue = trialQuestion.ParentTriggerValue, // ParentTriggerValue = trialQuestion.ParentTriggerValue,
GroupName = trialQuestion.GroupName, // GroupName = trialQuestion.GroupName,
QuestionName = trialQuestion.QuestionName, // QuestionName = trialQuestion.QuestionName,
IsRequired = trialQuestion.IsRequired, // IsRequired = trialQuestion.IsRequired,
ShowOrder = trialQuestion.ShowOrder, // ShowOrder = trialQuestion.ShowOrder,
ParentId = trialQuestion.ParentId, // ParentId = trialQuestion.ParentId,
TypeValue = trialQuestion.TypeValue, // TypeValue = trialQuestion.TypeValue,
Answer = string.Empty // Answer = string.Empty
}; // };
var qusetionList = await trialQuestionQuery.OrderBy(x => x.ShowOrder).ToListAsync(); // var qusetionList = await trialQuestionQuery.OrderBy(x => x.ShowOrder).ToListAsync();
List<GetTrialReadingQuestionOutDto> readingQuestionList = qusetionList.Where(x => x.ParentId == null).ToList(); // List<GetTrialReadingQuestionOutDto> readingQuestionList = qusetionList.Where(x => x.ParentId == null).ToList();
readingQuestionList.ForEach(x => // readingQuestionList.ForEach(x =>
{ // {
_readingImageTaskService.FindChildQuestion(x, qusetionList); // _readingImageTaskService.FindChildQuestion(x, qusetionList);
}); // });
return readingQuestionList; // return readingQuestionList;
} //}
///// <summary> ///// <summary>
///// 设置项目标准是否生效 ///// 设置项目标准是否生效