From 3ccb3ff4dedce37519335f9c941fc49cf5efec57 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 26 Feb 2025 09:46:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=88=E6=9D=83=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Document/DTO/TrialFinalRecordViewModel.cs | 6 ++++++ .../Service/Document/TrialFinalRecordService.cs | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Document/DTO/TrialFinalRecordViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/TrialFinalRecordViewModel.cs index 7e850889d..9b16e9db4 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/TrialFinalRecordViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/TrialFinalRecordViewModel.cs @@ -21,6 +21,12 @@ public class TrialFinalRecordView : TrialFinalRecordAddOrEdit } +public class AuthorizedTrialFinalRecordInDto +{ + public List Ids { get; set; } + + public bool IsAuthorizedView { get; set; } +} public class TrialFinalRecordAddOrEdit { diff --git a/IRaCIS.Core.Application/Service/Document/TrialFinalRecordService.cs b/IRaCIS.Core.Application/Service/Document/TrialFinalRecordService.cs index def246946..4ba715632 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialFinalRecordService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialFinalRecordService.cs @@ -64,6 +64,18 @@ public class TrialFinalRecordService(IRepository _trialFinalRe } + /// + /// 授权文档 + /// + /// + /// + public async Task AuthorizedTrialFinalRecord(AuthorizedTrialFinalRecordInDto inDto) + { + await _trialFinalRecordRepository.UpdatePartialFromQueryAsync(t =>inDto.Ids.Contains(t.Id), t => new TrialFinalRecord() { IsAuthorizedView = inDto.IsAuthorizedView }); + await _trialFinalRecordRepository.SaveChangesAsync(); + return ResponseOutput.Ok(); + } + [HttpDelete("{trialFinalRecordId:guid}")] public async Task DeleteTrialFinalRecord(Guid trialFinalRecordId)