修改代码

This commit is contained in:
陈益 2025-07-08 22:24:26 +08:00
parent 54b6b045f7
commit 8f2b9052f7
5 changed files with 71 additions and 5 deletions

View File

@ -26,7 +26,7 @@ public class Program
});
await builder.AddApplicationAsync<JiShe.IoT.IoTHttpApiHostModule>();
#if DEBUG
//builder.WebHost.UseUrls($"http://+:10500");
builder.WebHost.UseUrls($"http://+:10500");
#endif
var app = builder.Build();
await app.InitializeApplicationAsync();

View File

@ -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
{
/// <summary>
/// 获取下拉框数据
/// </summary>
public class SelectResultListInput
{
/// <summary>
/// 类型名称
/// MalignantLoadLevelEnum 恶性负载等级
/// DurationOfAutomaticClosingEnum 自动合闸时长类型
/// MalignLoadTypeEnum 恶性负载类型
/// </summary>
[Required]
public string TypeName { get; set; }
/// <summary>
/// 第三级类型
/// </summary>
public string ThirdAttributeTypeName { get; set; }
}
}

View File

@ -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
{
/// <summary>
/// 通用服务
/// </summary>
public interface ICommonService
{
#region
/// <summary>
/// 初始化所有固定的枚举下拉框字典
/// </summary>
/// <returns></returns>
Task InitSelectTypetList();
/// <summary>
/// 根据type名称获取下拉框数据主要是枚举等
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<List<SelectResult>> GetSelectResultList(SelectResultListInput input);
#endregion
}
}

View File

@ -37,10 +37,10 @@
<PackageReference Include="JiShe.ServicePro.TemplateManagement.Application.Contracts" />
<PackageReference Include="JiShe.ServicePro.DynamicMenuManagement.Application.Contracts" />
<PackageReference Include="JiShe.ServicePro.FileManagement.Application.Contracts" />
<PackageReference Include="JiShe.ServicePro.IoTDBManagement.Application.Contracts"/>
<PackageReference Include="JiShe.ServicePro.DeviceManagement.Application.Contracts"/>
<PackageReference Include="JiShe.ServicePro.CTWingManagement.Application.Contracts"/>
<PackageReference Include="JiShe.ServicePro.OneNETManagement.Application.Contracts"/>
<PackageReference Include="JiShe.ServicePro.IoTDBManagement.Application.Contracts" />
<PackageReference Include="JiShe.ServicePro.DeviceManagement.Application.Contracts" />
<PackageReference Include="JiShe.ServicePro.CTWingManagement.Application.Contracts" />
<PackageReference Include="JiShe.ServicePro.OneNETManagement.Application.Contracts" />
</ItemGroup>
</Project>

View File

@ -45,5 +45,9 @@
<ProjectReference Include="..\JiShe.IoT.Application.Contracts\JiShe.IoT.Application.Contracts.csproj" />
<ProjectReference Include="..\JiShe.IoT.Domain\JiShe.IoT.Domain.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="CommonServices\" />
</ItemGroup>
</Project>