影像上传增加文件大小
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
1778d45481
commit
0acb7ca987
|
@ -301,7 +301,7 @@ namespace IRaCIS.Core.SCP.Service
|
|||
{
|
||||
try
|
||||
{
|
||||
var scpStudyId = await dicomArchiveService.ArchiveDicomFileAsync(request.Dataset, _trialId, _trialSiteId, storeRelativePath, Association.CallingAE, Association.CalledAE);
|
||||
var scpStudyId = await dicomArchiveService.ArchiveDicomFileAsync(request.Dataset, _trialId, _trialSiteId, storeRelativePath, Association.CallingAE, Association.CalledAE,fileSize);
|
||||
|
||||
if (!_SCPStudyIdList.Contains(scpStudyId))
|
||||
{
|
||||
|
|
|
@ -12,6 +12,7 @@ using IRaCIS.Core.SCP.Service;
|
|||
using IRaCIS.Core.Infra.EFCore;
|
||||
using MassTransit;
|
||||
using System.Runtime.Intrinsics.X86;
|
||||
using Serilog.Sinks.File;
|
||||
|
||||
namespace IRaCIS.Core.SCP.Service
|
||||
{
|
||||
|
@ -51,7 +52,7 @@ namespace IRaCIS.Core.SCP.Service
|
|||
/// <param name="dataset"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public async Task<Guid> ArchiveDicomFileAsync(DicomDataset dataset, Guid trialId, Guid trialSiteId, string fileRelativePath, string callingAE, string calledAE)
|
||||
public async Task<Guid> ArchiveDicomFileAsync(DicomDataset dataset, Guid trialId, Guid trialSiteId, string fileRelativePath, string callingAE, string calledAE,long fileSize)
|
||||
{
|
||||
string studyInstanceUid = dataset.GetString(DicomTag.StudyInstanceUID);
|
||||
string seriesInstanceUid = dataset.GetString(DicomTag.SeriesInstanceUID);
|
||||
|
@ -270,7 +271,10 @@ namespace IRaCIS.Core.SCP.Service
|
|||
WindowCenter = dataset.GetSingleValueOrDefault(DicomTag.WindowCenter, string.Empty),
|
||||
WindowWidth = dataset.GetSingleValueOrDefault(DicomTag.WindowWidth, string.Empty),
|
||||
|
||||
Path = fileRelativePath
|
||||
Path = fileRelativePath,
|
||||
|
||||
FileSize= fileSize,
|
||||
|
||||
};
|
||||
|
||||
++findStudy.InstanceCount;
|
||||
|
@ -300,7 +304,7 @@ namespace IRaCIS.Core.SCP.Service
|
|||
}
|
||||
else
|
||||
{
|
||||
await _instanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == instanceId, u => new SCPInstance() { Path = fileRelativePath });
|
||||
await _instanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == instanceId, u => new SCPInstance() { Path = fileRelativePath,FileSize=fileSize });
|
||||
}
|
||||
|
||||
//await _studyRepository.SaveChangesAsync();
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace IRaCIS.Core.SCP.Service
|
|||
{
|
||||
public interface IDicomArchiveService
|
||||
{
|
||||
Task<Guid> ArchiveDicomFileAsync(DicomDataset dicomDataset,Guid trialId,Guid trialSiteId, string fileRelativePath,string callingAE,string calledAE);
|
||||
Task<Guid> ArchiveDicomFileAsync(DicomDataset dicomDataset,Guid trialId,Guid trialSiteId, string fileRelativePath,string callingAE,string calledAE,long fileSize);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -368,7 +368,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_RequestError"]);
|
||||
}
|
||||
|
||||
studyMonitor.FileSize = (decimal)HttpContext.Request.ContentLength;
|
||||
studyMonitor.FileSize = (long)HttpContext.Request.ContentLength;
|
||||
studyMonitor.FileCount = archiveResult.ReceivedFileCount;
|
||||
studyMonitor.FailedFileCount = archiveResult.ErrorFiles.Count;
|
||||
studyMonitor.IsDicomReUpload = archiveStudyCommand.AbandonStudyId != null;
|
||||
|
@ -471,7 +471,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
foreach (var item in incommand.UploadedFileList)
|
||||
{
|
||||
await _noneDicomStudyFileRepository.AddAsync(new NoneDicomStudyFile() { FileName = item.FileName, Path = item.FilePath, NoneDicomStudyId = noneDicomStudyId,FileType=item.FileType });
|
||||
await _noneDicomStudyFileRepository.AddAsync(new NoneDicomStudyFile() { FileName = item.FileName, Path = item.FilePath, NoneDicomStudyId = noneDicomStudyId,FileType=item.FileType,FileSize=item.FileFize });
|
||||
|
||||
}
|
||||
var uploadFinishedTime = DateTime.Now;
|
||||
|
|
|
@ -184,7 +184,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public decimal FileSize { get; set; }
|
||||
public long FileSize { get; set; }
|
||||
|
||||
public bool IsDicomReUpload { get; set; }
|
||||
|
||||
|
@ -206,7 +206,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
|
||||
public decimal FileSize { get; set; }
|
||||
public long FileSize { get; set; }
|
||||
|
||||
public bool IsDicomReUpload { get; set; }
|
||||
|
||||
|
@ -360,5 +360,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string Path { get; set; } = string.Empty;
|
||||
|
||||
public string HtmlPath { get; set; } = string.Empty;
|
||||
|
||||
public decimal FileFize { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,5 +53,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
public string HtmlPath { get; set; }=string.Empty;
|
||||
|
||||
public long? FileSize { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,5 +94,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public bool IsFromPACS { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public int FailedFileCount { get; set; }
|
||||
|
||||
|
||||
public decimal FileSize { get; set; }
|
||||
public long FileSize { get; set; }
|
||||
|
||||
public string IP { get; set; }
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
public string FileType { get; set; }
|
||||
|
||||
public decimal? FileSize { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -46,6 +46,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public bool Anonymize { get; set; }
|
||||
public string Path { get; set; } = string.Empty;
|
||||
|
||||
public long? FileSize { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -52,5 +52,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
public string HtmlPath { get; set; }=string.Empty;
|
||||
|
||||
public long? FileSize { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue