From 6be2b2183a4011964c06c6ef1c7bdf9b7df50ae7 Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Fri, 16 Sep 2022 14:17:50 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/Reading/ReadingQuestionService.cs | 31 ++++++++++++-------
IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs | 5 +++
2 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
index 66c8812b2..06ebcad70 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
@@ -970,18 +970,25 @@ namespace IRaCIS.Application.Services
- /////
- ///// 删除系统问题标准
- /////
- /////
- /////
- //[HttpDelete("{readingQuestionCriterionSystemId:guid}")]
- //public async Task DeleteReadingQuestionCriterionSystem(Guid readingQuestionCriterionSystemId)
- //{
- // await _readingQuestionCriterionSystemRepository.DeleteFromQueryAsync(t => t.Id == readingQuestionCriterionSystemId);
- // var success = await _readingQuestionCriterionSystemRepository.SaveChangesAsync();
- // return ResponseOutput.Result(success);
- //}
+ ///
+ /// 删除系统问题标准
+ ///
+ ///
+ ///
+ [HttpDelete("{id:guid}")]
+ public async Task DeleteReadingQuestionCriterionSystem(Guid id)
+ {
+
+
+ if (await _readingQuestionCriterionTrialRepository.AnyAsync(x => x.IsConfirm && x.ReadingQuestionCriterionSystemId == id))
+ {
+ throw new BusinessValidationFailedException("当前标准被引用过了,不可以删除");
+ }
+
+ await _readingQuestionCriterionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
+ var success = await _readingQuestionCriterionSystemRepository.SaveChangesAsync();
+ return ResponseOutput.Result(success);
+ }
diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
index 079fdb8bd..e14082386 100644
--- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
+++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
@@ -351,6 +351,11 @@ namespace IRaCIS.Core.Domain.Share
/// 整体肿瘤评估
///
Tumor = 13,
+
+ ///
+ /// 整体评估调整原因
+ ///
+ AdjustReason = 14,
}
///