From 993fd4ddaa64bea8d903474473ef39fa4067aae9 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 24 May 2022 10:33:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/QC/DTO/QARecordViewModel.cs | 12 ++++++++++++ .../Service/QC/QCOperationService.cs | 10 +++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs index f6ed2de44..46e62e4b1 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs @@ -120,6 +120,18 @@ namespace IRaCIS.Core.Application.Contracts.DTO public string Modalities { get; set; } = String.Empty; } + + public class CloseQCChallengeDto + { + public Guid qcChallengeId { get; set; } + + + public Guid subjectVisitId { get; set; } + public QCChallengeCloseEnum closeEnum { get; set; } + public string closeReason { get; set; } + } + + public class QCChallengeCommand { public Guid? Id { get; set; } diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index a1fbb9465..c804c49d9 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -152,15 +152,15 @@ namespace IRaCIS.Core.Application.Image.QA [TypeFilter(typeof(TrialResourceFilter))] [UnitOfWork] //[Authorize(Policy = "ImageQCPolicy")] - public async Task CloseQCChallenge(Guid qcChallengeId, Guid subjectVisitId, [FromRoute] QCChallengeCloseEnum closeEnum, [FromRoute] string closeReason) + public async Task CloseQCChallenge(CloseQCChallengeDto input) { if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC) { - await VerifyIsCanQCAsync(null, subjectVisitId); + await VerifyIsCanQCAsync(null, input.subjectVisitId); } - var dbQCChallenge = (await _qcChallengeRepository.FirstOrDefaultAsync(t => t.Id == qcChallengeId)).IfNullThrowException(); + var dbQCChallenge = (await _qcChallengeRepository.FirstOrDefaultAsync(t => t.Id == input.qcChallengeId)).IfNullThrowException(); if (dbQCChallenge.ReuploadEnum == QCChanllengeReuploadEnum.CRCRequestReupload || dbQCChallenge.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload) @@ -171,7 +171,7 @@ namespace IRaCIS.Core.Application.Image.QA #region 之前 - dbQCChallenge.CloseResonEnum = closeEnum; + dbQCChallenge.CloseResonEnum = input.closeEnum; dbQCChallenge.IsClosed = true; @@ -183,7 +183,7 @@ namespace IRaCIS.Core.Application.Image.QA SubjectVisitId = dbQCChallenge.SubjectVisitId, UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt, QCChallengeId = dbQCChallenge.Id, - TalkContent = "关闭原因: " + closeReason + TalkContent = "关闭原因: " + input.closeReason }); var success = await _qcChallengeRepository.SaveChangesAsync();