完善单位定义界面

This commit is contained in:
陈淳
2023-01-04 16:47:24 +08:00
parent 5f6d29a3f8
commit e8e6b928cf
7 changed files with 69 additions and 7 deletions

View File

@@ -261,6 +261,12 @@
</summary>
<returns></returns>
</member>
<member name="M:Yi.Framework.ApiMicroservice.Controllers.ERP.UnitController.GetList">
<summary>
全查
</summary>
<returns></returns>
</member>
<member name="M:Yi.Framework.ApiMicroservice.Controllers.ERP.UnitController.Create(Yi.Framework.DtoModel.ERP.Unit.UnitCreateUpdateInput)">
<summary>

View File

@@ -40,6 +40,17 @@ namespace Yi.Framework.ApiMicroservice.Controllers.ERP
return Result.Success().SetData(result);
}
/// <summary>
/// 全查
/// </summary>
/// <returns></returns>
[HttpGet]
public async Task<Result> GetList()
{
var result = await _unitService.GetListAsync();
return Result.Success().SetData(result);
}
/// <summary>
/// 增
/// </summary>

View File

@@ -21,6 +21,11 @@ namespace Yi.Framework.Interface.Base.Crud
/// <returns></returns>
Task<TDetail> GetByIdAsync(TKey id);
/// <summary>
/// 获取全部
/// </summary>
/// <returns></returns>
Task<List<TListDto>> GetListAsync();
/// <summary>
/// 根据url参数查询

View File

@@ -36,6 +36,13 @@ namespace Yi.Framework.Service.Base.Crud
protected IRepository<TEntity> Repository { get; set; }
public async Task<List<TGetListOutputDto>> GetListAsync()
{
var entitys = await Repository.GetListAsync();
var entityDtos = await MapToGetListOutputDtosAsync(entitys);
return entityDtos;
}
public async Task<TGetOutputDto> GetByIdAsync(TKey id)
{
var entity = await GetEntityByIdAsync(id);