基础服务api
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.
 
 

86 lines
2.7 KiB

  1. using BPA.SAAS.Manage.Application.Org.Dtos.Organize;
  2. using BPA.SAAS.Manage.Application.Org.Interface;
  3. using BPA.SAAS.Manage.Core.Base;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace BPA.SAAS.Manage.Application.Org
  10. {
  11. [ApiDescriptionSettings("Org", Tag = "组织机构管理")]
  12. public class OrganizeServices: IDynamicApiController
  13. {
  14. IOrganizeService _organizeService;
  15. public OrganizeServices(IOrganizeService organizeService)
  16. {
  17. _organizeService=organizeService;
  18. }
  19. /// <summary>
  20. /// 分页查询
  21. /// </summary>
  22. /// <param name="input"></param>
  23. /// <returns></returns>
  24. [HttpPost("/api/organize/page")]
  25. public async Task<PageUtil> QueryOrgPageList([FromBody]OrgPageInput input)
  26. {
  27. return await _organizeService.QueryOrgPageList(input);
  28. }
  29. /// <summary>
  30. /// 获取列表
  31. /// </summary>
  32. /// <param name="input"></param>
  33. /// <returns></returns>
  34. [HttpPost("/api/organize/getorglist")]
  35. public async Task<List<OrgOutput>> GetOrgList(OrgListInput input)
  36. {
  37. return await _organizeService.GetOrgList(input);
  38. }
  39. /// <summary>
  40. /// 添加
  41. /// </summary>
  42. /// <param name="input"></param>
  43. /// <returns></returns>
  44. [HttpPost("/api/organize/addorg")]
  45. public async Task<bool> AddOrg(OrgAddInput input)
  46. {
  47. return await _organizeService.AddOrg(input);
  48. }
  49. /// <summary>
  50. /// 删除
  51. /// </summary>
  52. /// <param name="input"></param>
  53. /// <returns></returns>
  54. [HttpGet("/api/organize/deleteorg")]
  55. public async Task<bool> DeleteOrg(string id)
  56. {
  57. return await _organizeService.DeleteOrg(id);
  58. }
  59. /// <summary>
  60. /// 修改
  61. /// </summary>
  62. /// <param name="input"></param>
  63. /// <returns></returns>
  64. [HttpPost("/api/organize/updateorg")]
  65. public async Task<bool> UpdateOrg(UpdateOrgInput input)
  66. {
  67. return await _organizeService.UpdateOrg(input);
  68. }
  69. /// <summary>
  70. /// 获取组织机构树
  71. /// </summary>
  72. /// <returns></returns>
  73. [HttpGet("/api/organize/tree")]
  74. public async Task<dynamic> GetOrgTree()
  75. {
  76. return await _organizeService.GetOrgTree();
  77. }
  78. [HttpGet("/api/organize/getorglist")]
  79. public async Task<Dictionary<string, object>> GetOrgList()
  80. {
  81. return await _organizeService.GetOrgList();
  82. }
  83. }
  84. }