namespace Tiobon.Core.Api.Controllers;

/// <summary>
/// 年度人力申请(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghrh)]
public class Ghrh_YearHumanApplyOrderController : BaseController<IGhrh_YearHumanApplyOrderServices, Ghrh_YearHumanApplyOrder, Ghrh_YearHumanApplyOrderDto, InsertGhrh_YearHumanApplyOrderInput, EditGhrh_YearHumanApplyOrderInput>
{
    public Ghrh_YearHumanApplyOrderController(IGhrh_YearHumanApplyOrderServices service) : base(service)
    {
    }

    #region 根据审批单ID获取数据
    /// <summary>
    /// 
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    [HttpPost("QueryByWorkId/{id}")]
    public async Task<ServiceResult<Ghrh_YearHumanApplyOrderDto>> QueryByWorkId(int id)
    {
        return await _service.QueryByWorkId(id);
    }

    #endregion
}