| 
					
					
					
				 | 
				@ -1,7 +1,10 @@ | 
			
		
		
	
		
			
				 | 
				 | 
				using Microsoft.AspNetCore.Mvc; | 
				 | 
				 | 
				using Microsoft.AspNetCore.Mvc; | 
			
		
		
	
		
			
				 | 
				 | 
				using Microsoft.Extensions.Configuration; | 
				 | 
				 | 
				using Microsoft.Extensions.Configuration; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				using NPOI.POIFS.Storage; | 
			
		
		
	
		
			
				 | 
				 | 
				using Shentun.Peis.Enums; | 
				 | 
				 | 
				using Shentun.Peis.Enums; | 
			
		
		
	
		
			
				 | 
				 | 
				using Shentun.Peis.Models; | 
				 | 
				 | 
				using Shentun.Peis.Models; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				using Shentun.Peis.PatientRegisters; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				using Shentun.Peis.PrintReports; | 
			
		
		
	
		
			
				 | 
				 | 
				using Shentun.Peis.RegisterCheckPictures; | 
				 | 
				 | 
				using Shentun.Peis.RegisterCheckPictures; | 
			
		
		
	
		
			
				 | 
				 | 
				using System; | 
				 | 
				 | 
				using System; | 
			
		
		
	
		
			
				 | 
				 | 
				using System.Collections.Generic; | 
				 | 
				 | 
				using System.Collections.Generic; | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -141,9 +144,9 @@ namespace Shentun.Peis.PacsBusiness | 
			
		
		
	
		
			
				 | 
				 | 
				        { | 
				 | 
				 | 
				        { | 
			
		
		
	
		
			
				 | 
				 | 
				            var realPath = _configuration["DicomVirtualPath:RealPath"]; | 
				 | 
				 | 
				            var realPath = _configuration["DicomVirtualPath:RealPath"]; | 
			
		
		
	
		
			
				 | 
				 | 
				            var requestPath = _configuration["DicomVirtualPath:RequestPath"]; | 
				 | 
				 | 
				            var requestPath = _configuration["DicomVirtualPath:RequestPath"]; | 
			
		
		
	
		
			
				 | 
				 | 
				            if (string.IsNullOrWhiteSpace(input.RegisterCheckNo)) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            if (string.IsNullOrWhiteSpace(input.CheckRequestNo)) | 
			
		
		
	
		
			
				 | 
				 | 
				                throw new UserFriendlyException("条码号不能为空"); | 
				 | 
				 | 
				                throw new UserFriendlyException("条码号不能为空"); | 
			
		
		
	
		
			
				 | 
				 | 
				            var registerCheckEnt = await _registerCheckRepository.FirstOrDefaultAsync(f => f.CheckRequestNo == input.RegisterCheckNo); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            var registerCheckEnt = await _registerCheckRepository.FirstOrDefaultAsync(f => f.CheckRequestNo == input.CheckRequestNo); | 
			
		
		
	
		
			
				 | 
				 | 
				            if (registerCheckEnt == null) | 
				 | 
				 | 
				            if (registerCheckEnt == null) | 
			
		
		
	
		
			
				 | 
				 | 
				                throw new UserFriendlyException("条码号不正确"); | 
				 | 
				 | 
				                throw new UserFriendlyException("条码号不正确"); | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -172,5 +175,32 @@ namespace Shentun.Peis.PacsBusiness | 
			
		
		
	
		
			
				 | 
				 | 
				            } | 
				 | 
				 | 
				            } | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				        } | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        /// <summary>
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        /// 根据检查条码获取dicom文件
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        /// </summary>
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        /// <returns></returns>
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        [HttpPost("api/app/PacsBusiness/GetPacsDicomDataByCheckRequestNo")] | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        public async Task<List<RegisterCheckPacsDto>> GetPacsDicomDataByCheckRequestNoAsync(CheckRequestNoInputDto input) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            if (string.IsNullOrWhiteSpace(input.CheckRequestNo)) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                throw new UserFriendlyException("检查条码不能为空"); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            var registerCheckEnt = await _registerCheckRepository.FirstOrDefaultAsync(f => f.CheckRequestNo == input.CheckRequestNo); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            if (registerCheckEnt == null) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                throw new UserFriendlyException("检查条码不存在"); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            var registerCheckPacsList = await _registerCheckPacsRepository.GetListAsync(m => m.RegisterCheckId == registerCheckEnt.Id); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            var entListDto = registerCheckPacsList.Select(s => new RegisterCheckPacsDto | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                DicomPathName = s.DicomPathName, | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                DisplayOrder = s.DisplayOrder, | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                LocalPathName = s.LocalPathName | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            }).OrderBy(o => o.DisplayOrder).ToList(); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            return entListDto; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        } | 
			
		
		
	
		
			
				 | 
				 | 
				    } | 
				 | 
				 | 
				    } | 
			
		
		
	
		
			
				 | 
				 | 
				} | 
				 | 
				 | 
				} |