Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
976f6d8224
|
@ -296,6 +296,14 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
var startTime = DateTime.Now;
|
||||
|
||||
|
||||
if (_provider.Exists($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}") && _provider.Get<Guid>($"StudyUid_{trialId}_{studyInstanceUid}").Value == _userInfo.Id)
|
||||
{
|
||||
_provider.Set($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}", _userInfo.Id, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//if (_provider.Exists($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}"))
|
||||
//{
|
||||
// //---当前已有人正在上传和归档该检查!
|
||||
|
|
|
@ -54,25 +54,46 @@ namespace IRaCIS.Core.API
|
|||
//先从默认里面去找
|
||||
if (isIRacisFile)
|
||||
{
|
||||
|
||||
|
||||
|
||||
#region 方式二
|
||||
|
||||
//var defaultFileProvider = new PhysicalFileProvider(iRaCISDefaultDataFolder);
|
||||
|
||||
//var staticFileOptions = new StaticFileOptions
|
||||
//{
|
||||
// FileProvider = defaultFileProvider,
|
||||
// RequestPath = $"/{StaticData.Folder.IRaCISDataFolder}",
|
||||
// ServeUnknownFileTypes = true,
|
||||
// DefaultContentType = "application/octet-stream"
|
||||
//};
|
||||
|
||||
//var a = defaultFileProvider.GetFileInfo(context.Request.Path).Exists;
|
||||
|
||||
//var staticFileMiddleware = new StaticFileMiddleware(_next, _hostingEnv, Options.Create(staticFileOptions), _loggerFactory);
|
||||
//await staticFileMiddleware.Invoke(context);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 文档上传默认会加wwwroot 奇怪...
|
||||
|
||||
var defaultFileProvider = new PhysicalFileProvider(FileStoreHelper.GetIRaCISRootPath(_hostingEnv));
|
||||
|
||||
var staticFileOptions = new StaticFileOptions
|
||||
{
|
||||
FileProvider = defaultFileProvider,
|
||||
RequestPath = $"/{StaticData.Folder.IRaCISDataFolder}",
|
||||
ServeUnknownFileTypes = true,
|
||||
DefaultContentType = "application/octet-stream"
|
||||
};
|
||||
|
||||
if (defaultFileProvider.GetFileInfo(context.Request.Path).Exists)
|
||||
if (defaultFileProvider.GetFileInfo(path).Exists)
|
||||
{
|
||||
|
||||
var actrualPath = defaultFileProvider.GetFileInfo(context.Request.Path).PhysicalPath;
|
||||
var actrualPath = defaultFileProvider.GetFileInfo(path).PhysicalPath;
|
||||
var actrualPath2 = defaultFileProvider.GetFileInfo(path).PhysicalPath;
|
||||
|
||||
await context.Response.SendFileAsync(new PhysicalFileInfo(new FileInfo(actrualPath)));
|
||||
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
//没找到
|
||||
|
@ -102,10 +123,10 @@ namespace IRaCIS.Core.API
|
|||
|
||||
|
||||
|
||||
if (otherFileProvider.GetFileInfo(context.Request.Path).Exists)
|
||||
if (otherFileProvider.GetFileInfo(path).Exists)
|
||||
{
|
||||
|
||||
var actrualPath = otherFileProvider.GetFileInfo(context.Request.Path).PhysicalPath;
|
||||
var actrualPath = otherFileProvider.GetFileInfo(path).PhysicalPath;
|
||||
|
||||
//方式一
|
||||
await context.Response.SendFileAsync( new PhysicalFileInfo(new FileInfo(actrualPath)));
|
||||
|
|
|
@ -1526,7 +1526,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
var criterionConfig = await _trialReadingCriterionRepository.Where(x => x.Id == origenalTask.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.CriterionType, x.IsAdditionalAssessment, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
//更新申请信息
|
||||
var visitTaskReReadingAppply = await _visitTaskReReadingRepository.FirstOrDefaultAsync(t => t.Id == item.Id);
|
||||
visitTaskReReadingAppply.RequestReReadingConfirmUserId = _userInfo.Id;
|
||||
|
@ -1754,7 +1753,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
#endregion
|
||||
|
||||
|
||||
|
||||
//有序阅片
|
||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
||||
{
|
||||
|
|
|
@ -280,7 +280,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string AcquisitionNumber { get; set; } = string.Empty;
|
||||
public string TriggerTime { get; set; } = string.Empty;
|
||||
|
||||
public string IamgeResizePath { get; set; }
|
||||
public string IamgeResizePath { get; set; }=string.Empty;
|
||||
public List<AddInstanceDto> InstanceList { get; set; }
|
||||
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
else
|
||||
{
|
||||
//该序列掉了instance
|
||||
dicomSeries.InstanceCount += seriesItem.InstanceCount;
|
||||
dicomSeries.InstanceCount += seriesItem.InstanceList.Count;
|
||||
}
|
||||
|
||||
dicomSeries.IamgeResizePath = seriesItem.IamgeResizePath;
|
||||
|
@ -298,7 +298,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
|
||||
// 不管是新的序列 还是 该序列 掉了Instance 重传的时候 检查的instance 数量都会增加
|
||||
study.InstanceCount += seriesItem.InstanceCount;
|
||||
study.InstanceCount += seriesItem.InstanceList.Count;
|
||||
|
||||
}
|
||||
|
||||
|
@ -764,6 +764,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
if (_provider.Exists($"StudyUid_{trialId}_{studyInstanceUid}"))
|
||||
{
|
||||
|
||||
result.AllowUpload = false;
|
||||
|
||||
result.AllowReUpload = false;
|
||||
|
@ -829,7 +830,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
{
|
||||
lock (lockObj)
|
||||
{
|
||||
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromMinutes(30));
|
||||
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue