This commit is contained in:
2023-03-09 16:18:35 +08:00
3 changed files with 59 additions and 0 deletions
@@ -365,6 +365,36 @@ public static class FileStoreHelper
}
/// <summary>
/// 上传截图
/// </summary>
/// <param name="_hostEnvironment"></param>
/// <param name="fileName"></param>
/// <param name="trialId"></param>
/// <param name="siteid"></param>
/// <param name="subjectId"></param>
/// <param name="type"></param>
/// <returns></returns>
public static (string PhysicalPath, string RelativePath, string FileRealName) GetUploadPrintscreenFilePath(IWebHostEnvironment _hostEnvironment, string fileName, Guid trialId, Guid siteid, Guid subjectId)
{
var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
string uploadFolderPath = Path.Combine(rootPath, StaticData.Folder.TrialDataFolder, trialId.ToString(), siteid.ToString(), subjectId.ToString());
if (!Directory.Exists(uploadFolderPath)) Directory.CreateDirectory(uploadFolderPath);
var (trustedFileNameForFileStorage, fileRealName) = FileStoreHelper.GetStoreFileName(fileName);
var relativePath = $"/{StaticData.Folder.IRaCISDataFolder}/{StaticData.Folder.TrialDataFolder}/{trialId}/{siteid}/{subjectId}/{trustedFileNameForFileStorage}";
var serverFilePath = Path.Combine(uploadFolderPath, trustedFileNameForFileStorage);
return (serverFilePath, relativePath, fileRealName);
}
/// <summary>
/// 通用获取文件路径
/// </summary>
@@ -530,6 +530,7 @@ namespace IRaCIS.Core.Application.Services
});
result.AddRange(studyList);
result = result.Where(x => x.SeriesCount > 0).ToList();
return result;
//return ResponseOutput.Ok(studyList.Where(t => t.SeriesList.Count > 0).ToList());