修改AE 测试
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2024-12-19 16:00:50 +08:00
parent 468224cae9
commit 98b0b36e3b
2 changed files with 12 additions and 4 deletions

View File

@ -12,6 +12,7 @@ using FellowOakDicom.Network.Client;
using FellowOakDicom.Network;
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infrastructure;
namespace IRaCIS.Core.Application.Service
{
/// <summary>
@ -81,6 +82,13 @@ namespace IRaCIS.Core.Application.Service
{
var find = await _dicomAERepository.FirstOrDefaultAsync(t => t.Id == dicomAEId);
var hirClient = await _dicomAERepository.FirstOrDefaultAsync(t => t.PacsTypeEnum == PacsType.HIRClient);
if (hirClient == null)
{
throw new BusinessValidationFailedException(_localizer["Patient_NoPacsClientAE"]);
}
if (find == null)
{
@ -92,7 +100,7 @@ namespace IRaCIS.Core.Application.Service
try
{
var client = DicomClientFactory.Create(find.IP, find.Port, false, "test-callingAE", find.CalledAE);
var client = DicomClientFactory.Create(find.IP, find.Port, false, hirClient.CalledAE, find.CalledAE);
client.NegotiateAsyncOps();

View File

@ -2914,9 +2914,9 @@ namespace IRaCIS.Application.Services
#endregion
private bool CEchoTest(DicomAE find)
private bool CEchoTest(DicomAE find,string clientAE)
{
var client = DicomClientFactory.Create(find.IP, find.Port, false, "test-callingAE", find.CalledAE);
var client = DicomClientFactory.Create(find.IP, find.Port, false, clientAE, find.CalledAE);
client.NegotiateAsyncOps();
@ -2969,7 +2969,7 @@ namespace IRaCIS.Application.Services
if (find != null)
{
//测试失败
if (!CEchoTest(find))
if (!CEchoTest(find,hirClient.CalledAE))
{
throw new BusinessValidationFailedException(_localizer["Patient_PacsAENotOnline"]);
}