This commit is contained in:
he
2022-06-10 12:02:22 +08:00
parent d1068711b4
commit aebaa4b661
2 changed files with 11 additions and 13 deletions
@@ -52,7 +52,6 @@ namespace IRaCIS.Application.Services
var entity = _mapper.Map<ReadingClinicalData>(indto);
entity.ReadingClinicalDataPDFList = indto.AddFileList.Select(x => new ReadingClinicalDataPDF()
{
TrialId = entity.TrialId,
SubjectId= indto.SubjectId,
FileName=x.FileName,
@@ -71,9 +70,7 @@ namespace IRaCIS.Application.Services
{
var entity = (await _readingClinicalDataRepository.Where(t => t.Id == indto.Id, true).FirstOrDefaultAsync()).IfNullThrowException();
_mapper.Map(indto, entity);
await _readingClinicalDataPDFRepository.DeleteFromQueryAsync(x => indto.DeleteFileIds.Contains(x.Id));
var addFileList = indto.AddFileList.Select(x => new ReadingClinicalDataPDF()
{
@@ -94,6 +91,7 @@ namespace IRaCIS.Application.Services
}
/// <summary>
/// 删除
/// </summary>
@@ -102,6 +100,7 @@ namespace IRaCIS.Application.Services
[HttpDelete("{id:guid}")]
public async Task<IResponseOutput> DeleteReadingClinicalData(Guid id)
{
await _readingClinicalDataRepository.DeleteFromQueryAsync(x => x.Id == id, true);
return ResponseOutput.Result(true);
}