From dd35e37e65cee028a94d095516897c43558665e5 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 10 Jul 2025 09:19:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/AuditingData.cs | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index ed4cdbac9..47605ced3 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -3228,20 +3228,30 @@ namespace IRaCIS.Core.Infra.EFCore.Common var questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync(); var liverSegmentation = await _dbContext.ReadingTableQuestionAnswer.Where(x => x.RowId == entity.RowId && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.liverSegmentation).Select(x => x.Answer).FirstOrDefaultAsync(); - await InsertInspection(entity, type, x => new InspectionConvertDTO() + var generalId=new Guid(); + if (entity.TableQuestionId == null && entity.QuestionId == null) { - VisitTaskId = entity.VisitTaskId, - GeneralId = IdentifierHelper.CreateGuid(entity.VisitTaskId.ToString(), entity.QuestionId.ToString(), entity.TableQuestionId.ToString()), - ObjectRelationParentId = entity.VisitTaskId, + generalId = entity.Id; + } + else + { + generalId = IdentifierHelper.CreateGuid(entity.VisitTaskId.ToString(), entity.QuestionId.ToString(), entity.TableQuestionId.ToString()); + } - }, new - { - QuestionName = questionName, - RowMark = rowMark, - TableQuestionName = tableQuestionName, - Answer = answer, - LiverSegmentation = liverSegmentation, - }, _userInfo.AuditIdentification); + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + VisitTaskId = entity.VisitTaskId, + GeneralId = generalId, + ObjectRelationParentId = entity.VisitTaskId, + + }, new + { + QuestionName = questionName, + RowMark = rowMark, + TableQuestionName = tableQuestionName, + Answer = answer, + LiverSegmentation = liverSegmentation, + }, _userInfo.AuditIdentification); }