| 
					
					
						
							
						
					
					
				 | 
				@ -22,6 +22,7 @@ using Volo.Abp; | 
			
		
		
	
		
			
				 | 
				 | 
				using Volo.Abp.Application.Dtos; | 
				 | 
				 | 
				using Volo.Abp.Application.Dtos; | 
			
		
		
	
		
			
				 | 
				 | 
				using Volo.Abp.Application.Services; | 
				 | 
				 | 
				using Volo.Abp.Application.Services; | 
			
		
		
	
		
			
				 | 
				 | 
				using Volo.Abp.Domain.Repositories; | 
				 | 
				 | 
				using Volo.Abp.Domain.Repositories; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				using Volo.Abp.Users; | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				namespace Shentun.Peis.PacsBusiness | 
				 | 
				 | 
				namespace Shentun.Peis.PacsBusiness | 
			
		
		
	
		
			
				 | 
				 | 
				{ | 
				 | 
				 | 
				{ | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -46,6 +47,9 @@ namespace Shentun.Peis.PacsBusiness | 
			
		
		
	
		
			
				 | 
				 | 
				        private readonly RegisterCheckPictureAppService _registerCheckPictureAppService; | 
				 | 
				 | 
				        private readonly RegisterCheckPictureAppService _registerCheckPictureAppService; | 
			
		
		
	
		
			
				 | 
				 | 
				        private readonly IRepository<RegisterCheckAsbitem, Guid> _registerCheckAsbitemRepository; | 
				 | 
				 | 
				        private readonly IRepository<RegisterCheckAsbitem, Guid> _registerCheckAsbitemRepository; | 
			
		
		
	
		
			
				 | 
				 | 
				        private readonly IRepository<Asbitem, Guid> _asbitemRepository; | 
				 | 
				 | 
				        private readonly IRepository<Asbitem, Guid> _asbitemRepository; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        private readonly ICurrentUser _currentUser; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        private readonly IRepository<UserItemType> _userItemTypeRepository; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				        public PacsBusinessAppService( | 
				 | 
				 | 
				        public PacsBusinessAppService( | 
			
		
		
	
		
			
				 | 
				 | 
				            IConfiguration configuration, | 
				 | 
				 | 
				            IConfiguration configuration, | 
			
		
		
	
		
			
				 | 
				 | 
				            IRepository<RegisterCheck, Guid> registerCheckRepository, | 
				 | 
				 | 
				            IRepository<RegisterCheck, Guid> registerCheckRepository, | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -60,7 +64,9 @@ namespace Shentun.Peis.PacsBusiness | 
			
		
		
	
		
			
				 | 
				 | 
				            SumSummaryReportAppService sumSummaryReportAppService, | 
				 | 
				 | 
				            SumSummaryReportAppService sumSummaryReportAppService, | 
			
		
		
	
		
			
				 | 
				 | 
				            RegisterCheckPictureAppService registerCheckPictureAppService, | 
				 | 
				 | 
				            RegisterCheckPictureAppService registerCheckPictureAppService, | 
			
		
		
	
		
			
				 | 
				 | 
				            IRepository<RegisterCheckAsbitem, Guid> registerCheckAsbitemRepository, | 
				 | 
				 | 
				            IRepository<RegisterCheckAsbitem, Guid> registerCheckAsbitemRepository, | 
			
		
		
	
		
			
				 | 
				 | 
				            IRepository<Asbitem, Guid> asbitemRepository) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            IRepository<Asbitem, Guid> asbitemRepository, | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            ICurrentUser currentUser, | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            IRepository<UserItemType> userItemTypeRepository) | 
			
		
		
	
		
			
				 | 
				 | 
				        { | 
				 | 
				 | 
				        { | 
			
		
		
	
		
			
				 | 
				 | 
				            _configuration = configuration; | 
				 | 
				 | 
				            _configuration = configuration; | 
			
		
		
	
		
			
				 | 
				 | 
				            _registerCheckRepository = registerCheckRepository; | 
				 | 
				 | 
				            _registerCheckRepository = registerCheckRepository; | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -76,6 +82,8 @@ namespace Shentun.Peis.PacsBusiness | 
			
		
		
	
		
			
				 | 
				 | 
				            _registerCheckPictureAppService = registerCheckPictureAppService; | 
				 | 
				 | 
				            _registerCheckPictureAppService = registerCheckPictureAppService; | 
			
		
		
	
		
			
				 | 
				 | 
				            _registerCheckAsbitemRepository = registerCheckAsbitemRepository; | 
				 | 
				 | 
				            _registerCheckAsbitemRepository = registerCheckAsbitemRepository; | 
			
		
		
	
		
			
				 | 
				 | 
				            _asbitemRepository = asbitemRepository; | 
				 | 
				 | 
				            _asbitemRepository = asbitemRepository; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            _currentUser = currentUser; | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            _userItemTypeRepository = userItemTypeRepository; | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				        } | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -327,6 +335,7 @@ namespace Shentun.Peis.PacsBusiness | 
			
		
		
	
		
			
				 | 
				 | 
				                            patientName = patientRegister.PatientName, | 
				 | 
				 | 
				                            patientName = patientRegister.PatientName, | 
			
		
		
	
		
			
				 | 
				 | 
				                            checkRequestNo = registerCheck.CheckRequestNo, | 
				 | 
				 | 
				                            checkRequestNo = registerCheck.CheckRequestNo, | 
			
		
		
	
		
			
				 | 
				 | 
				                            asbitemName = asbitem.DisplayName, | 
				 | 
				 | 
				                            asbitemName = asbitem.DisplayName, | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                            asbitemId = registerCheckAsbitem.AsbitemId, | 
			
		
		
	
		
			
				 | 
				 | 
				                            pacsCheckDate = registerCheck.PacsCheckDate, | 
				 | 
				 | 
				                            pacsCheckDate = registerCheck.PacsCheckDate, | 
			
		
		
	
		
			
				 | 
				 | 
				                            pacsUploadDate = registerCheck.PacsUploadDate | 
				 | 
				 | 
				                            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); | 
				 | 
				 | 
				            var checkRequestNoGroup = query.ToList().GroupBy(g => g.checkRequestNo); | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -374,7 +411,7 @@ namespace Shentun.Peis.PacsBusiness | 
			
		
		
	
		
			
				 | 
				 | 
				                    PacsUploadDate = DataHelper.ConversionDateToString(s.FirstOrDefault().pacsUploadDate) | 
				 | 
				 | 
				                    PacsUploadDate = DataHelper.ConversionDateToString(s.FirstOrDefault().pacsUploadDate) | 
			
		
		
	
		
			
				 | 
				 | 
				                }).ToList(); | 
				 | 
				 | 
				                }).ToList(); | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				            return new PagedResultDto<GetPatientRegisterPacsCheckDto>(totalCount, entListDto); ; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            return new PagedResultDto<GetPatientRegisterPacsCheckDto>(totalCount, entListDto); | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				        } | 
			
		
		
	
		
			
				 | 
				 | 
				    } | 
				 | 
				 | 
				    } | 
			
		
		
	
	
		
			
				| 
					
					
					
				 | 
				
  |