From c9b50196fe957da65e4092ff1ce68fc482c8b5ca Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Fri, 22 Apr 2022 14:35:10 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A2=86=E5=8F=96bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Application/Service/QC/QCOperationService.cs | 3 ++-
IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs | 4 ----
.../Context/Triggers/SoftDeleteTrigger.cs | 2 ++
3 files changed, 4 insertions(+), 5 deletions(-)
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)