From 5a31e16c65f427cacfb796c970b42dd777ec16ee Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 11 Apr 2025 14:06:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/QC/QCOperationService.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index d56326c42..a4aa159cf 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -10,6 +10,7 @@ using Medallion.Threading; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; +using Org.BouncyCastle.Asn1.Cmp; using System.ComponentModel.DataAnnotations; using System.Data; @@ -268,6 +269,12 @@ namespace IRaCIS.Core.Application.Image.QA throw new BusinessValidationFailedException(_localizer["QCOperation_HaveApplyedImageBack"]); } + if (_qcChallengeRepository.Any(t => t.SubjectVisitId == subjectVisitId && t.IsClosed==false && t.ReuploadEnum==QCChanllengeReuploadEnum.CRCRequestReupload )) + { + throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]); + } + + var sv = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId)).IfNullThrowException(); if (sv.RequestBackState == RequestBackStateEnum.CRC_RequestBack) @@ -547,13 +554,13 @@ namespace IRaCIS.Core.Application.Image.QA if (await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).AnyAsync(t => t.SubjectVisitImageBackRecordList.Any(t => t.ImageBackState == ImageBackStateEnum.None))) { // 该访视已在其他途径申请影像回退中,不允许申请 - throw new BusinessValidationFailedException(_localizer["QCOperation_HaveApplyedImageBack"]); + throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]); } if (sv.RequestBackState == RequestBackStateEnum.CRC_RequestBack) { // 该访视已在其他途径申请影像回退中,不允许申请 - throw new BusinessValidationFailedException(_localizer["QCOperation_HaveApplyedImageBack"]); + throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]); } @@ -2324,13 +2331,13 @@ namespace IRaCIS.Core.Application.Image.QA if (await _subjectVisitRepository.Where(t => t.Id == sv.Id).AnyAsync(t => t.SubjectVisitImageBackRecordList.Any(t => t.ImageBackState == ImageBackStateEnum.None))) { // 该访视已在其他途径申请影像回退中,不允许申请 - throw new BusinessValidationFailedException(_localizer["QCOperation_HaveApplyedImageBack"]); + throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]); } if (sv.RequestBackState == RequestBackStateEnum.CRC_RequestBack) { // 该访视已在其他途径申请影像回退中,不允许申请 - throw new BusinessValidationFailedException(_localizer["QCOperation_HaveApplyedImageBack"]); + throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]); } if (qcChallenge.ReuploadEnum != QCChanllengeReuploadEnum.None && qcChallenge.ReuploadEnum != QCChanllengeReuploadEnum.CRCReuploaded)