80 lines
2.0 KiB
C#
80 lines
2.0 KiB
C#
namespace SimpleAdmin.Web.Core;
|
|
|
|
/// <summary>
|
|
/// 提供入职业务岗位相关 HTTP 接口。
|
|
/// </summary>
|
|
[ApiDescriptionSettings("Application", Tag = "入职岗位管理")]
|
|
[Route("biz/onboarding/position")]
|
|
[RolePermission]
|
|
public class OnboardingPositionController
|
|
{
|
|
private readonly IOnboardingPositionService _service;
|
|
|
|
public OnboardingPositionController(IOnboardingPositionService service)
|
|
{
|
|
_service = service;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 分页查询入职业务岗位。
|
|
/// </summary>
|
|
[HttpGet("page")]
|
|
public async Task<dynamic> Page([FromQuery] OnboardingPositionPageInput input)
|
|
{
|
|
return await _service.Page(input);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询指定公司的已启用岗位。
|
|
/// </summary>
|
|
[HttpGet("list-enabled")]
|
|
public async Task<dynamic> ListEnabled([FromQuery] long companyId)
|
|
{
|
|
return await _service.ListEnabled(companyId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询指定部门的已启用岗位。
|
|
/// </summary>
|
|
[HttpGet("list-by-department")]
|
|
public async Task<dynamic> ListByDepartment([FromQuery] long departmentId)
|
|
{
|
|
return await _service.ListEnabledByDepartment(departmentId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询岗位详情。
|
|
/// </summary>
|
|
[HttpGet("detail")]
|
|
public async Task<dynamic> Detail([FromQuery] BaseIdInput input)
|
|
{
|
|
return await _service.Detail(input);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 新增入职业务岗位。
|
|
/// </summary>
|
|
[HttpPost("add")]
|
|
public async Task Add([FromBody] OnboardingPositionAddInput input)
|
|
{
|
|
await _service.Add(input);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 编辑入职业务岗位。
|
|
/// </summary>
|
|
[HttpPost("edit")]
|
|
public async Task Edit([FromBody] OnboardingPositionEditInput input)
|
|
{
|
|
await _service.Edit(input);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 批量删除入职业务岗位。
|
|
/// </summary>
|
|
[HttpPost("delete")]
|
|
public async Task Delete([FromBody] BaseIdListInput input)
|
|
{
|
|
await _service.Delete(input);
|
|
}
|
|
} |