From 0c94ef86b0114d08813b500b7e8d58aa1d8174be Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 15 Jul 2024 16:27:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=93=E5=8C=85=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/DownloadAndUploadService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index dab399123..56a9364f2 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -11,6 +11,7 @@ using MassTransit; using MathNet.Numerics; using Medallion.Threading; using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Data; @@ -490,6 +491,15 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc public async Task RequestPackageAndAnonymizImage(Guid trialId, Guid subjectVisitId, bool isDicom, bool isAnonymize = true) { + var extralConfig = _repository.Where(t => t.Id == trialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty; + + var config= JsonConvert.DeserializeObject(extralConfig) ?? new TrialExtraConfig(); + + if(config.IsSupportQCDownloadImage==false) + { + throw new BusinessValidationFailedException("该项目不支持QC下载影像"); + } + var subjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId); var packState = isDicom ? subjectVisit.PackState : subjectVisit.NoDicomPackState;