From 666671f09074f5ed8ffc8980f28ac48381788661 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Fri, 22 Apr 2022 13:12:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Inspection/InspectionService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index 93dd9165..3d377d85 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -298,7 +298,12 @@ namespace IRaCIS.Core.Application.Service.Inspection Guid? parentId = null; parentId = (await _repository.GetQueryable().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.ChildrenType == add.ChildrenType && x.ObjectType == add.ObjectType && x.VisitStageId == add.VisitStageId && x.GeneralId == add.GeneralId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id; add.ParentId = parentId; - add.CreateTime = DateTime.Now; + + if (add.CreateTime == default(DateTime)) + { + add.CreateTime = DateTime.Now; + } + add.CreateUserId = _userInfo.Id; add.SignId = signId; add.IP = _userInfo.IP;