Uat_Study
parent
988ffcd5af
commit
7b4db3b388
|
@ -39,6 +39,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public int? PageShowOrder { get; set; }
|
public int? PageShowOrder { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<TrialReadQuestionData> Childrens { get; set; }
|
public List<TrialReadQuestionData> Childrens { get; set; }
|
||||||
|
|
||||||
public TrialReadTableQuestion TableQuestions { get; set; }
|
public TrialReadTableQuestion TableQuestions { get; set; }
|
||||||
|
@ -53,11 +55,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public class TrialReadTableQuestion
|
public class TrialReadTableQuestion
|
||||||
{
|
{
|
||||||
public List<ReadingTableQuestionTrial> Questions { get; set; }
|
public List<TableQuestionTrial> Questions { get; set; }
|
||||||
|
|
||||||
public List<Dictionary<string,string>> Answers { get; set; }
|
public List<Dictionary<string,string>> Answers { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class TableQuestionTrial:ReadingTableQuestionTrial
|
||||||
|
{
|
||||||
|
public List<GetTrialReadingQuestionOutDto> RelationQuestions { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public class GetReadingQuestionAndAnswerInDto
|
public class GetReadingQuestionAndAnswerInDto
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var qusetionIds = qusetionList.Select(x => x.Id).ToList();
|
var qusetionIds = qusetionList.Select(x => x.Id).ToList();
|
||||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => qusetionIds.Contains(x.ReadingQuestionId))
|
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => qusetionIds.Contains(x.ReadingQuestionId))
|
||||||
|
.ProjectTo<TableQuestionTrial>(_mapper.ConfigurationProvider)
|
||||||
.OrderBy(x => x.ShowOrder).ToListAsync();
|
.OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
@ -228,13 +229,41 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="item"></param>
|
/// <param name="item"></param>
|
||||||
/// <param name="questionlists"></param>
|
/// <param name="questionlists"></param>
|
||||||
/// <param name="tableQuestionLists"></param>
|
/// <param name="tableQuestionLists"></param>
|
||||||
private void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<ReadingTableQuestionTrial> tableQuestionLists,List<ReadingTableQuestionAnswerInfo> tableAnswers,List<ReadingTableAnswerRowInfo> tableAnsweRowInfos)
|
private void FindChildQuestion(TrialReadQuestionData item, List<TrialReadQuestionData> questionlists, List<TableQuestionTrial> tableQuestionLists,List<ReadingTableQuestionAnswerInfo> tableAnswers,List<ReadingTableAnswerRowInfo> tableAnsweRowInfos)
|
||||||
{
|
{
|
||||||
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == "group" && x.Type != "group" && x.ParentId == null && x.GroupName == item.GroupName)).ToList();
|
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == "group" && x.Type != "group" && x.ParentId == null && x.GroupName == item.GroupName)).ToList();
|
||||||
item.TableQuestions = new TrialReadTableQuestion();
|
item.TableQuestions = new TrialReadTableQuestion();
|
||||||
|
|
||||||
item.TableQuestions.Questions = tableQuestionLists.Where(x => x.ReadingQuestionId == item.Id).OrderBy(x=>x.ShowOrder).ToList();
|
item.TableQuestions.Questions = tableQuestionLists.Where(x => x.ReadingQuestionId == item.Id).OrderBy(x=>x.ShowOrder).ToList();
|
||||||
var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList();
|
|
||||||
|
item.TableQuestions.Questions.ForEach(x =>
|
||||||
|
{
|
||||||
|
|
||||||
|
x.RelationQuestions = tableQuestionLists.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).Select(x => new GetTrialReadingQuestionOutDto
|
||||||
|
{
|
||||||
|
Childrens = new List<GetTrialReadingQuestionOutDto>(),
|
||||||
|
ShowOrder = x.ShowOrder,
|
||||||
|
GroupName = string.Empty,
|
||||||
|
Id = x.Id,
|
||||||
|
Type = x.Type,
|
||||||
|
TableQuestionType = x.TableQuestionType,
|
||||||
|
DependParentId = x.DependParentId,
|
||||||
|
IsDepend = x.IsDepend,
|
||||||
|
QuestionMark = x.QuestionMark,
|
||||||
|
TypeValue = x.TypeValue,
|
||||||
|
RelevanceId = x.RelevanceId,
|
||||||
|
RelevanceValue = x.RelevanceValue,
|
||||||
|
ImageCount = 0,
|
||||||
|
ParentId = item.Id,
|
||||||
|
DataTableColumn = x.DataTableColumn,
|
||||||
|
LesionType = item.LesionType,
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
RelationQuestions = new List<GetTrialReadingQuestionOutDto>(),
|
||||||
|
Remark = x.Remark,
|
||||||
|
|
||||||
|
}).ToList();
|
||||||
|
});
|
||||||
|
var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList();
|
||||||
var orders = thisAnswer.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList();
|
var orders = thisAnswer.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList();
|
||||||
item.TableQuestions.Answers = new List<Dictionary<string, string>>();
|
item.TableQuestions.Answers = new List<Dictionary<string, string>>();
|
||||||
orders.ForEach(x =>
|
orders.ForEach(x =>
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
#region 阅片问题
|
#region 阅片问题
|
||||||
|
|
||||||
|
CreateMap<ReadingTableQuestionTrial, TableQuestionTrial>();
|
||||||
CreateMap<ReadingTableQuestionAnswer, ReadingTableQuestionAnswerInfo>()
|
CreateMap<ReadingTableQuestionAnswer, ReadingTableQuestionAnswerInfo>()
|
||||||
.ForMember(d => d.ShowOrder, u => u.MapFrom(s => s.ReadingQuestionTrial.ShowOrder));
|
.ForMember(d => d.ShowOrder, u => u.MapFrom(s => s.ReadingQuestionTrial.ShowOrder));
|
||||||
|
|
||||||
|
|
|
@ -119,11 +119,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// DependParentId
|
/// DependParentId
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? DependParentId { get; set; }
|
public Guid? DependParentId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IsDepend
|
/// IsDepend
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int IsDepend { get; set; }
|
public IsDepend? IsDepend { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue