using Dlhis.Basic.Organization.Response;
using Dlhis.Basic.Organization.Services;
using Kurisu.AspNetCore.MVC;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.Basic.Organization.Controllers;
///
/// sap部门
///
[Authorize]
[ApiDefinition("SAP", Description = "晶科sap组织架构信息")]
[Route("api/[controller]")]
[ApiController]
public class DepartmentsController : ControllerBase
{
private readonly IDepartmentService _departmentService;
public DepartmentsController(IDepartmentService departmentService)
{
_departmentService = departmentService;
}
///
/// 获取部门树
///
///
[HttpGet("tree")]
public async Task> GetTreeAsync()
{
return await _departmentService.GetTreeAsync();
}
}