修复领取bug
parent
41de69d7e4
commit
c9b50196fe
|
@ -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
|
|||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPut("{trialId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> UpdateSubjectAndSVInfo(UploadSubjectAndVisitCommand command)
|
||||
|
|
|
@ -71,7 +71,6 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
//modelBuilder.Entity<User>().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<DeleteTimeGenerator>().ValueGeneratedOnAddOrUpdate();
|
||||
|
||||
}
|
||||
|
||||
if (typeof(Entity).IsAssignableFrom(entityType.ClrType))
|
||||
|
|
|
@ -10,6 +10,8 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
public class SoftDeleteTrigger : IBeforeSaveTrigger<ISoftDelete>
|
||||
{
|
||||
|
||||
//Generator Detached 状态才会进去 误用
|
||||
//modelBuilder.Entity(entityType.ClrType).Property(nameof(ISoftDelete.DeletedTime)).HasValueGenerator<DeleteTimeGenerator>().ValueGeneratedOnAddOrUpdate();
|
||||
public Task BeforeSave(ITriggerContext<ISoftDelete> context, CancellationToken cancellationToken)
|
||||
{
|
||||
if (context.ChangeType == ChangeType.Modified)
|
||||
|
|
Loading…
Reference in New Issue