Merge branch 'Test.IRC' of http://192.168.3.69:2000/XCKJ/irc-netcore-api into Test.IRC
commit
e34f13bd6a
|
@ -856,7 +856,18 @@ namespace IRaCIS.Core.API.Controllers
|
|||
_userInfo = userInfo;
|
||||
}
|
||||
|
||||
/// <summary> 通用文件下载 </summary>
|
||||
[AllowAnonymous]
|
||||
[HttpGet("CommonDocument/DownloadCommonDoc")]
|
||||
public async Task<IActionResult> DownloadCommonFile(string code, [FromServices] IRepository<CommonDocument> _commonDocumentRepository)
|
||||
{
|
||||
var (filePath, fileName) = await FileStoreHelper.GetCommonDocPhysicalFilePathAsync(_hostEnvironment, _commonDocumentRepository, code);
|
||||
|
||||
new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(filePath), out var contentType);
|
||||
|
||||
return File(System.IO.File.OpenRead(filePath), contentType ?? "application/octet-stream", fileName);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传通用文档 比如一致性核查的 比如导出的excel 模板
|
||||
|
|
|
@ -117,6 +117,12 @@ namespace IRaCIS.Core.Application.Service.Third_partyProject.DTO
|
|||
public string Modality { get; set; }
|
||||
}
|
||||
|
||||
public class InstancePathDTO
|
||||
{
|
||||
public string StudyCode { get; set; }
|
||||
public string InstancePath { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -192,9 +192,9 @@ namespace IRaCIS.Core.Application.Service.Third_partyProject
|
|||
/// <param name="_dicomSeriesRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<string>> GetStudyModalityOSSPath(List<Guid> seriesIdList, [FromServices] IRepository<DicomSeries> _dicomSeriesRepository)
|
||||
public async Task<List<InstancePathDTO>> GetStudyModalityOSSPath(List<Guid> seriesIdList, [FromServices] IRepository<DicomSeries> _dicomSeriesRepository)
|
||||
{
|
||||
return await _dicomSeriesRepository.Where(t => seriesIdList.Contains(t.Id)).SelectMany(t => t.DicomInstanceList).Select(t => t.Path).ToListAsync();
|
||||
return await _dicomSeriesRepository.Where(t => seriesIdList.Contains(t.Id)).SelectMany(t => t.DicomInstanceList).Select(t => new InstancePathDTO() {InstancePath= t.Path,StudyCode=t.DicomStudy.StudyCode } ).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,10 @@ namespace IRaCIS.Core.Domain.Models
|
|||
[ForeignKey("SeriesId")]
|
||||
public DicomSeries DicomSerie { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("StudyId")]
|
||||
public DicomStudy DicomStudy { get; set; }
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
public Guid SeqId { get; set; }
|
||||
|
|
Loading…
Reference in New Issue