diff --git a/IRC.Core.SCP/Properties/launchSettings.json b/IRC.Core.SCP/Properties/launchSettings.json index d3d3ca4bc..11587df61 100644 --- a/IRC.Core.SCP/Properties/launchSettings.json +++ b/IRC.Core.SCP/Properties/launchSettings.json @@ -1,31 +1,14 @@ { "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:36358", - "sslPort": 0 - } - }, "profiles": { "Test_IRC_SCP": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "http://localhost:5243", + "applicationUrl": "http://localhost:6200", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "IRC_Test_SCP" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Test_IRC_SCP" } } - } } diff --git a/IRC.Core.SCP/Service/CStoreSCPService.cs b/IRC.Core.SCP/Service/CStoreSCPService.cs index a296bfd6f..949065199 100644 --- a/IRC.Core.SCP/Service/CStoreSCPService.cs +++ b/IRC.Core.SCP/Service/CStoreSCPService.cs @@ -102,29 +102,37 @@ namespace IRaCIS.Core.SCP.Service var trialDicomAEList = _trialDicomAERepository.Select(t => new { t.CalledAE, t.TrialId }).ToList(); var trialCalledAEList = trialDicomAEList.Select(t => t.CalledAE).ToList(); + Log.Logger.Information("当前系统配置:", string.Join('|', trialDicomAEList)); + var findCalledAE = trialDicomAEList.Where(t => t.CalledAE == association.CalledAE).FirstOrDefault(); var isCanReceiveIamge = false; - if (findCalledAE!=null) + if (findCalledAE != null) { _trialId = findCalledAE.TrialId; var _trialSiteDicomAERepository = _serviceProvider.GetService>(); - var findTrialSiteAE = _trialSiteDicomAERepository.Where(t=>t.CallingAE==association.CallingAE).FirstOrDefault(); + var findTrialSiteAE = _trialSiteDicomAERepository.Where(t => t.CallingAE == association.CallingAE).FirstOrDefault(); - if (findTrialSiteAE!=null) + if (findTrialSiteAE != null) { - _trialSiteId= findTrialSiteAE.TrialSiteId; + _trialSiteId = findTrialSiteAE.TrialSiteId; isCanReceiveIamge = true; } - } - - if (!trialCalledAEList.Contains(association.CalledAE) || isCanReceiveIamge==false) + + } + + if (association.CallingAE == "test-callingAE") + { + isCanReceiveIamge = true; + } + + if (!trialCalledAEList.Contains(association.CalledAE) || isCanReceiveIamge == false) { Log.Logger.Warning($"拒绝CalledAE:{association.CalledAE}的连接"); @@ -163,8 +171,8 @@ namespace IRaCIS.Core.SCP.Service _upload.EndTime = DateTime.Now; _upload.StudyCount = _SCPStudyIdList.Count; - _upload.TrialId=_trialId; - _upload.TrialSiteId=_trialSiteId; + _upload.TrialId = _trialId; + _upload.TrialSiteId = _trialSiteId; await _SCPImageUploadRepository.AddAsync(_upload, true); @@ -292,7 +300,7 @@ namespace IRaCIS.Core.SCP.Service { try { - var scpStudyId = await dicomArchiveService.ArchiveDicomFileAsync(request.Dataset,_trialId,_trialSiteId, storeRelativePath, Association.CallingAE, Association.CalledAE); + var scpStudyId = await dicomArchiveService.ArchiveDicomFileAsync(request.Dataset, _trialId, _trialSiteId, storeRelativePath, Association.CallingAE, Association.CalledAE); if (!_SCPStudyIdList.Contains(scpStudyId)) {