diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 849c85bdc..06c6ee749 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -1197,7 +1197,7 @@ namespace IRaCIS.Core.Application.Image.QA #region 处理验证 - if (dbSubjectVisit.IsTake) + if (dbSubjectVisit.IsTake&& dbSubjectVisit.CurrentActionUserId!=_userInfo.Id) { return ResponseOutput.NotOk("当前已被领取,不允许领取"); } @@ -1924,6 +1924,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// /// + [HttpPut("{trialId:guid}")] [TypeFilter(typeof(TrialResourceFilter))] public async Task UpdateSubjectAndSVInfo(UploadSubjectAndVisitCommand command) diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index 9756286f9..252428a79 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -71,7 +71,6 @@ namespace IRaCIS.Core.Infra.EFCore protected override void OnModelCreating(ModelBuilder modelBuilder) { - //modelBuilder.Entity().Property(t => t.FullName) .HasDefaultValueSql("[LastName] + ' / ' + [FirstName]"); if (_userInfo.IsEn_Us) { @@ -101,9 +100,6 @@ namespace IRaCIS.Core.Infra.EFCore { entityType.AddSoftDeleteQueryFilter(); - //Generator Detached 状态才会进去 误用 - //modelBuilder.Entity(entityType.ClrType).Property(nameof(ISoftDelete.DeletedTime)).HasValueGenerator().ValueGeneratedOnAddOrUpdate(); - } if (typeof(Entity).IsAssignableFrom(entityType.ClrType)) diff --git a/IRaCIS.Core.Infra.EFCore/Context/Triggers/SoftDeleteTrigger.cs b/IRaCIS.Core.Infra.EFCore/Context/Triggers/SoftDeleteTrigger.cs index 912368c83..b381ef034 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/Triggers/SoftDeleteTrigger.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/Triggers/SoftDeleteTrigger.cs @@ -10,6 +10,8 @@ namespace IRaCIS.Core.Application.Triggers public class SoftDeleteTrigger : IBeforeSaveTrigger { + //Generator Detached 状态才会进去 误用 + //modelBuilder.Entity(entityType.ClrType).Property(nameof(ISoftDelete.DeletedTime)).HasValueGenerator().ValueGeneratedOnAddOrUpdate(); public Task BeforeSave(ITriggerContext context, CancellationToken cancellationToken) { if (context.ChangeType == ChangeType.Modified)