修改影像下载检查过滤
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-11-24 15:48:07 +08:00
parent b2bcc37dab
commit 49e4980fd0
1 changed files with 13 additions and 0 deletions

View File

@ -3303,6 +3303,18 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task<IResponseOutput> GetDownloadPatientStudyInfo(PatientImageDownloadCommand inCommand)
{
var isAdminOrOA = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.Admin || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.OA || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin;
var currentUserHospitalGroupIdList = new List<Guid>();
if (!isAdminOrOA)
{
currentUserHospitalGroupIdList = _identityUserRepository.Where(t => t.Id == _userInfo.IdentityUserId).SelectMany(t => t.IdentityUserHospitalGroupList)
.Where(t => t.IsDisabled == false && t.HospitalGroup.IsEnable).Select(t => t.HospitalGroupId).ToList();
}
var patientIdList = inCommand.PatientIdList.Distinct().ToList();
var studyIdList = inCommand.SCPStudyIdList.Distinct().ToList();
@ -3316,6 +3328,7 @@ namespace IRaCIS.Application.Services
{
var list = _patientRepository.Where(t => patientIdList.Contains(t.Id))
.SelectMany(t => t.SCPStudyList.Where(t => studyIdList.Count > 0 ? studyIdList.Contains(t.Id) : true))
.Where(t => isAdminOrOA ? true : t.HospitalGroupList.Any(c => currentUserHospitalGroupIdList.Contains(c.HospitalGroupId)))
.SelectMany(t => t.InstanceList)
.Select(t => new StudyDIRInfo()
{