分布式锁 sqlserver 05 项目迁移修改
parent
5d7beb71e6
commit
a565282a94
|
@ -101,7 +101,6 @@
|
||||||
<PackageReference Include="My.Extensions.Localization.Json" Version="3.0.0">
|
<PackageReference Include="My.Extensions.Localization.Json" Version="3.0.0">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
|
|
||||||
<PackageReference Include="NPOI" Version="2.6.0" />
|
<PackageReference Include="NPOI" Version="2.6.0" />
|
||||||
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.0" />
|
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.0" />
|
||||||
<PackageReference Include="Quartz" Version="3.5.0" />
|
<PackageReference Include="Quartz" Version="3.5.0" />
|
||||||
|
|
|
@ -6,7 +6,6 @@ using Microsoft.AspNetCore.Hosting;
|
||||||
using IRaCIS.Core.Application.Auth;
|
using IRaCIS.Core.Application.Auth;
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using Nito.AsyncEx;
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
|
@ -55,7 +54,6 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
private readonly IRepository<Doctor> _doctorTypeRepository;
|
private readonly IRepository<Doctor> _doctorTypeRepository;
|
||||||
|
|
||||||
private readonly AsyncLock _mutex = new AsyncLock();
|
|
||||||
|
|
||||||
private readonly SystemEmailSendConfig _systemEmailConfig;
|
private readonly SystemEmailSendConfig _systemEmailConfig;
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,11 @@ using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
|
using Medallion.Threading;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Services
|
namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
public class DicomArchiveService :BaseService, IDicomArchiveService
|
public class DicomArchiveService : BaseService, IDicomArchiveService
|
||||||
{
|
{
|
||||||
private readonly IRepository<DicomStudy> _studyRepository;
|
private readonly IRepository<DicomStudy> _studyRepository;
|
||||||
private readonly IRepository<DicomSeries> _seriesRepository;
|
private readonly IRepository<DicomSeries> _seriesRepository;
|
||||||
|
@ -21,7 +22,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
|
|
||||||
private readonly IWebHostEnvironment _hostEnvironment;
|
private readonly IWebHostEnvironment _hostEnvironment;
|
||||||
|
|
||||||
private static object lockCodeGenerate = new object();
|
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||||
|
|
||||||
|
|
||||||
private List<Guid> _instanceIdList = new List<Guid>();
|
private List<Guid> _instanceIdList = new List<Guid>();
|
||||||
|
@ -31,8 +32,9 @@ namespace IRaCIS.Core.Application.Services
|
||||||
IRepository<DicomInstance> instanceRepository,
|
IRepository<DicomInstance> instanceRepository,
|
||||||
IWebHostEnvironment hostEnvironment,
|
IWebHostEnvironment hostEnvironment,
|
||||||
IRepository<Dictionary> dictionaryRepository,
|
IRepository<Dictionary> dictionaryRepository,
|
||||||
IEasyCachingProvider provider)
|
IEasyCachingProvider provider, IDistributedLockProvider distributedLockProvider)
|
||||||
{
|
{
|
||||||
|
_distributedLockProvider = distributedLockProvider;
|
||||||
_hostEnvironment = hostEnvironment;
|
_hostEnvironment = hostEnvironment;
|
||||||
_studyRepository = studyRepository;
|
_studyRepository = studyRepository;
|
||||||
|
|
||||||
|
@ -129,7 +131,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
|
|
||||||
DicomStudy dicomStudy = CreateDicomStudy(dataset, addtionalInfo, out bool isStudyNeedAdd);
|
DicomStudy dicomStudy = CreateDicomStudy(dataset, addtionalInfo, out bool isStudyNeedAdd);
|
||||||
DicomSeries dicomSeries = CreateDicomSeries(dataset, dicomStudy, out bool isSeriesNeedAdd);
|
DicomSeries dicomSeries = CreateDicomSeries(dataset, dicomStudy, out bool isSeriesNeedAdd);
|
||||||
DicomInstance dicomInstance = CreateDicomInstance(dataset, dicomStudy, dicomSeries,out bool isInstanceNeedAdd);
|
DicomInstance dicomInstance = CreateDicomInstance(dataset, dicomStudy, dicomSeries, out bool isInstanceNeedAdd);
|
||||||
|
|
||||||
dicomSeries.DicomStudy = dicomStudy;
|
dicomSeries.DicomStudy = dicomStudy;
|
||||||
|
|
||||||
|
@ -235,7 +237,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
modalityForEdit = "PET";
|
modalityForEdit = "PET";
|
||||||
}
|
}
|
||||||
if(modality== "PT、CT")
|
if (modality == "PT、CT")
|
||||||
{
|
{
|
||||||
modalityForEdit = "PET-CT";
|
modalityForEdit = "PET-CT";
|
||||||
}
|
}
|
||||||
|
@ -282,9 +284,10 @@ namespace IRaCIS.Core.Application.Services
|
||||||
dicomStudy.PatientBirthDate = $"{dicomStudy.PatientBirthDate[0]}{dicomStudy.PatientBirthDate[1]}{dicomStudy.PatientBirthDate[2]}{dicomStudy.PatientBirthDate[3]}-{dicomStudy.PatientBirthDate[4]}{dicomStudy.PatientBirthDate[5]}-{dicomStudy.PatientBirthDate[6]}{dicomStudy.PatientBirthDate[7]}";
|
dicomStudy.PatientBirthDate = $"{dicomStudy.PatientBirthDate[0]}{dicomStudy.PatientBirthDate[1]}{dicomStudy.PatientBirthDate[2]}{dicomStudy.PatientBirthDate[3]}-{dicomStudy.PatientBirthDate[4]}{dicomStudy.PatientBirthDate[5]}-{dicomStudy.PatientBirthDate[6]}{dicomStudy.PatientBirthDate[7]}";
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (lockCodeGenerate)
|
var @lock = _distributedLockProvider.CreateLock($"StudyCode");
|
||||||
{
|
|
||||||
|
|
||||||
|
using (@lock.Acquire())
|
||||||
|
{
|
||||||
//查询数据库获取最大的Code 没有记录则为0
|
//查询数据库获取最大的Code 没有记录则为0
|
||||||
var dbStudyCodeIntMax = _studyRepository.Where(s => s.TrialId == addtionalInfo.TrialId).Select(t => t.Code).DefaultIfEmpty().Max();
|
var dbStudyCodeIntMax = _studyRepository.Where(s => s.TrialId == addtionalInfo.TrialId).Select(t => t.Code).DefaultIfEmpty().Max();
|
||||||
|
|
||||||
|
@ -298,9 +301,9 @@ namespace IRaCIS.Core.Application.Services
|
||||||
dicomStudy.StudyCode = AppSettings.GetCodeStr(currentNextCodeInt, nameof(DicomStudy));
|
dicomStudy.StudyCode = AppSettings.GetCodeStr(currentNextCodeInt, nameof(DicomStudy));
|
||||||
|
|
||||||
_provider.Set<int>($"{addtionalInfo.TrialId}_{StaticData.CacheKey.StudyMaxCode}", dicomStudy.Code, TimeSpan.FromMinutes(30));
|
_provider.Set<int>($"{addtionalInfo.TrialId}_{StaticData.CacheKey.StudyMaxCode}", dicomStudy.Code, TimeSpan.FromMinutes(30));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region Setting Code old
|
#region Setting Code old
|
||||||
|
|
||||||
//var studyCode = _studyRepository.Where(s => s.TrialId == addtionalInfo.TrialId).Select(t => t.StudyCode).OrderByDescending(c => c).FirstOrDefault();
|
//var studyCode = _studyRepository.Where(s => s.TrialId == addtionalInfo.TrialId).Select(t => t.StudyCode).OrderByDescending(c => c).FirstOrDefault();
|
||||||
|
|
|
@ -14,16 +14,13 @@ using IRaCIS.Core.Application.MediatR.Handlers;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Nito.AsyncEx;
|
using Medallion.Threading;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
{
|
{
|
||||||
[ApiExplorerSettings(GroupName = "Image")]
|
[ApiExplorerSettings(GroupName = "Image")]
|
||||||
public class StudyService : BaseService, IStudyService
|
public class StudyService : BaseService, IStudyService
|
||||||
{
|
{
|
||||||
private static object lockObj = new object();
|
|
||||||
private static readonly AsyncLock _mutex = new AsyncLock();
|
|
||||||
private static readonly AsyncLock _mutex2 = new AsyncLock();
|
|
||||||
|
|
||||||
private readonly IEasyCachingProvider _provider;
|
private readonly IEasyCachingProvider _provider;
|
||||||
|
|
||||||
|
@ -35,12 +32,12 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
private readonly IRepository<Dictionary> _dictionaryRepository;
|
private readonly IRepository<Dictionary> _dictionaryRepository;
|
||||||
|
|
||||||
private readonly IRepository<StudyMonitor> _studyMonitorRepository;
|
private readonly IRepository<StudyMonitor> _studyMonitorRepository;
|
||||||
|
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||||
|
|
||||||
public StudyService(IEasyCachingProvider provider
|
public StudyService(IEasyCachingProvider provider
|
||||||
, IRepository<SubjectVisit> subjectVisitRepository,
|
, IRepository<SubjectVisit> subjectVisitRepository,
|
||||||
IRepository<DicomInstance> dicomInstanceRepository,
|
IRepository<DicomInstance> dicomInstanceRepository,
|
||||||
IRepository<DicomSeries> dicomSeriesRepository, IRepository<DicomStudy> dicomstudyRepository, IRepository<Dictionary> dictionaryRepository, IRepository<StudyMonitor> studyMonitorRepository)
|
IRepository<DicomSeries> dicomSeriesRepository, IRepository<DicomStudy> dicomstudyRepository, IRepository<Dictionary> dictionaryRepository, IRepository<StudyMonitor> studyMonitorRepository, IDistributedLockProvider distributedLockProvider)
|
||||||
{
|
{
|
||||||
_provider = provider;
|
_provider = provider;
|
||||||
_subjectVisitRepository = subjectVisitRepository;
|
_subjectVisitRepository = subjectVisitRepository;
|
||||||
|
@ -49,6 +46,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
_dicomstudyRepository = dicomstudyRepository;
|
_dicomstudyRepository = dicomstudyRepository;
|
||||||
_dictionaryRepository = dictionaryRepository;
|
_dictionaryRepository = dictionaryRepository;
|
||||||
_studyMonitorRepository = studyMonitorRepository;
|
_studyMonitorRepository = studyMonitorRepository;
|
||||||
|
_distributedLockProvider = distributedLockProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -160,7 +158,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
{
|
{
|
||||||
var study = _mapper.Map<DicomStudy>(incommand.Study);
|
var study = _mapper.Map<DicomStudy>(incommand.Study);
|
||||||
|
|
||||||
using (await _mutex.LockAsync())
|
var @lock = _distributedLockProvider.CreateLock($"StudyCode");
|
||||||
|
|
||||||
|
using (await @lock.AcquireAsync())
|
||||||
{
|
{
|
||||||
//查询数据库获取最大的Code 没有记录则为0
|
//查询数据库获取最大的Code 没有记录则为0
|
||||||
var dbStudyCodeIntMax = _dicomstudyRepository.Where(s => s.TrialId == trialId).Select(t => t.Code).DefaultIfEmpty().Max();
|
var dbStudyCodeIntMax = _dicomstudyRepository.Where(s => s.TrialId == trialId).Select(t => t.Code).DefaultIfEmpty().Max();
|
||||||
|
@ -306,11 +306,11 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
using (await _mutex2.LockAsync())
|
var @lock2 = _distributedLockProvider.CreateLock($"StudyCommit");
|
||||||
|
|
||||||
|
using (await @lock2.AcquireAsync())
|
||||||
{
|
{
|
||||||
await _dicomInstanceRepository.SaveChangesAsync();
|
await _dicomInstanceRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -826,22 +826,22 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
}
|
}
|
||||||
result.StudyInstanceUid = studyInstanceUid;
|
result.StudyInstanceUid = studyInstanceUid;
|
||||||
|
|
||||||
|
var @lock = _distributedLockProvider.CreateLock($"StudyUpload");
|
||||||
|
|
||||||
if (result.AllowReUpload || result.AllowUpload)
|
using (@lock.Acquire())
|
||||||
{
|
{
|
||||||
lock (lockObj)
|
if (result.AllowReUpload || result.AllowUpload)
|
||||||
{
|
{
|
||||||
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
|
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
|
||||||
{
|
|
||||||
lock (lockObj)
|
|
||||||
{
|
{
|
||||||
_provider.Remove($"StudyUid_{trialId}_{studyInstanceUid}");
|
_provider.Remove($"StudyUid_{trialId}_{studyInstanceUid}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
using IRaCIS.Core.Infra.EFCore;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using Nito.AsyncEx;
|
using Medallion.Threading;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -12,13 +12,13 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
private readonly IRepository<Site> _siteRepository;
|
private readonly IRepository<Site> _siteRepository;
|
||||||
private readonly IRepository<TrialSiteUser> _trialSiteUserRepository;
|
private readonly IRepository<TrialSiteUser> _trialSiteUserRepository;
|
||||||
|
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||||
|
|
||||||
private readonly AsyncLock _mutex = new AsyncLock();
|
public SiteService(IRepository<Site> siteRepository, IRepository<TrialSiteUser> trialSiteUserRepository, IDistributedLockProvider distributedLockProvider)
|
||||||
|
|
||||||
public SiteService(IRepository<Site> siteRepository, IRepository<TrialSiteUser> trialSiteUserRepository)
|
|
||||||
{
|
{
|
||||||
_siteRepository = siteRepository;
|
_siteRepository = siteRepository;
|
||||||
this._trialSiteUserRepository = trialSiteUserRepository;
|
_trialSiteUserRepository = trialSiteUserRepository;
|
||||||
|
_distributedLockProvider = distributedLockProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> 分页获取研究中心列表 </summary>
|
/// <summary> 分页获取研究中心列表 </summary>
|
||||||
|
@ -58,7 +58,9 @@ namespace IRaCIS.Application.Services
|
||||||
VerifyMsg = _localizer["Site_DupName"]
|
VerifyMsg = _localizer["Site_DupName"]
|
||||||
};
|
};
|
||||||
|
|
||||||
using (await _mutex.LockAsync())
|
var @lock = _distributedLockProvider.CreateLock($"SiteAdd");
|
||||||
|
|
||||||
|
using (await @lock.AcquireAsync())
|
||||||
{
|
{
|
||||||
if (siteCommand.Id == null)
|
if (siteCommand.Id == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,7 @@ using IRaCIS.Core.Infra.Common.Cache;
|
||||||
using Microsoft.Identity.Client;
|
using Microsoft.Identity.Client;
|
||||||
using static IRaCIS.Core.Domain.Share.StaticData;
|
using static IRaCIS.Core.Domain.Share.StaticData;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
|
using Medallion.Threading;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -25,7 +26,7 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<TrialUser> _userTrialRepository;
|
private readonly IRepository<TrialUser> _userTrialRepository;
|
||||||
private readonly IRepository<UserLog> _userLogRepository;
|
private readonly IRepository<UserLog> _userLogRepository;
|
||||||
|
|
||||||
|
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||||
private readonly IMemoryCache _cache;
|
private readonly IMemoryCache _cache;
|
||||||
|
|
||||||
private readonly IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig;
|
private readonly IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig;
|
||||||
|
@ -40,7 +41,8 @@ namespace IRaCIS.Application.Services
|
||||||
IRepository<TrialUser> userTrialRepository,
|
IRepository<TrialUser> userTrialRepository,
|
||||||
IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig,
|
IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig,
|
||||||
IRepository<UserLog> userLogRepository
|
IRepository<UserLog> userLogRepository
|
||||||
)
|
,
|
||||||
|
IDistributedLockProvider distributedLockProvider)
|
||||||
{
|
{
|
||||||
_userLogRepository = userLogRepository;
|
_userLogRepository = userLogRepository;
|
||||||
|
|
||||||
|
@ -52,6 +54,7 @@ namespace IRaCIS.Application.Services
|
||||||
_doctorRepository = doctorRepository;
|
_doctorRepository = doctorRepository;
|
||||||
_userTrialRepository = userTrialRepository;
|
_userTrialRepository = userTrialRepository;
|
||||||
_userLogRepository = userLogRepository;
|
_userLogRepository = userLogRepository;
|
||||||
|
_distributedLockProvider = distributedLockProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -504,29 +507,32 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var saveItem = _mapper.Map<User>(userAddModel);
|
var saveItem = _mapper.Map<User>(userAddModel);
|
||||||
|
|
||||||
saveItem.Code = await _userRepository.Select(t => t.Code).DefaultIfEmpty().MaxAsync() + 1;
|
var @lock = _distributedLockProvider.CreateLock($"UserAccount");
|
||||||
|
|
||||||
saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User));
|
using (await @lock.AcquireAsync())
|
||||||
|
|
||||||
if (saveItem.IsZhiZhun)
|
|
||||||
{
|
{
|
||||||
saveItem.OrganizationName = AppSettings.DefaultInternalOrganizationName;
|
saveItem.Code = await _userRepository.Select(t => t.Code).DefaultIfEmpty().MaxAsync() + 1;
|
||||||
|
|
||||||
|
saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User));
|
||||||
|
|
||||||
|
if (saveItem.IsZhiZhun)
|
||||||
|
{
|
||||||
|
saveItem.OrganizationName = AppSettings.DefaultInternalOrganizationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
saveItem.Password = MD5Helper.Md5("123456");
|
||||||
|
|
||||||
|
await _userRepository.AddAsync(saveItem);
|
||||||
|
|
||||||
|
var success = await _userRepository.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
saveItem.Password = MD5Helper.Md5("123456");
|
|
||||||
|
|
||||||
await _userRepository.AddAsync(saveItem);
|
|
||||||
|
|
||||||
var success = await _userRepository.SaveChangesAsync();
|
|
||||||
|
|
||||||
|
|
||||||
await _mailVerificationService.AddUserSendEmailAsync(saveItem.Id, userAddModel.BaseUrl, userAddModel.RouteUrl);
|
await _mailVerificationService.AddUserSendEmailAsync(saveItem.Id, userAddModel.BaseUrl, userAddModel.RouteUrl);
|
||||||
|
|
||||||
|
|
||||||
|
return ResponseOutput.Ok( new UserAddedReturnDTO { Id = saveItem.Id, UserCode = saveItem.UserCode });
|
||||||
|
|
||||||
return ResponseOutput.Result(success, new UserAddedReturnDTO { Id = saveItem.Id, UserCode = saveItem.UserCode });
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using Nito.AsyncEx;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using IRaCIS.Core.Application.Service;
|
using IRaCIS.Core.Application.Service;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using Medallion.Threading;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Contracts
|
namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
|
@ -20,19 +20,19 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
||||||
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository;
|
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository;
|
||||||
private readonly AsyncLock _mutex = new AsyncLock();
|
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||||
private readonly QCCommon _qCCommon;
|
private readonly QCCommon _qCCommon;
|
||||||
|
|
||||||
|
|
||||||
public NoneDicomStudyService(IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
public NoneDicomStudyService(IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
||||||
QCCommon qCCommon,
|
QCCommon qCCommon,
|
||||||
IRepository<NoneDicomStudyFile> noneDicomStudyFileRepository)
|
IRepository<NoneDicomStudyFile> noneDicomStudyFileRepository, IDistributedLockProvider distributedLockProvider)
|
||||||
{
|
{
|
||||||
_qCCommon = qCCommon;
|
_qCCommon = qCCommon;
|
||||||
_noneDicomStudyRepository = noneDicomStudyRepository;
|
_noneDicomStudyRepository = noneDicomStudyRepository;
|
||||||
|
|
||||||
_noneDicomStudyFileRepository = noneDicomStudyFileRepository;
|
_noneDicomStudyFileRepository = noneDicomStudyFileRepository;
|
||||||
|
_distributedLockProvider = distributedLockProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,7 +62,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
NoneDicomStudy? optEntity = null;
|
NoneDicomStudy? optEntity = null;
|
||||||
using (await _mutex.LockAsync())
|
var @lock = _distributedLockProvider.CreateLock($"NoneDicomCode");
|
||||||
|
|
||||||
|
using (await @lock.AcquireAsync())
|
||||||
{
|
{
|
||||||
if (addOrEditNoneDicomStudy.Id == Guid.Empty || addOrEditNoneDicomStudy.Id == null)
|
if (addOrEditNoneDicomStudy.Id == Guid.Empty || addOrEditNoneDicomStudy.Id == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,13 +10,13 @@ using WinSCP;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||||
using Nito.AsyncEx;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using IRaCIS.Core.Application.Auth;
|
using IRaCIS.Core.Application.Auth;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Application.Service;
|
using IRaCIS.Core.Application.Service;
|
||||||
|
using Medallion.Threading;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Image.QA
|
namespace IRaCIS.Core.Application.Image.QA
|
||||||
{
|
{
|
||||||
|
@ -35,8 +35,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
private readonly IVisitTaskHelpeService _IVisitTaskHelpeService;
|
private readonly IVisitTaskHelpeService _IVisitTaskHelpeService;
|
||||||
|
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||||
private readonly AsyncLock _mutex = new AsyncLock();
|
|
||||||
|
|
||||||
public QCOperationService(IRepository<SubjectVisit> subjectVisitRepository,
|
public QCOperationService(IRepository<SubjectVisit> subjectVisitRepository,
|
||||||
IRepository<QCChallenge> qcChallengeRepository,
|
IRepository<QCChallenge> qcChallengeRepository,
|
||||||
|
@ -48,7 +47,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
IRepository<ReadingClinicalData> readingClinicalDataRepository,
|
IRepository<ReadingClinicalData> readingClinicalDataRepository,
|
||||||
IRepository<QCChallengeDialog> qCChallengeDialogrepository,
|
IRepository<QCChallengeDialog> qCChallengeDialogrepository,
|
||||||
IRepository<CheckChallengeDialog> checkChallengeDialogrepository,
|
IRepository<CheckChallengeDialog> checkChallengeDialogrepository,
|
||||||
IVisitTaskHelpeService visitTaskHelpeService
|
IVisitTaskHelpeService visitTaskHelpeService,
|
||||||
|
IDistributedLockProvider distributedLockProvider
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_subjectVisitRepository = subjectVisitRepository;
|
_subjectVisitRepository = subjectVisitRepository;
|
||||||
|
@ -62,6 +62,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
_trialRepository = trialRepository;
|
_trialRepository = trialRepository;
|
||||||
this._visitTaskRepository = visitTaskRepository;
|
this._visitTaskRepository = visitTaskRepository;
|
||||||
_IVisitTaskHelpeService = visitTaskHelpeService;
|
_IVisitTaskHelpeService = visitTaskHelpeService;
|
||||||
|
_distributedLockProvider = distributedLockProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region QC质疑 以及回复 关闭
|
#region QC质疑 以及回复 关闭
|
||||||
|
@ -108,9 +109,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
var trialConfig = (await _trialRepository.Where(t => t.Id == trialId).Select(t => new { TrialId = t.Id, t.QCProcessEnum, t.IsImageConsistencyVerification }).FirstOrDefaultAsync()).IfNullThrowException();
|
var trialConfig = (await _trialRepository.Where(t => t.Id == trialId).Select(t => new { TrialId = t.Id, t.QCProcessEnum, t.IsImageConsistencyVerification }).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
|
var @lock = _distributedLockProvider.CreateLock($"QCChallengeCode");
|
||||||
|
|
||||||
|
using (await @lock.AcquireAsync())
|
||||||
using (await _mutex.LockAsync())
|
|
||||||
{
|
{
|
||||||
//获取编号
|
//获取编号
|
||||||
var code = _qcChallengeRepository.Where(t => t.TrialId == trialId).Select(t => t.Code).DefaultIfEmpty().Max();
|
var code = _qcChallengeRepository.Where(t => t.TrialId == trialId).Select(t => t.Code).DefaultIfEmpty().Max();
|
||||||
|
|
|
@ -49,7 +49,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
_mailVerificationService = mailVerificationService;
|
_mailVerificationService = mailVerificationService;
|
||||||
}
|
}
|
||||||
|
|
||||||
private object lockObj { get; set; } = new object();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发送验证码
|
/// 发送验证码
|
||||||
|
@ -801,7 +800,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
if (sysUserInfo == null)
|
if (sysUserInfo == null)
|
||||||
{
|
{
|
||||||
|
|
||||||
lock (lockObj)
|
var @lock = _distributedLockProvider.CreateLock($"UserCode");
|
||||||
|
|
||||||
|
using (await @lock.AcquireAsync())
|
||||||
{
|
{
|
||||||
var saveItem = _mapper.Map<User>(item);
|
var saveItem = _mapper.Map<User>(item);
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ using Panda.DynamicWebApi.Attributes;
|
||||||
using IRaCIS.Core.Application.Auth;
|
using IRaCIS.Core.Application.Auth;
|
||||||
using IRaCIS.Application.Services;
|
using IRaCIS.Application.Services;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
|
using Medallion.Threading;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
@ -31,10 +32,11 @@ namespace IRaCIS.Core.Application.Service
|
||||||
private readonly IRepository<TrialSiteUserSurvey> _trialSiteSurveyUserRepository;
|
private readonly IRepository<TrialSiteUserSurvey> _trialSiteSurveyUserRepository;
|
||||||
private readonly IRepository<TrialSiteUser> _trialSiteUserRepository;
|
private readonly IRepository<TrialSiteUser> _trialSiteUserRepository;
|
||||||
private readonly IMailVerificationService _mailVerificationService;
|
private readonly IMailVerificationService _mailVerificationService;
|
||||||
|
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||||
|
|
||||||
public TrialExternalUserService(IRepository<TrialExternalUser> trialExternalUseRepository, IRepository<User> userRepository, IRepository<TrialUser> trialUserRepository,
|
public TrialExternalUserService(IRepository<TrialExternalUser> trialExternalUseRepository, IRepository<User> userRepository, IRepository<TrialUser> trialUserRepository,
|
||||||
IRepository<TrialSiteUserSurvey> trialSiteSurveyUserRepository, IRepository<TrialSiteUser> trialSiteUserRepository,
|
IRepository<TrialSiteUserSurvey> trialSiteSurveyUserRepository, IRepository<TrialSiteUser> trialSiteUserRepository,
|
||||||
IMailVerificationService mailVerificationService)
|
IMailVerificationService mailVerificationService, IDistributedLockProvider distributedLockProvider)
|
||||||
{
|
{
|
||||||
_trialExternalUseRepository = trialExternalUseRepository;
|
_trialExternalUseRepository = trialExternalUseRepository;
|
||||||
_userRepository = userRepository;
|
_userRepository = userRepository;
|
||||||
|
@ -43,6 +45,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
_trialSiteUserRepository = trialSiteUserRepository;
|
_trialSiteUserRepository = trialSiteUserRepository;
|
||||||
|
|
||||||
_mailVerificationService = mailVerificationService;
|
_mailVerificationService = mailVerificationService;
|
||||||
|
_distributedLockProvider = distributedLockProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,121 +78,125 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
if (addOrEditTrialExternalUser.Id == null)
|
if (addOrEditTrialExternalUser.Id == null)
|
||||||
{
|
{
|
||||||
var existSysUser = await _userRepository.FirstOrDefaultAsync(t => t.EMail == addOrEditTrialExternalUser.Email && t.UserTypeId == addOrEditTrialExternalUser.UserTypeId);
|
var @lock = _distributedLockProvider.CreateLock($"UserCode");
|
||||||
|
|
||||||
if (existSysUser != null)
|
using (await @lock.AcquireAsync())
|
||||||
{
|
{
|
||||||
if (existSysUser.LastName != addOrEditTrialExternalUser.LastName || existSysUser.FirstName != addOrEditTrialExternalUser.FirstName)
|
var existSysUser = await _userRepository.FirstOrDefaultAsync(t => t.EMail == addOrEditTrialExternalUser.Email && t.UserTypeId == addOrEditTrialExternalUser.UserTypeId);
|
||||||
|
|
||||||
|
if (existSysUser != null)
|
||||||
{
|
{
|
||||||
//$"该用户在系统中的用户名为:{existSysUser.LastName + " / " + existSysUser.FirstName} 电话:{existSysUser.Phone},与填写信息存在不一致项, 请将界面信息修改为与系统一致,再进行保存",
|
if (existSysUser.LastName != addOrEditTrialExternalUser.LastName || existSysUser.FirstName != addOrEditTrialExternalUser.FirstName)
|
||||||
return ResponseOutput.NotOk(_localizer["TrialExternalUser_Inconsistency", existSysUser.LastName + " / " + existSysUser.FirstName, existSysUser.Phone], new { existSysUser.LastName, existSysUser.FirstName, existSysUser.Phone, existSysUser.IsZhiZhun, existSysUser.IsTestUser }, ApiResponseCodeEnum.NeedTips);
|
{
|
||||||
|
//$"该用户在系统中的用户名为:{existSysUser.LastName + " / " + existSysUser.FirstName} 电话:{existSysUser.Phone},与填写信息存在不一致项, 请将界面信息修改为与系统一致,再进行保存",
|
||||||
|
return ResponseOutput.NotOk(_localizer["TrialExternalUser_Inconsistency", existSysUser.LastName + " / " + existSysUser.FirstName, existSysUser.Phone], new { existSysUser.LastName, existSysUser.FirstName, existSysUser.Phone, existSysUser.IsZhiZhun, existSysUser.IsTestUser }, ApiResponseCodeEnum.NeedTips);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
//处理 生成账户
|
||||||
|
|
||||||
//处理 生成账户
|
if (await _trialExternalUseRepository.AnyAsync(t =>
|
||||||
|
t.Email == addOrEditTrialExternalUser.Email &&
|
||||||
if (await _trialExternalUseRepository.AnyAsync(t =>
|
t.UserTypeId == addOrEditTrialExternalUser.UserTypeId && t.TrialId == addOrEditTrialExternalUser.TrialId))
|
||||||
t.Email == addOrEditTrialExternalUser.Email &&
|
{
|
||||||
t.UserTypeId == addOrEditTrialExternalUser.UserTypeId && t.TrialId == addOrEditTrialExternalUser.TrialId))
|
//---系统已经存在与列表中填写的邮箱和用户类型相同的账户,请确认。
|
||||||
{
|
return ResponseOutput.NotOk(_localizer["TrialExternalUser_EmailTypeDuplicate"]);
|
||||||
//---系统已经存在与列表中填写的邮箱和用户类型相同的账户,请确认。
|
}
|
||||||
return ResponseOutput.NotOk(_localizer["TrialExternalUser_EmailTypeDuplicate"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var addEntity = _mapper.Map<TrialExternalUser>(addOrEditTrialExternalUser);
|
var addEntity = _mapper.Map<TrialExternalUser>(addOrEditTrialExternalUser);
|
||||||
|
|
||||||
await _trialExternalUseRepository.AddAsync(addEntity);
|
await _trialExternalUseRepository.AddAsync(addEntity);
|
||||||
|
|
||||||
|
|
||||||
var existUser = await _userRepository.FirstOrDefaultAsync(t => t.EMail == addOrEditTrialExternalUser.Email && t.UserTypeId == addOrEditTrialExternalUser.UserTypeId);
|
var existUser = await _userRepository.FirstOrDefaultAsync(t => t.EMail == addOrEditTrialExternalUser.Email && t.UserTypeId == addOrEditTrialExternalUser.UserTypeId);
|
||||||
var trialType = await _repository.Where<Trial>(t => t.Id == addOrEditTrialExternalUser.TrialId).Select(t => t.TrialType).FirstOrDefaultAsync();
|
var trialType = await _repository.Where<Trial>(t => t.Id == addOrEditTrialExternalUser.TrialId).Select(t => t.TrialType).FirstOrDefaultAsync();
|
||||||
|
|
||||||
if (existUser != null)
|
if (existUser != null)
|
||||||
{
|
{
|
||||||
addEntity.IsSystemUser = true;
|
addEntity.IsSystemUser = true;
|
||||||
addEntity.SystemUserId = existUser.Id;
|
addEntity.SystemUserId = existUser.Id;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
//生成账户 并插入
|
//生成账户 并插入
|
||||||
|
|
||||||
var generateUser = _mapper.Map<User>(addOrEditTrialExternalUser);
|
var generateUser = _mapper.Map<User>(addOrEditTrialExternalUser);
|
||||||
|
|
||||||
|
if (trialType == TrialType.NoneOfficial)
|
||||||
|
{
|
||||||
|
generateUser.IsTestUser = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 外部人员生成账号 都是外部的
|
||||||
|
generateUser.IsZhiZhun = false;
|
||||||
|
|
||||||
|
generateUser.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
|
||||||
|
|
||||||
|
|
||||||
|
generateUser.UserCode = AppSettings.GetCodeStr(generateUser.Code, nameof(User));
|
||||||
|
|
||||||
|
generateUser.UserName = generateUser.UserCode;
|
||||||
|
|
||||||
|
generateUser.UserTypeEnum = _repository.Where<UserType>(t => t.Id == generateUser.UserTypeId).Select(t => t.UserTypeEnum).First();
|
||||||
|
|
||||||
|
generateUser.Password = MD5Helper.Md5("123456");
|
||||||
|
|
||||||
|
generateUser.Status = UserStateEnum.Disable;
|
||||||
|
|
||||||
|
var newAddUser = await _repository.AddAsync(generateUser);
|
||||||
|
|
||||||
|
|
||||||
|
addEntity.IsSystemUser = false;
|
||||||
|
addEntity.SystemUserId = newAddUser.Id;
|
||||||
|
|
||||||
|
|
||||||
|
existUser = newAddUser;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 验证用户 能否加入
|
||||||
|
|
||||||
|
if (trialType == TrialType.OfficialTrial || trialType == TrialType.Training)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (existUser.IsTestUser)
|
||||||
|
{
|
||||||
|
//---正式类型 、培训类型的项目 不允许加入测试用户
|
||||||
|
throw new BusinessValidationFailedException(_localizer["TrialExternalUser_TestUserNotAllowed"]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (trialType == TrialType.NoneOfficial)
|
if (trialType == TrialType.NoneOfficial)
|
||||||
{
|
{
|
||||||
generateUser.IsTestUser = true;
|
|
||||||
|
if (existUser.IsTestUser == false)
|
||||||
|
{
|
||||||
|
//---测试项目 不允许加入正式用户
|
||||||
|
throw new BusinessValidationFailedException(_localizer["TrialExternalUser_FormalUserNotAllowed"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 外部人员生成账号 都是外部的
|
#endregion
|
||||||
generateUser.IsZhiZhun = false;
|
|
||||||
|
|
||||||
generateUser.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
|
|
||||||
|
|
||||||
|
|
||||||
generateUser.UserCode = AppSettings.GetCodeStr(generateUser.Code, nameof(User));
|
await _trialExternalUseRepository.SaveChangesAsync();
|
||||||
|
|
||||||
generateUser.UserName = generateUser.UserCode;
|
|
||||||
|
|
||||||
generateUser.UserTypeEnum = _repository.Where<UserType>(t => t.Id == generateUser.UserTypeId).Select(t => t.UserTypeEnum).First();
|
|
||||||
|
|
||||||
generateUser.Password = MD5Helper.Md5("123456");
|
|
||||||
|
|
||||||
generateUser.Status = UserStateEnum.Disable;
|
|
||||||
|
|
||||||
var newAddUser = await _repository.AddAsync(generateUser);
|
|
||||||
|
|
||||||
|
|
||||||
addEntity.IsSystemUser = false;
|
//添加的时候就发邮件 现在省略
|
||||||
addEntity.SystemUserId = newAddUser.Id;
|
if (addOrEditTrialExternalUser.IsSendEmail)
|
||||||
|
|
||||||
|
|
||||||
existUser = newAddUser;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#region 验证用户 能否加入
|
|
||||||
|
|
||||||
if (trialType == TrialType.OfficialTrial || trialType == TrialType.Training)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (existUser.IsTestUser)
|
|
||||||
{
|
{
|
||||||
//---正式类型 、培训类型的项目 不允许加入测试用户
|
await SendExternalUserJoinEmail(new TrialExternalUserSendEmail()
|
||||||
throw new BusinessValidationFailedException(_localizer["TrialExternalUser_TestUserNotAllowed"]);
|
{
|
||||||
|
BaseUrl = addOrEditTrialExternalUser.BaseUrl,
|
||||||
}
|
RouteUrl = addOrEditTrialExternalUser.RouteUrl,
|
||||||
}
|
TrialId = addOrEditTrialExternalUser.TrialId,
|
||||||
|
SendUsers = new List<UserEmail>()
|
||||||
if (trialType == TrialType.NoneOfficial)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (existUser.IsTestUser == false )
|
|
||||||
{
|
|
||||||
//---测试项目 不允许加入正式用户
|
|
||||||
throw new BusinessValidationFailedException(_localizer["TrialExternalUser_FormalUserNotAllowed"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
await _trialExternalUseRepository.SaveChangesAsync();
|
|
||||||
|
|
||||||
|
|
||||||
//添加的时候就发邮件 现在省略
|
|
||||||
if (addOrEditTrialExternalUser.IsSendEmail)
|
|
||||||
{
|
|
||||||
await SendExternalUserJoinEmail(new TrialExternalUserSendEmail()
|
|
||||||
{
|
|
||||||
BaseUrl = addOrEditTrialExternalUser.BaseUrl,
|
|
||||||
RouteUrl = addOrEditTrialExternalUser.RouteUrl,
|
|
||||||
TrialId = addOrEditTrialExternalUser.TrialId,
|
|
||||||
SendUsers = new List<UserEmail>()
|
|
||||||
{
|
{
|
||||||
new UserEmail()
|
new UserEmail()
|
||||||
{
|
{
|
||||||
|
@ -199,12 +206,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
SystemUserId=addEntity.SystemUserId
|
SystemUserId=addEntity.SystemUserId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(addEntity.Id.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(addEntity.Id.ToString());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue