|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
-
- //
-
-
-
-
-
-
-
-
- namespace SafeCampus.Web.Core;
-
- /// <summary>
- /// 岗位管理控制器
- /// </summary>
- [ApiDescriptionSettings("Application", Tag = "岗位管理")]
- [Route("biz/organization/position")]
- [RolePermission]
- public class BizPositionController
- {
- private readonly IPositionService _positionService;
-
- public BizPositionController(IPositionService positionService)
- {
- _positionService = positionService;
- }
-
- #region Get请求
-
- /// <summary>
- /// 获取职位树
- /// </summary>
- /// <returns></returns>
- [HttpGet("tree")]
- [DisplayName("获取职位树")]
- public async Task<dynamic> Tree([FromQuery] PositionTreeInput input)
- {
- return await _positionService.Tree(input);
- }
-
- /// <summary>
- /// 岗位分页查询
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- [HttpGet("page")]
- [DisplayName("岗位分页查询")]
- public async Task<dynamic> Page([FromQuery] PositionPageInput input)
- {
- return await _positionService.Page(input);
- }
-
- /// <summary>
- /// 岗位详情
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- [HttpGet("detail")]
- [DisplayName("岗位详情")]
- public async Task<dynamic> Detail([FromQuery] BaseIdInput input)
- {
- return await _positionService.Detail(input);
- }
-
- /// <summary>
- /// 岗位选择器
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- [HttpGet("selector")]
- [DisplayName("岗位选择器")]
- public async Task<dynamic> Selector([FromQuery] PositionSelectorInput input)
- {
- return await _positionService.Selector(input);
- }
-
- #endregion
-
- #region Post请求
-
- /// <summary>
- /// 添加岗位
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- [HttpPost("add")]
- [DisplayName("添加岗位")]
- public async Task Add([FromBody] PositionAddInput input)
- {
- await _positionService.Add(input);
- }
-
- /// <summary>
- /// 修改岗位
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- [HttpPost("edit")]
- [DisplayName("修改岗位")]
- public async Task Edit([FromBody] PositionEditInput input)
- {
- await _positionService.Edit(input);
- }
-
- /// <summary>
- /// 删除岗位
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- [HttpPost("delete")]
- [DisplayName("删除岗位")]
- public async Task Delete([FromBody] BaseIdListInput input)
- {
- await _positionService.Delete(input);
- }
-
- #endregion
- }
|