修改全局稽查

Test.EIImageViewer
{872297557@qq.com} 2022-12-20 14:30:24 +08:00
parent 76bb819f27
commit b203925e50
2 changed files with 34 additions and 13 deletions

View File

@ -149,6 +149,10 @@ update DataInspection set VisitTaskId= substring(JsonDetail,CHARINDEX('VisitTask
update DataInspection set SubjectVisitId=null where EntityName='ReadModule'
update DataInspection set TrialReadingCriterionId=(select TrialReadingCriterionId from VisitTask where Id =VisitTaskId) where VisitTaskId is not null and TrialReadingCriterionId is null
update FrontAuditConfig set ValueCN='任务名称' where Value='TaskName' and ValueCN='访视/阅片期名称' and Code='TaskName'
update FrontAuditConfig set ValueCN='任务盲态标识' where Value='TaskBlindName' and ValueCN='访视盲态名称' and Code='TaskBlindName'

View File

@ -859,11 +859,24 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var questionIdList = questionAnswerList.Select(t => t.QuestionId).ToList();
var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => questionIdList.Contains(t.Id)).Select(t => new {
var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => questionIdList.Contains(t.Id)).Select(t => new
{
t.QuestionName, QuestionId = t.Id,
t.QuestionName,
QuestionId = t.Id,
t.DictionaryCode,
t.ShowOrder }).OrderBy(t => t.ShowOrder).ToListAsync();
t.ShowOrder
}).OrderBy(t => t.ShowOrder).ToListAsync();
//获取访视的评估结果 也要记录稽查
var visitAnswerList = await _dbContext.ReadingTaskQuestionAnswer.Where(t => t.VisitTaskId == group.Key && questionIdList.Contains(t.ReadingQuestionTrialId)).Select(u => new
{
QuestionId = u.ReadingQuestionTrialId,
u.Answer
}).ToListAsync();
var firstEntity = questionAnswerList.First();
@ -884,10 +897,14 @@ namespace IRaCIS.Core.Infra.EFCore.Common
ObjectRelationParentId = x.TaskId,
}, new { Reason = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.Reason).FirstOrDefault()?.Answer,
}, new
{
VisitQuestionAnswerList= visitAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.DictionaryCode, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList(),
Reason = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.Reason).FirstOrDefault()?.Answer,
AgreeOrNot = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.AgreeOrNot).FirstOrDefault()?.Answer,
UpdateType = group.Where(t => t.QuestionId == null && t.GlobalAnswerType == GlobalAnswerType.UpdateType).FirstOrDefault()?.Answer,
QuestionAnswerList = questionAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.DictionaryCode, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList() });
QuestionAnswerList = questionAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.DictionaryCode, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList()
});
}
}