稽查修改

Uat_Study
hang 2022-09-07 16:38:07 +08:00
parent 55a762f098
commit ac46d680e9
1 changed files with 5 additions and 2 deletions

View File

@ -1053,7 +1053,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
if (entity.ParentId != null)
{
var question = await _dbContext.QCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => new { x.ShowOrder, x.QuestionName }).FirstOrDefaultAsync();
var question = await _dbContext.QCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => new { x.Id, x.ShowOrder, x.QuestionName }).FirstOrDefaultAsync();
parentQuestionOrder = question?.ShowOrder;
parentQuestionName = question?.QuestionName;
@ -1085,7 +1085,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
if (entity.ParentId != null)
{
var question = await _dbContext.TrialQCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => new { x.ShowOrder, x.QuestionName }).FirstOrDefaultAsync();
var question = entitys.Where(x => x.Entity.GetType() == typeof(TrialQCQuestion)).Select(t => t.Entity as TrialQCQuestion).Select(x => new { x.Id, x.ShowOrder, x.QuestionName }).FirstOrDefault(t => t.Id == entity.ParentId);
question = question ?? await _dbContext.TrialQCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => new { x.Id, x.ShowOrder, x.QuestionName }).FirstOrDefaultAsync();
parentQuestionOrder = question?.ShowOrder;
parentQuestionName = question?.QuestionName;