修改模板
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
aae8afd0c5
commit
760321f8fa
|
@ -109,7 +109,6 @@ public static class SwaggerSetup
|
||||||
//路径配置,设置为空,表示直接在根域名(localhost:8001)访问该文件,
|
//路径配置,设置为空,表示直接在根域名(localhost:8001)访问该文件,
|
||||||
//注意localhost:8001/swagger是访问不到的,去launchSettings.json把launchUrl去掉,如果你想换一个路径,直接写名字即可,比如直接写c.Route = "doc";
|
//注意localhost:8001/swagger是访问不到的,去launchSettings.json把launchUrl去掉,如果你想换一个路径,直接写名字即可,比如直接写c.Route = "doc";
|
||||||
options.RoutePrefix = string.Empty;
|
options.RoutePrefix = string.Empty;
|
||||||
options.RoutePrefix = string.Empty;
|
|
||||||
|
|
||||||
//DocExpansion设置为none可折叠所有方法
|
//DocExpansion设置为none可折叠所有方法
|
||||||
options.DocExpansion(DocExpansion.None);
|
options.DocExpansion(DocExpansion.None);
|
||||||
|
|
|
@ -70,4 +70,8 @@
|
||||||
<ProjectReference Include="..\IRaCIS.Core.Infra.EFCore\IRaCIS.Core.Infra.EFCore.csproj" />
|
<ProjectReference Include="..\IRaCIS.Core.Infra.EFCore\IRaCIS.Core.Infra.EFCore.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Service\MinimalApiService\CodeTemplate\FrontTemplate\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -549,23 +549,134 @@
|
||||||
系统模板文档配置表
|
系统模板文档配置表
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.Common.DevelopService">
|
<member name="T:IRaCIS.Core.Application.Service.DictionaryService">
|
||||||
<summary>
|
<summary>
|
||||||
开始时候一些帮助 比如根据配置的字典生成枚举
|
数据字典-基础数据维护
|
||||||
</summary>
|
</summary>
|
||||||
<param name="_dictionaryRepository"></param>
|
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.Common.DevelopService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DoctorDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||||
<summary>
|
<summary>
|
||||||
开始时候一些帮助 比如根据配置的字典生成枚举
|
数据字典-基础数据维护
|
||||||
</summary>
|
</summary>
|
||||||
<param name="_dictionaryRepository"></param>
|
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.Common.DevelopService.BackDicGenerateEnum(System.String)">
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBoolDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
|
||||||
<summary>
|
<summary>
|
||||||
根据配置的字典名生成后端枚举
|
添加bool
|
||||||
</summary>
|
</summary>
|
||||||
<param name="dicName"></param>
|
<param name="addOrEditBasic"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAllDictionaryKey">
|
||||||
|
<summary>
|
||||||
|
获取所有字典的Key
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBasicDicAndChild(IRaCIS.Application.Contracts.AddBasicDicAndChild)">
|
||||||
|
<summary>
|
||||||
|
添加字典 的同时 一起添加子项 --New
|
||||||
|
</summary>
|
||||||
|
<param name="addBasicDicAndChild"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDicList(IRaCIS.Application.Contracts.BasicDicQuery)">
|
||||||
|
<summary>
|
||||||
|
New 查询条件
|
||||||
|
</summary>
|
||||||
|
<param name="inQuery"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddOrUpdateBasicDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
|
||||||
|
<summary>
|
||||||
|
添加和编辑
|
||||||
|
</summary>
|
||||||
|
<param name="addOrEditBasic"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetChildList(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
获取子项数组
|
||||||
|
</summary>
|
||||||
|
<param name="parentId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.DeleteDictionary(System.Guid)">
|
||||||
|
<summary> 删除字典数据 </summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String[])">
|
||||||
|
<summary>
|
||||||
|
传递父亲 code 字符串 数组 返回多个下拉框数据
|
||||||
|
</summary>
|
||||||
|
<param name="searchArray"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String)">
|
||||||
|
<summary>
|
||||||
|
根据父亲Code 获取单个下拉框数据
|
||||||
|
</summary>
|
||||||
|
<param name="searchKey"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicConfigSelect(System.String)">
|
||||||
|
<summary>
|
||||||
|
根据父亲字典分组 获取子项
|
||||||
|
</summary>
|
||||||
|
<param name="searchKey"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionaryList(IRaCIS.Application.Contracts.GetCriterionDictionaryListInDto)">
|
||||||
|
<summary>
|
||||||
|
获取标准字典
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetTrialCriterionDictionaryList(IRaCIS.Application.Contracts.GetTrialCriterionDictionaryListInDto)">
|
||||||
|
<summary>
|
||||||
|
获取标准字典
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionary(IRaCIS.Application.Contracts.GetCriterionDictionaryInDto)">
|
||||||
|
<summary>
|
||||||
|
获取标准指定字典
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataAllSelect(IRaCIS.Application.Contracts.GetBasicDataAllSelectInDto)">
|
||||||
|
<summary>
|
||||||
|
获取所有下拉框 枚举 bool 数据
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBoolValueState(System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
获取是和否
|
||||||
|
</summary>
|
||||||
|
<param name="value"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAuditState``1(System.Guid,``0)">
|
||||||
|
<summary>
|
||||||
|
获取审核状态
|
||||||
|
</summary>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<param name="trial"></param>
|
||||||
|
<param name="childCode"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.GetEventStoreRecordList(IRaCIS.Core.Application.ViewModel.EventStoreRecordQuery)">
|
||||||
|
<summary>
|
||||||
|
邮件事件消息列表
|
||||||
|
</summary>
|
||||||
|
<param name="inQuery"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.RePublishEvent(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
重新发布失败的事件消息
|
||||||
|
</summary>
|
||||||
|
<param name="eventId"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.TrialUserListExport(IRaCIS.Application.Contracts.TrialMaintenanceExportQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser})">
|
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.TrialUserListExport(IRaCIS.Application.Contracts.TrialMaintenanceExportQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser})">
|
||||||
|
@ -833,136 +944,6 @@
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
<exception cref="T:System.Exception"></exception>
|
<exception cref="T:System.Exception"></exception>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.DictionaryService">
|
|
||||||
<summary>
|
|
||||||
数据字典-基础数据维护
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DoctorDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialCriterionDictionaryCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
|
||||||
<summary>
|
|
||||||
数据字典-基础数据维护
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBoolDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
|
|
||||||
<summary>
|
|
||||||
添加bool
|
|
||||||
</summary>
|
|
||||||
<param name="addOrEditBasic"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAllDictionaryKey">
|
|
||||||
<summary>
|
|
||||||
获取所有字典的Key
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddBasicDicAndChild(IRaCIS.Application.Contracts.AddBasicDicAndChild)">
|
|
||||||
<summary>
|
|
||||||
添加字典 的同时 一起添加子项 --New
|
|
||||||
</summary>
|
|
||||||
<param name="addBasicDicAndChild"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDicList(IRaCIS.Application.Contracts.BasicDicQuery)">
|
|
||||||
<summary>
|
|
||||||
New 查询条件
|
|
||||||
</summary>
|
|
||||||
<param name="inQuery"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.AddOrUpdateBasicDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
|
|
||||||
<summary>
|
|
||||||
添加和编辑
|
|
||||||
</summary>
|
|
||||||
<param name="addOrEditBasic"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetChildList(System.Guid)">
|
|
||||||
<summary>
|
|
||||||
获取子项数组
|
|
||||||
</summary>
|
|
||||||
<param name="parentId"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.DeleteDictionary(System.Guid)">
|
|
||||||
<summary> 删除字典数据 </summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String[])">
|
|
||||||
<summary>
|
|
||||||
传递父亲 code 字符串 数组 返回多个下拉框数据
|
|
||||||
</summary>
|
|
||||||
<param name="searchArray"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataSelect(System.String)">
|
|
||||||
<summary>
|
|
||||||
根据父亲Code 获取单个下拉框数据
|
|
||||||
</summary>
|
|
||||||
<param name="searchKey"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicConfigSelect(System.String)">
|
|
||||||
<summary>
|
|
||||||
根据父亲字典分组 获取子项
|
|
||||||
</summary>
|
|
||||||
<param name="searchKey"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionaryList(IRaCIS.Application.Contracts.GetCriterionDictionaryListInDto)">
|
|
||||||
<summary>
|
|
||||||
获取标准字典
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetTrialCriterionDictionaryList(IRaCIS.Application.Contracts.GetTrialCriterionDictionaryListInDto)">
|
|
||||||
<summary>
|
|
||||||
获取标准字典
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetCriterionDictionary(IRaCIS.Application.Contracts.GetCriterionDictionaryInDto)">
|
|
||||||
<summary>
|
|
||||||
获取标准指定字典
|
|
||||||
</summary>
|
|
||||||
<param name="inDto"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBasicDataAllSelect(IRaCIS.Application.Contracts.GetBasicDataAllSelectInDto)">
|
|
||||||
<summary>
|
|
||||||
获取所有下拉框 枚举 bool 数据
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBoolValueState(System.Boolean)">
|
|
||||||
<summary>
|
|
||||||
获取是和否
|
|
||||||
</summary>
|
|
||||||
<param name="value"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetAuditState``1(System.Guid,``0)">
|
|
||||||
<summary>
|
|
||||||
获取审核状态
|
|
||||||
</summary>
|
|
||||||
<typeparam name="T"></typeparam>
|
|
||||||
<param name="trial"></param>
|
|
||||||
<param name="childCode"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.GetEventStoreRecordList(IRaCIS.Core.Application.ViewModel.EventStoreRecordQuery)">
|
|
||||||
<summary>
|
|
||||||
邮件事件消息列表
|
|
||||||
</summary>
|
|
||||||
<param name="inQuery"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.EventStoreRecordService.RePublishEvent(System.Guid)">
|
|
||||||
<summary>
|
|
||||||
重新发布失败的事件消息
|
|
||||||
</summary>
|
|
||||||
<param name="eventId"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:IRaCIS.Core.Application.Service.ExploreRecommendService">
|
<member name="T:IRaCIS.Core.Application.Service.ExploreRecommendService">
|
||||||
<summary>
|
<summary>
|
||||||
ExploreRecommendService
|
ExploreRecommendService
|
||||||
|
@ -2316,6 +2297,21 @@
|
||||||
<param name="password"></param>
|
<param name="password"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.CodeTemplateService.GetDataBaseTableList(System.String,System.String)">
|
||||||
|
<summary>
|
||||||
|
获取数据库的表信息 以及字段信息
|
||||||
|
</summary>
|
||||||
|
<param name="tableName"></param>
|
||||||
|
<param name="comment"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.CodeTemplateService.GenerateEnumDefine(System.String)">
|
||||||
|
<summary>
|
||||||
|
根据字典名 code 生成枚举定义
|
||||||
|
</summary>
|
||||||
|
<param name="code"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.MinimalApiService.FileToPDFService">
|
<member name="T:IRaCIS.Core.Application.Service.MinimalApiService.FileToPDFService">
|
||||||
<summary>
|
<summary>
|
||||||
上传文件转PDF 或者给url 这边下载然后转PDF
|
上传文件转PDF 或者给url 这边下载然后转PDF
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.Common
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 开始时候一些帮助 比如根据配置的字典生成枚举
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="_dictionaryRepository"></param>
|
|
||||||
[ApiExplorerSettings(GroupName = "Common")]
|
|
||||||
public class DevelopService(IRepository<Dictionary> _dictionaryRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 根据配置的字典名生成后端枚举
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="dicName"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IResponseOutput> BackDicGenerateEnum(string dicName)
|
|
||||||
{
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -26,37 +26,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IDictionaryService
|
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IDictionaryService
|
||||||
{
|
{
|
||||||
|
|
||||||
public async Task<IResponseOutput> GenerateEnumDefine(string code)
|
|
||||||
{
|
|
||||||
var searchList = await _dicRepository.Where(t => t.Parent.Code == code && t.ParentId != null && t.IsEnable).ProjectTo<BasicDicSelect>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
|
|
||||||
// StringBuilder 用于构建枚举代码字符串
|
|
||||||
var enumCode = new StringBuilder();
|
|
||||||
|
|
||||||
// 生成枚举定义
|
|
||||||
enumCode.AppendLine($"public enum {code}");
|
|
||||||
enumCode.AppendLine("{");
|
|
||||||
|
|
||||||
foreach (var item in searchList)
|
|
||||||
{
|
|
||||||
// 添加 XML 注释作为枚举描述
|
|
||||||
enumCode.AppendLine($" /// <summary>");
|
|
||||||
enumCode.AppendLine($" /// {item.ValueCN}"); // 假设你有一个描述字段
|
|
||||||
enumCode.AppendLine($" /// </summary>");
|
|
||||||
// 每个枚举值生成
|
|
||||||
enumCode.AppendLine($" {item.Value.Trim().Replace(" ", "")} = {item.Code},");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
enumCode.AppendLine("}");
|
|
||||||
|
|
||||||
// 返回生成的枚举代码
|
|
||||||
var enumStr = enumCode.ToString();
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(enumStr);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加bool
|
/// 添加bool
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Service.DTO;
|
||||||
|
|
||||||
|
public class TemplateTable
|
||||||
|
{
|
||||||
|
public string TableName { get; set; }
|
||||||
|
|
||||||
|
public string Comment { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public List<TemplateTableProperty> AddOrEditPropertyList => TablePropertyList.Where(t => !AddOrUpdateExcludeNameList.Contains(t.PropertyName)).ToList();
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public List<TemplateTableProperty> TablePropertyList { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public List<string> AddOrUpdateExcludeNameList = new List<string>() { "CreateUserId", "UpdateUserId", "CreateTime", "UpdateTime", "DeleteUserId", "IsDeleted", "DeletedTime" };
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TemplateTableProperty
|
||||||
|
{
|
||||||
|
public string ColumnName { get; set; }
|
||||||
|
|
||||||
|
public string PropertyName { get; set; }
|
||||||
|
|
||||||
|
public string CSharpType { get; set; }
|
||||||
|
|
||||||
|
public bool IsNullable { get; set; }
|
||||||
|
|
||||||
|
public int? MaxLength { get; set; }
|
||||||
|
|
||||||
|
public bool IsPrimarykey { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string Comment { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,119 @@
|
||||||
|
using DocumentFormat.OpenXml.Office2016.Drawing.ChartDrawing;
|
||||||
|
using IRaCIS.Application.Contracts;
|
||||||
|
using IRaCIS.Core.Application.Service.DTO;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using NPOI.HPSF;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Service
|
||||||
|
{
|
||||||
|
|
||||||
|
public class CodeTemplateService(IRepository<Dictionary> _dicRepository,IMapper _mapper, IConfiguration _configuration) : ServiceBase
|
||||||
|
{
|
||||||
|
|
||||||
|
static string GetCSharpType(Type type)
|
||||||
|
{
|
||||||
|
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
|
||||||
|
{
|
||||||
|
var underlyingType = Nullable.GetUnderlyingType(type);
|
||||||
|
return $"{GetCSharpType(underlyingType)}?";
|
||||||
|
}
|
||||||
|
|
||||||
|
return type switch
|
||||||
|
{
|
||||||
|
_ when type == typeof(int) => "int",
|
||||||
|
_ when type == typeof(long) => "long",
|
||||||
|
_ when type == typeof(short) => "short",
|
||||||
|
_ when type == typeof(byte) => "byte",
|
||||||
|
_ when type == typeof(bool) => "bool",
|
||||||
|
_ when type == typeof(decimal) => "decimal",
|
||||||
|
_ when type == typeof(double) => "double",
|
||||||
|
_ when type == typeof(float) => "float",
|
||||||
|
_ when type == typeof(Guid) => "Guid",
|
||||||
|
_ when type == typeof(DateTime) => "DateTime",
|
||||||
|
_ when type == typeof(string) => "string",
|
||||||
|
_ => type.Name // 非常见类型,返回 .NET 类型名称
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取数据库的表信息 以及字段信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="tableName"></param>
|
||||||
|
/// <param name="comment"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<TemplateTable> GetDataBaseTableList(string tableName, string comment)
|
||||||
|
{
|
||||||
|
var contextOptions = new DbContextOptionsBuilder<IRaCISDBContext>().UseSqlServer(_configuration.GetSection("ConnectionStrings:RemoteNew").Value).Options;
|
||||||
|
|
||||||
|
using var dbContext = new IRaCISDBContext(contextOptions);
|
||||||
|
var dbModel = dbContext.Model;
|
||||||
|
|
||||||
|
var list = dbModel.GetEntityTypes().Where(t => t.GetTableName().IsNotNullOrEmpty())
|
||||||
|
.WhereIf(tableName.IsNotNullOrEmpty(), t => t.GetTableName()!.Contains(tableName))
|
||||||
|
.WhereIf(comment.IsNotNullOrEmpty(), t => t.GetComment().Contains(comment))
|
||||||
|
.Select(t => new TemplateTable()
|
||||||
|
{
|
||||||
|
TableName = t.GetTableName()!,
|
||||||
|
TablePropertyList = t.GetProperties().Select(property => new TemplateTableProperty()
|
||||||
|
{
|
||||||
|
PropertyName = property.Name,
|
||||||
|
ColumnName = property.GetColumnName(),
|
||||||
|
IsNullable = property.IsNullable,
|
||||||
|
IsPrimarykey = property.IsKey(),
|
||||||
|
CSharpType = GetCSharpType(property.ClrType),
|
||||||
|
Comment = property.GetComment() ?? string.Empty
|
||||||
|
}).ToList()
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据字典名 code 生成枚举定义
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="code"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<IResponseOutput> GenerateEnumDefine(string code)
|
||||||
|
{
|
||||||
|
var searchList = await _dicRepository.Where(t => t.Parent.Code == code && t.ParentId != null && t.IsEnable).ProjectTo<BasicDicSelect>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
// StringBuilder 用于构建枚举代码字符串
|
||||||
|
var enumCode = new StringBuilder();
|
||||||
|
|
||||||
|
// 生成枚举定义
|
||||||
|
enumCode.AppendLine($"public enum {code}");
|
||||||
|
enumCode.AppendLine("{");
|
||||||
|
|
||||||
|
foreach (var item in searchList)
|
||||||
|
{
|
||||||
|
// 添加 XML 注释作为枚举描述
|
||||||
|
enumCode.AppendLine($" /// <summary>");
|
||||||
|
enumCode.AppendLine($" /// {item.ValueCN}"); // 假设你有一个描述字段
|
||||||
|
enumCode.AppendLine($" /// </summary>");
|
||||||
|
// 每个枚举值生成
|
||||||
|
enumCode.AppendLine($" {item.Value.Trim().Replace(" ", "")} = {item.Code},");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
enumCode.AppendLine("}");
|
||||||
|
|
||||||
|
// 返回生成的枚举代码
|
||||||
|
var enumStr = enumCode.ToString();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(enumStr);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -87,13 +87,13 @@ public partial class <#= EntityType.Name #>: BaseFullAuditEntity
|
||||||
{
|
{
|
||||||
var maxLength = property.GetMaxLength();
|
var maxLength = property.GetMaxLength();
|
||||||
|
|
||||||
if (maxLength.HasValue && maxLength != 200) // 仅当长度不为200时生成[StringLength]
|
if (maxLength.HasValue && maxLength != 400) // 仅当长度不为200时生成[StringLength]
|
||||||
{
|
{
|
||||||
#>
|
#>
|
||||||
[StringLength(<#= maxLength.Value #>)]
|
[StringLength(<#= maxLength.Value #>)]
|
||||||
<#
|
<#
|
||||||
}
|
}
|
||||||
else if(maxLength.HasValue && maxLength == 200){}
|
else if(maxLength.HasValue && maxLength == 400){}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#>
|
#>
|
||||||
|
|
Loading…
Reference in New Issue