Uat_Study
parent
f9a46561e8
commit
39f14c8d11
|
@ -187,9 +187,13 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public int FailedFileCount { get; set; }
|
||||
|
||||
public decimal FileSize { get; set; }
|
||||
|
||||
public bool IsDicomReUpload { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public int FileCount { get; set; }
|
||||
}
|
||||
|
@ -207,7 +211,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
[NotDefault]
|
||||
public Guid StudyMonitorId { get; set; }
|
||||
|
||||
public bool IsAdd { get; set; }
|
||||
public int FailedFileCount { get; set; }
|
||||
|
||||
public AddOrUpdateStudyDto Study { get; set; }
|
||||
|
||||
|
|
|
@ -107,9 +107,10 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
IsDicom = true,
|
||||
IP = _userInfo.IP,
|
||||
|
||||
IsDicomReUpload = preArchiveStudyCommand.IsDicomReUpload,
|
||||
FileSize = preArchiveStudyCommand.FileSize,
|
||||
FileCount = preArchiveStudyCommand.FileCount,
|
||||
FailedFileCount = preArchiveStudyCommand.FailedFileCount,
|
||||
//FailedFileCount = preArchiveStudyCommand.FailedFileCount,
|
||||
|
||||
};
|
||||
|
||||
|
@ -130,10 +131,11 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
var studyMonitor = await _studyMonitorRepository.FirstOrDefaultAsync(t => t.Id == incommand.StudyMonitorId);
|
||||
studyMonitor.UploadFinishedTime = DateTime.Now;
|
||||
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
||||
studyMonitor.IsDicomReUpload = !incommand.IsAdd;
|
||||
studyMonitor.FailedFileCount = incommand.FailedFileCount;
|
||||
studyMonitor.IsSuccess = true;
|
||||
|
||||
if (incommand.IsAdd)
|
||||
//上传
|
||||
if (studyMonitor.IsDicomReUpload == false)
|
||||
{
|
||||
var study = _mapper.Map<DicomStudy>(incommand.Study);
|
||||
|
||||
|
@ -154,7 +156,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.StudyMaxCode}", study.Code, TimeSpan.FromMinutes(30));
|
||||
|
||||
}
|
||||
|
||||
|
||||
study.Id = IdentifierHelper.CreateGuid(incommand.Study.StudyInstanceUid, incommand.TrialId.ToString());
|
||||
|
@ -168,11 +169,14 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Distinct());
|
||||
SpecialArchiveStudyDeal(study);
|
||||
|
||||
|
||||
|
||||
await _dicomstudyRepository.AddAsync(study);
|
||||
|
||||
|
||||
studyMonitor.StudyId = study.Id;
|
||||
studyMonitor.StudyCode = study.StudyCode;
|
||||
}
|
||||
|
||||
|
||||
foreach (var seriesItem in incommand.Study.SeriesList)
|
||||
{
|
||||
var series = _mapper.Map<DicomSeries>(seriesItem);
|
||||
|
@ -204,8 +208,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
|
||||
|
||||
studyMonitor.StudyId = study.Id;
|
||||
studyMonitor.StudyCode = study.StudyCode;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -234,8 +237,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
//判断重复
|
||||
if (dicomSeries == null)
|
||||
{
|
||||
|
||||
|
||||
var series = _mapper.Map<DicomSeries>(seriesItem);
|
||||
|
||||
series.Id = seriesId;
|
||||
|
@ -283,11 +284,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
}
|
||||
|
||||
using (await _mutex.LockAsync())
|
||||
{
|
||||
|
||||
await _dicomstudyRepository.SaveChangesAsync();
|
||||
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue