From e8db8a892c7f3d134f5f13912bd3dd705f19a003 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Mon, 2 Sep 2024 18:00:34 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E5=8C=85=EF=BC=8C=E7=A7=BB?=
=?UTF-8?q?=E5=8A=A8=E6=89=A9=E5=B1=95=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs | 3 +--
.../IRaCIS.Core.Application.csproj | 1 -
.../Inspection/FrontAuditConfigService.cs | 1 -
.../Service/Inspection/InspectionService.cs | 3 +--
.../Common/ReadingCommon.cs | 12 +--------
.../Extention/StringExtension.cs | 26 +++++++++++++++++++
6 files changed, 29 insertions(+), 17 deletions(-)
create mode 100644 IRaCIS.Core.Infrastructure/Extention/StringExtension.cs
diff --git a/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs b/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs
index a58f759f1..a6e0352d5 100644
--- a/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs
+++ b/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs
@@ -1,5 +1,4 @@
-using Castle.Core.Logging;
-using EntityFramework.Exceptions.SqlServer;
+using EntityFramework.Exceptions.SqlServer;
using Hangfire.SqlServer;
using IRaCIS.Core.Application.Triggers;
using IRaCIS.Core.Domain.Share;
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj
index 0184061b8..daa98ea98 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj
@@ -62,7 +62,6 @@
-
diff --git a/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs b/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs
index 1335532d1..cd6f903cf 100644
--- a/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs
+++ b/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs
@@ -7,7 +7,6 @@
using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
-using Castle.Core.Internal;
using MassTransit;
using IRaCIS.Core.Infra.EFCore.Common.Dto;
using Microsoft.Data.SqlClient;
diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
index 0ee0e60e5..374d38fa8 100644
--- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
+++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
@@ -1,5 +1,4 @@
-using Castle.Core.Internal;
-using IRaCIS.Core.Application.Contracts;
+using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Service.Inspection.DTO;
using IRaCIS.Core.Application.Service.Inspection.Interface;
using IRaCIS.Core.Domain.Share;
diff --git a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs
index ceac611fd..2afd573c2 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/ReadingCommon.cs
@@ -150,17 +150,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
public const string EvaluationReason = "肿瘤学阅片评估原因请依据临床数据填写,在与影像学结果不一致时必填。";
- public static bool IsNullOrEmpty(this string value)
- {
- if (value == null || value == string.Empty)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
+
///
diff --git a/IRaCIS.Core.Infrastructure/Extention/StringExtension.cs b/IRaCIS.Core.Infrastructure/Extention/StringExtension.cs
new file mode 100644
index 000000000..7b47e7f98
--- /dev/null
+++ b/IRaCIS.Core.Infrastructure/Extention/StringExtension.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace IRaCIS.Core.Infrastructure.Extention
+{
+ public static class StringExtension
+ {
+
+
+ // 扩展 string 类型
+ public static bool IsNullOrEmpty(this string value)
+ {
+ return string.IsNullOrEmpty(value);
+ }
+
+ // 扩展 IEnumerable 类型
+ public static bool IsNullOrEmpty(this IEnumerable enumerable)
+ {
+ return enumerable == null || !enumerable.Any();
+ }
+ }
+}