| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -22,6 +22,7 @@ using Volo.Abp; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					using Volo.Abp.Application.Dtos; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					using Volo.Abp.Application.Services; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					using Volo.Abp.Domain.Repositories; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					using Volo.Abp.Users; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					namespace Shentun.Peis.PacsBusiness | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					{ | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -46,6 +47,9 @@ namespace Shentun.Peis.PacsBusiness | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        private readonly RegisterCheckPictureAppService _registerCheckPictureAppService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        private readonly IRepository<RegisterCheckAsbitem, Guid> _registerCheckAsbitemRepository; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        private readonly IRepository<Asbitem, Guid> _asbitemRepository; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        private readonly ICurrentUser _currentUser; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        private readonly IRepository<UserItemType> _userItemTypeRepository; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        public PacsBusinessAppService( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IConfiguration configuration, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IRepository<RegisterCheck, Guid> registerCheckRepository, | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -60,7 +64,9 @@ namespace Shentun.Peis.PacsBusiness | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            SumSummaryReportAppService sumSummaryReportAppService, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            RegisterCheckPictureAppService registerCheckPictureAppService, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IRepository<RegisterCheckAsbitem, Guid> registerCheckAsbitemRepository, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IRepository<Asbitem, Guid> asbitemRepository) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IRepository<Asbitem, Guid> asbitemRepository, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            ICurrentUser currentUser, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IRepository<UserItemType> userItemTypeRepository) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            _configuration = configuration; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            _registerCheckRepository = registerCheckRepository; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -76,6 +82,8 @@ namespace Shentun.Peis.PacsBusiness | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            _registerCheckPictureAppService = registerCheckPictureAppService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            _registerCheckAsbitemRepository = registerCheckAsbitemRepository; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            _asbitemRepository = asbitemRepository; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            _currentUser = currentUser; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            _userItemTypeRepository = userItemTypeRepository; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -327,6 +335,7 @@ namespace Shentun.Peis.PacsBusiness | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            patientName = patientRegister.PatientName, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            checkRequestNo = registerCheck.CheckRequestNo, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            asbitemName = asbitem.DisplayName, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            asbitemId = registerCheckAsbitem.AsbitemId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            pacsCheckDate = registerCheck.PacsCheckDate, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            pacsUploadDate = registerCheck.PacsUploadDate | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        }; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -358,6 +367,34 @@ namespace Shentun.Peis.PacsBusiness | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            #region 增加项目类别权限
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            string AdminId = _configuration.GetValue<string>("AdminId"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (_currentUser.Id == null) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                new PagedResultDto<GetPatientRegisterPacsCheckDto>(0, new List<GetPatientRegisterPacsCheckDto>()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (_currentUser.Id.Value != Guid.Parse(AdminId)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                var asbitemIds = (from userItemType in await _userItemTypeRepository.GetQueryableAsync() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                  join asbitem in await _asbitemRepository.GetQueryableAsync() on userItemType.ItemTypeId equals asbitem.ItemTypeId | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                  where userItemType.UserId == _currentUser.Id.Value | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                  select asbitem.Id).ToList(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (asbitemIds.Any()) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    query = query.Where(m => asbitemIds.Contains(m.asbitemId)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    new PagedResultDto<GetPatientRegisterPacsCheckDto>(0, new List<GetPatientRegisterPacsCheckDto>()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            #endregion
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            var checkRequestNoGroup = query.ToList().GroupBy(g => g.checkRequestNo); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -374,7 +411,7 @@ namespace Shentun.Peis.PacsBusiness | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    PacsUploadDate = DataHelper.ConversionDateToString(s.FirstOrDefault().pacsUploadDate) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                }).ToList(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return new PagedResultDto<GetPatientRegisterPacsCheckDto>(totalCount, entListDto); ; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return new PagedResultDto<GetPatientRegisterPacsCheckDto>(totalCount, entListDto); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					
  |