diff --git a/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs b/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs index ddc1f5ddd..32fde311f 100644 --- a/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs @@ -9,7 +9,7 @@ namespace IRaCIS.Core.Application.Service /// 医生文档关联关系维护 /// [ApiExplorerSettings(GroupName = "Reviewer")] - public class AttachmentService(IRepository _attachmentrepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IAttachmentService + public class AttachmentService(IRepository _attachmentrepository, IRepository _doctorrepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IAttachmentService { @@ -35,6 +35,11 @@ namespace IRaCIS.Core.Application.Service //} var success = await _attachmentrepository.BatchDeleteNoTrackingAsync(a => a.Id == param.Id); + + await _doctorrepository.BatchUpdateNoTrackingAsync(x => x.GCPId == param.Id, x => new Doctor() + { + GCPId= default(Guid), + }); return ResponseOutput.Result(success); }