影像转发提交
parent
68cf8c5e42
commit
25555d92dd
|
@ -362,3 +362,4 @@ MigrationBackup/
|
|||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
/UploadFile/Check
|
||||
/TrialData/281bdb09-f792-4faa-de18-08da0e042672/50d0cf71-ee4d-4e54-af06-490f8be1bff1/72b8ef0b-4adc-465e-fa25-08da122bbd9c/eb53c5e2-6307-42f3-d710-08da122bbde1/Dicom
|
||||
|
|
|
@ -1025,6 +1025,15 @@
|
|||
<summary> 指定资源Id,渲染Dicom序列的Jpeg预览图像 </summary>
|
||||
<param name="seriesId"> Dicom序列的Id </param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.TrialSiteUserListExport(System.Guid,System.Boolean,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserSurvey})">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="trialId"></param>
|
||||
<param name="isAllSiteUser">isAllSiteUser true : site用户列表,false :Site调研汇总表</param>
|
||||
<returns></returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.GetSiteCRCList(IRaCIS.Core.Application.Contracts.DTO.SiteCrcQueryDTO)">
|
||||
<summary>Pannel 进去 SiteTab </summary>
|
||||
</member>
|
||||
|
|
|
@ -1725,7 +1725,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
var info = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).ProjectTo<DicomTrialSiteSubjectInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
var targetPath = Path.Combine("/IMPORT-IMAGES", info.TrialCode + "_" + info.SubjectCode + "_" + info.VisitName);
|
||||
var targetPath ="/IMPORT-IMAGES/"+info.TrialCode + "_" + info.SubjectCode + "_" + info.VisitName;
|
||||
|
||||
var path = _dicomFileStoreHelper.GetSubjectVisitPath(info.TrialId, info.SiteId, info.SubjectId, info.SubjectVisitId);
|
||||
|
||||
|
@ -1739,49 +1739,60 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
HostName = "CS-690-sftp.mint-imaging.com",
|
||||
UserName = "zdong",
|
||||
Password = "Everest@2021",
|
||||
//GiveUpSecurityAndAcceptAnySshHostKey = true,
|
||||
SshHostKeyFingerprint = @"ecdsa-sha2-nistp384 384 59gkjJ5lMwv3jsB8Wz2B35tBAIor5pSd8PcJYtoamPo="
|
||||
};
|
||||
|
||||
using (Session session = new Session())
|
||||
{
|
||||
var studyFolders = (new DirectoryInfo(path)).GetDirectories();
|
||||
|
||||
session.Open(sessionOptions);
|
||||
|
||||
if (!session.FileExists(targetPath))
|
||||
{
|
||||
session.CreateDirectory(targetPath);
|
||||
}
|
||||
|
||||
var files = (new DirectoryInfo(path)).GetFiles();
|
||||
|
||||
foreach (var file in files)
|
||||
foreach (var studyFolder in studyFolders)
|
||||
{
|
||||
if (file.Extension.Contains("dcm"))
|
||||
if (!session.FileExists(Path.Combine(targetPath,studyFolder.Name))
|
||||
{
|
||||
string remoteFilePath =
|
||||
RemotePath.TranslateLocalPathToRemote(file.FullName, path, targetPath);
|
||||
session.CreateDirectory(targetPath);
|
||||
}
|
||||
|
||||
var result = session.PutFiles(file.FullName, remoteFilePath, false);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
foreach (var file in studyFolder.GetFiles())
|
||||
{
|
||||
if (file.Extension.Contains("dcm",StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
||||
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
|
||||
string remoteFilePath =
|
||||
RemotePath.TranslateLocalPathToRemote(file.FullName, studyFolder.FullName, targetPath);
|
||||
|
||||
return ResponseOutput.NotOk("Forward Failed");
|
||||
var result = session.PutFiles(file.FullName, remoteFilePath, false);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
||||
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
|
||||
|
||||
return ResponseOutput.NotOk("Forward Failed" + result.Failures.ToString() + result.ToJson());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
|
||||
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
||||
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
||||
u => new SubjectVisit() { ForwardState = ForwardStateEnum.Forwarded });
|
||||
|
@ -1789,5 +1800,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure.ExpressionExtend;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
|
@ -30,7 +29,14 @@ namespace IRaCIS.Core.Application.Services
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="trialId"></param>
|
||||
/// <param name="isAllSiteUser">isAllSiteUser true : site用户列表,false :Site调研汇总表</param>
|
||||
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
[HttpGet, Route("{trialId:guid}/{isSiteUserNotAll:bool}")]
|
||||
[AllowAnonymous]
|
||||
public async Task<IActionResult> TrialSiteUserListExport(Guid trialId, bool isAllSiteUser,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using IRaCIS.Core.Infrastructure.ExpressionExtend;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
@ -235,5 +234,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue