修改AE 测试
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
468224cae9
commit
98b0b36e3b
|
@ -12,6 +12,7 @@ using FellowOakDicom.Network.Client;
|
||||||
using FellowOakDicom.Network;
|
using FellowOakDicom.Network;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using IRaCIS.Core.Infrastructure;
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -81,6 +82,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
var find = await _dicomAERepository.FirstOrDefaultAsync(t => t.Id == dicomAEId);
|
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)
|
if (find == null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -92,7 +100,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
try
|
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();
|
client.NegotiateAsyncOps();
|
||||||
|
|
|
@ -2914,9 +2914,9 @@ namespace IRaCIS.Application.Services
|
||||||
#endregion
|
#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();
|
client.NegotiateAsyncOps();
|
||||||
|
@ -2969,7 +2969,7 @@ namespace IRaCIS.Application.Services
|
||||||
if (find != null)
|
if (find != null)
|
||||||
{
|
{
|
||||||
//测试失败
|
//测试失败
|
||||||
if (!CEchoTest(find))
|
if (!CEchoTest(find,hirClient.CalledAE))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["Patient_PacsAENotOnline"]);
|
throw new BusinessValidationFailedException(_localizer["Patient_PacsAENotOnline"]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue