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;