上传再次增加判断

IRC_NewDev
hang 2024-07-31 13:42:49 +08:00
parent d3e7b3a8d8
commit 81aa7fb8ef
1 changed files with 20 additions and 4 deletions

View File

@ -145,6 +145,22 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })] [TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AddOrUpdateArchiveStudy(NewArchiveStudyCommand incommand) public async Task<IResponseOutput> AddOrUpdateArchiveStudy(NewArchiveStudyCommand incommand)
{ {
var @uploadLock = _distributedLockProvider.CreateLock($"UploadDicom");
using (await @uploadLock.AcquireAsync())
{
if (_provider.Exists($"StudyUid_{incommand.TrialId}_{incommand.Study.StudyInstanceUid}"))
{
//---当前已有人正在上传和归档该检查!
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_ArchiveInProgress"));
}
else
{
_provider.Set($"StudyUid_{incommand.TrialId}_{incommand.Study.StudyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
}
}
var modalitys = string.Empty; var modalitys = string.Empty;
try try