From 7dc1205bb6b840037e1a5ac7b22fa3f55652d3fc Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 17 Mar 2025 14:14:01 +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/Document/TrialFileTypeService.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs b/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs index 4cb7ed22d..e4b67ac2c 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs @@ -105,6 +105,7 @@ public class TrialFileTypeService(IRepository _trialFileTypeRepos return ResponseOutput.Ok(); } + /// /// 复制系统数据到项目 /// @@ -217,6 +218,23 @@ public class TrialFileTypeService(IRepository _trialFileTypeRepos var file = await _trialFileRepository.Where(x => x.Id == trialFileType.FileRecordId).ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(); return file; } + + + /// + /// 删除入项记录 + /// + /// + /// + [HttpPost] + public async Task DeleteTrialTypeFile(Guid trialFileTypeId) + { + var trialFileType = await _trialFileTypeRepository.Where(x => x.Id == trialFileTypeId).FirstNotNullAsync(); + + await _trialFileRepository.DeleteFromQueryAsync(x => x.Id == trialFileType.FileRecordId, true); + await _trialFileTypeRepository.UpdatePartialFromQueryAsync(x => x.Id == trialFileTypeId, x => new TrialFileType() { FileRecordId = null }, true); + return ResponseOutput.Ok(); + } + }