@@ -3,6 +3,7 @@ using FellowOakDicom;
|
||||
using FellowOakDicom.Media;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using NPOI.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -160,7 +161,7 @@ namespace IRaCIS.Core.Application.Helper
|
||||
}
|
||||
|
||||
|
||||
public static async Task GenerateStudyDIR(List<StudyDIRInfo> list, Dictionary<string, string> dic,string dirSavePath)
|
||||
public static async Task GenerateStudyDIR(List<StudyDIRInfo> list, Dictionary<string, string> dic, string? dirSavePath = null, Stream? outputStream = null)
|
||||
{
|
||||
var mappings = new List<string>();
|
||||
int index = 1;
|
||||
@@ -228,9 +229,18 @@ namespace IRaCIS.Core.Application.Helper
|
||||
|
||||
//有实际的文件
|
||||
if (mappings.Count > 0)
|
||||
{
|
||||
{
|
||||
// 保存 DICOMDIR 到临时文件 不能直接写入到流种
|
||||
await dicomDir.SaveAsync(dirSavePath);
|
||||
|
||||
if (dirSavePath.IsNotNullOrEmpty())
|
||||
{
|
||||
await dicomDir.SaveAsync(dirSavePath);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
await dicomDir.SaveAsync(outputStream);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -948,7 +948,7 @@ public class OSSService(IOptionsMonitor<ObjectStoreServiceOptions> options,
|
||||
lock (_tokenLock)
|
||||
{
|
||||
if (AliyunOSSTempToken == null ||
|
||||
AliyunOSSTempToken.Expiration <= DateTime.UtcNow.AddMinutes(15))
|
||||
AliyunOSSTempToken.Expiration <= DateTime.Now.AddMinutes(15))
|
||||
{
|
||||
GetObjectStoreTempToken();
|
||||
|
||||
@@ -961,7 +961,7 @@ public class OSSService(IOptionsMonitor<ObjectStoreServiceOptions> options,
|
||||
{
|
||||
|
||||
|
||||
if (AWSTempToken != null && AWSTempToken.Expiration > DateTime.UtcNow.AddMinutes(15))
|
||||
if (AWSTempToken != null && AWSTempToken.Expiration > DateTime.Now.AddMinutes(15))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -969,7 +969,7 @@ public class OSSService(IOptionsMonitor<ObjectStoreServiceOptions> options,
|
||||
lock (_tokenLock)
|
||||
{
|
||||
if (AWSTempToken == null ||
|
||||
AWSTempToken.Expiration <= DateTime.UtcNow.AddMinutes(15))
|
||||
AWSTempToken.Expiration <= DateTime.Now.AddMinutes(15))
|
||||
{
|
||||
GetObjectStoreTempToken();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user