You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.5 KiB
49 lines
1.5 KiB
using learun.iapplication;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace learun.webapi.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 版 本 Learun-ADMS-Core 力软管理后台
|
|
/// Copyright (c) 2019-present 力软信息技术(苏州)有限公司
|
|
/// 创建人:tobin
|
|
/// 日 期:2020.04.22
|
|
/// 描 述:部门接口
|
|
/// </summary>
|
|
public class DepartmentController : MvcControllerBase
|
|
{
|
|
private readonly DepartmentIBLL _departmentIBLL;
|
|
/// <summary>
|
|
/// 初始化
|
|
/// </summary>
|
|
/// <param name="departmentIBLL">部门接口</param>
|
|
public DepartmentController(DepartmentIBLL departmentIBLL) {
|
|
_departmentIBLL = departmentIBLL;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据公司 id 获取部门列表
|
|
/// </summary>
|
|
/// <param name="companyId">公司主键</param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<IActionResult> List(string companyId)
|
|
{
|
|
var data = await _departmentIBLL.GetList(companyId);
|
|
return Success(data);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据 id 获取单个部门详情
|
|
/// </summary>
|
|
/// <param name="departmentId">部门主键</param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<IActionResult> Info(string departmentId)
|
|
{
|
|
var data = await _departmentIBLL.GetEntity(departmentId);
|
|
return Success(data);
|
|
}
|
|
}
|
|
}
|