Uat_Study
he 2023-05-22 17:43:23 +08:00
parent d4ffe2eadf
commit af86dd92c5
1 changed files with 6 additions and 9 deletions

View File

@ -1131,7 +1131,7 @@ namespace IRaCIS.Application.Services
});
var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList();
var orders = thisAnswer.OrderBy(x => x.RowIndex).Select(x=>x.RowId).Distinct().ToList();
var orders = thisAnswer.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList();
item.TableQuestions.Answers = new List<Dictionary<string, string>>();
@ -1141,14 +1141,11 @@ namespace IRaCIS.Application.Services
QuestionMark.Part,
};
foreach (var x in orders)
orders.ForEach(x =>
{
Dictionary<string, string> answers = new Dictionary<string, string>();
var rowInfo = tableAnsweRowInfos.Where(y => y.Id==x).FirstOrDefault();
//if (rowInfo == null)
//{
// continue;
//}
var rowInfo = tableAnsweRowInfos.Where(y => y.RowIndex == x && y.QuestionId == item.Id).FirstOrDefault();
var rowAnswer = thisAnswer.Where(y => y.RowId == rowInfo.Id).OrderBy(y => y.ShowOrder).ToList();
@ -1247,7 +1244,7 @@ namespace IRaCIS.Application.Services
item.TableQuestions.Answers.Add(answers);
};
});
if (item.Childrens != null && item.Childrens.Count != 0)
{