From 8f2b9052f76ee9bb622ac6d24fbb7e4a095d6922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=9B=8A?= Date: Tue, 8 Jul 2025 22:24:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- host/JiShe.IoT.HttpApi.Host/Program.cs | 2 +- .../Dto/SelectResultListInput.cs | 29 ++++++++++++++++ .../CommonServices/ICommonService.cs | 33 +++++++++++++++++++ .../JiShe.IoT.Application.Contracts.csproj | 8 ++--- .../JiShe.IoT.Application.csproj | 4 +++ 5 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 src/JiShe.IoT.Application.Contracts/CommonServices/Dto/SelectResultListInput.cs create mode 100644 src/JiShe.IoT.Application.Contracts/CommonServices/ICommonService.cs diff --git a/host/JiShe.IoT.HttpApi.Host/Program.cs b/host/JiShe.IoT.HttpApi.Host/Program.cs index 942c3fe..385c0a1 100644 --- a/host/JiShe.IoT.HttpApi.Host/Program.cs +++ b/host/JiShe.IoT.HttpApi.Host/Program.cs @@ -26,7 +26,7 @@ public class Program }); await builder.AddApplicationAsync(); #if DEBUG - //builder.WebHost.UseUrls($"http://+:10500"); + builder.WebHost.UseUrls($"http://+:10500"); #endif var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/src/JiShe.IoT.Application.Contracts/CommonServices/Dto/SelectResultListInput.cs b/src/JiShe.IoT.Application.Contracts/CommonServices/Dto/SelectResultListInput.cs new file mode 100644 index 0000000..18a6b0c --- /dev/null +++ b/src/JiShe.IoT.Application.Contracts/CommonServices/Dto/SelectResultListInput.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.IoT.CommonServices.Dto +{ + /// + /// 获取下拉框数据 + /// + public class SelectResultListInput + { + /// + /// 类型名称 + /// MalignantLoadLevelEnum 恶性负载等级 + /// DurationOfAutomaticClosingEnum 自动合闸时长类型 + /// MalignLoadTypeEnum 恶性负载类型 + /// + [Required] + public string TypeName { get; set; } + + /// + /// 第三级类型 + /// + public string ThirdAttributeTypeName { get; set; } + } +} diff --git a/src/JiShe.IoT.Application.Contracts/CommonServices/ICommonService.cs b/src/JiShe.IoT.Application.Contracts/CommonServices/ICommonService.cs new file mode 100644 index 0000000..5b3f1d4 --- /dev/null +++ b/src/JiShe.IoT.Application.Contracts/CommonServices/ICommonService.cs @@ -0,0 +1,33 @@ +using JiShe.IoT.CommonServices.Dto; +using JiShe.ServicePro.Commons; +using JiShe.ServicePro.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.IoT.CommonServices +{ + /// + /// 通用服务 + /// + public interface ICommonService + { + #region 公共依赖接口 + + /// + /// 初始化所有固定的枚举下拉框字典 + /// + /// + Task InitSelectTypetList(); + + /// + /// 根据type名称获取下拉框数据,主要是枚举等 + /// + /// + /// + Task> GetSelectResultList(SelectResultListInput input); + #endregion + } +} diff --git a/src/JiShe.IoT.Application.Contracts/JiShe.IoT.Application.Contracts.csproj b/src/JiShe.IoT.Application.Contracts/JiShe.IoT.Application.Contracts.csproj index c4910d4..b240040 100644 --- a/src/JiShe.IoT.Application.Contracts/JiShe.IoT.Application.Contracts.csproj +++ b/src/JiShe.IoT.Application.Contracts/JiShe.IoT.Application.Contracts.csproj @@ -37,10 +37,10 @@ - - - - + + + + \ No newline at end of file diff --git a/src/JiShe.IoT.Application/JiShe.IoT.Application.csproj b/src/JiShe.IoT.Application/JiShe.IoT.Application.csproj index 9e39949..9a126a9 100644 --- a/src/JiShe.IoT.Application/JiShe.IoT.Application.csproj +++ b/src/JiShe.IoT.Application/JiShe.IoT.Application.csproj @@ -45,5 +45,9 @@ + + + +