修复领取bug

Uat_Study
hang 2022-04-22 14:35:10 +08:00
parent 41de69d7e4
commit c9b50196fe
3 changed files with 4 additions and 5 deletions

View File

@ -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)

View File

@ -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))

View File

@ -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)