From 0b937663ffe569191d822653773e77d25decf90b Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 14 Mar 2025 15:11:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Doctor/AttachmentService.cs | 4 +++- .../Service/Doctor/DTO/AttachmentModel.cs | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs b/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs index 6ef0bb145..79fda26c3 100644 --- a/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs @@ -152,7 +152,9 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task SetAuthorizedView(SetAttachmentAuthorizedView inDto) { - await _attachmentrepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new Attachment() { IsAuthorizedView = inDto.IsAuthorizedView }, true); + await _attachmentrepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new Attachment() { IsAuthorizedView = inDto.IsAuthorizedView }); + + await _attachmentrepository.SaveChangesAsync(); return ResponseOutput.Ok(); } diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs index 1b1eea265..db3662223 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs @@ -16,6 +16,11 @@ public Guid? TrialId { get; set; } + /// + /// 是否授权 + /// + + public bool IsAuthorizedView { get; set; } = false; public string BlindName { get; set; } = string.Empty; @@ -25,7 +30,7 @@ public string FullName => LastName + " / " + FirstName; public string LastName { get; set; } = string.Empty; - public string UserName { get; set; } + public string UserName { get; set; } = string.Empty; } public class SetAttachmentAuthorizedView