From 88ef23955e1450e00cdf00d6cde33251a45cef2a Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 13 Oct 2022 09:44:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/AuditingData.cs | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 8a5abfd5..c7d279ae 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -524,39 +524,39 @@ namespace IRaCIS.Core.Infra.EFCore.Common // 全局 阅片结果 if (entitys.Any(x => x.Entity.GetType() == typeof(ReadingGlobalTaskInfo))) { - var type = AuditOpt.Add; + //var type = AuditOpt.Add; - var list = entitys.Where(x => x.Entity.GetType() == typeof(ReadingGlobalTaskInfo)).Select(t => t.Entity as ReadingGlobalTaskInfo); + //var list = entitys.Where(x => x.Entity.GetType() == typeof(ReadingGlobalTaskInfo)).Select(t => t.Entity as ReadingGlobalTaskInfo); - foreach (var group in list.GroupBy(t => t.TaskId)) - { - var questionAnswerList = group.Where(t => t.QuestionId != null).ToList(); + //foreach (var group in list.GroupBy(t => t.TaskId)) + //{ + // var questionAnswerList = group.Where(t => t.QuestionId != null).ToList(); - var reasonStr = group.Where(t => t.QuestionId == null).FirstOrDefault().Answer; + // var reasonStr = group.Where(t => t.QuestionId == null).FirstOrDefault().Answer; - var questionIdList = questionAnswerList.Select(t => t.QuestionId).ToList(); + // var questionIdList = questionAnswerList.Select(t => t.QuestionId).ToList(); - var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => questionIdList.Contains(t.Id)).Select(t => new { t.QuestionName, QuestionId = t.Id, t.ShowOrder }).OrderBy(t => t.ShowOrder).ToListAsync(); + // var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => questionIdList.Contains(t.Id)).Select(t => new { t.QuestionName, QuestionId = t.Id, t.ShowOrder }).OrderBy(t => t.ShowOrder).ToListAsync(); - var firstEntity = questionAnswerList.First(); + // var firstEntity = questionAnswerList.First(); - var cloneEntity = firstEntity.Clone(); + // var cloneEntity = firstEntity.Clone(); - //保证Id 唯一 - cloneEntity.Id = IdentifierHelper.CreateGuid(firstEntity.GlobalTaskId.ToString(), firstEntity.TaskId.ToString(), firstEntity.Id.ToString()); + // //保证Id 唯一 + // cloneEntity.Id = IdentifierHelper.CreateGuid(firstEntity.GlobalTaskId.ToString(), firstEntity.TaskId.ToString(), firstEntity.Id.ToString()); - await InsertInspection(cloneEntity, type, x => new InspectionConvertDTO() - { - VisitTaskId = x.TaskId, + // await InsertInspection(cloneEntity, type, x => new InspectionConvertDTO() + // { + // VisitTaskId = x.TaskId, - ObjectRelationParentId = x.TaskId, + // ObjectRelationParentId = x.TaskId, - }, new { Reason = reasonStr, QuestionAnswerList = questionAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList() }); - } + // }, new { Reason = reasonStr, QuestionAnswerList = questionAnswerList.Join(quesionList, t => t.QuestionId, u => u.QuestionId, (t, u) => new { t.Answer, u.QuestionName, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList() }); + //}