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

121 lines
4.6 KiB

  1. using BPA.SAAS.Manage.Application.Device.Dtos.ProductFunction;
  2. using BPA.SAAS.Manage.Application.Device.Interface;
  3. using BPA.SAAS.Manage.Core.Base;
  4. using BPA.SAAS.Manage.Core.Product;
  5. using Microsoft.AspNetCore.Components.Forms;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace BPA.SAAS.Manage.Application.Device
  12. {
  13. [ApiDescriptionSettings("Device", Tag = "设备基础工艺信息管理")]
  14. public class ProductFunctionServices: IDynamicApiController, ITransient
  15. {
  16. IProductFunctionService _deviceTechnologyService;
  17. public ProductFunctionServices(IProductFunctionService deviceTechnologyService)
  18. {
  19. _deviceTechnologyService= deviceTechnologyService;
  20. }
  21. /// <summary>
  22. /// 获取功能基础信息列表
  23. /// </summary>
  24. /// <param name="inputDto"></param>
  25. /// <returns></returns>
  26. [HttpPost("/api/productfunction/page")]
  27. public async Task<PageUtil> GetProductFunctionPage(ProductFunctionPageBase inputDto)
  28. {
  29. return await _deviceTechnologyService.GetProductFunctionPage(inputDto);
  30. }
  31. /// <summary>
  32. /// 查询所有功能信息
  33. /// </summary>
  34. /// <returns></returns>
  35. [HttpGet("/api/productfunction/getdevicetechnology")]
  36. public async Task<List<ProductFunctionDto>> GetProductFunction()
  37. {
  38. return await _deviceTechnologyService.GetProductFunction();
  39. }
  40. /// <summary>
  41. /// 添加功能
  42. /// </summary>
  43. /// <param name="inputDto"></param>
  44. /// <returns></returns>
  45. [HttpPost("/api/productfunction/add")]
  46. public async Task<bool> AddProductFunction(ProductFunctionBaseDto inputDto)
  47. {
  48. return await _deviceTechnologyService.AddProductFunction(inputDto);
  49. }
  50. /// <summary>
  51. /// 修改功能
  52. /// </summary>
  53. /// <param name="inputDto"></param>
  54. /// <returns></returns>
  55. [HttpPost("/api/productfunction/update")]
  56. public async Task<bool> UpdateProductFunction(ProductFunctionBaseDto inputDto)
  57. {
  58. return await _deviceTechnologyService.UpdateProductFunction(inputDto);
  59. }
  60. /// <summary>
  61. /// 删除功能
  62. /// </summary>
  63. /// <param name="ids"></param>
  64. /// <returns></returns>
  65. [HttpPost("/api/productfunction/delete")]
  66. public async Task<bool> DeleteProductFunction(List<string> ids)
  67. {
  68. return await _deviceTechnologyService.DeleteProductFunction(ids);
  69. }
  70. /// <summary>
  71. /// 根据功能id查询功能参数
  72. /// </summary>
  73. /// <returns></returns>
  74. [HttpGet("/api/productfunction/getproductfunctionaction")]
  75. public async Task<List<BPA_ProductFunctionAction>> GetProductFunctionActionList(string productFunctionId)
  76. {
  77. return await _deviceTechnologyService.GetProductFunctionActionList(productFunctionId);
  78. }
  79. /// <summary>
  80. /// 查询所有功能参数
  81. /// </summary>
  82. /// <returns></returns>
  83. [HttpGet("/api/productfunction/getproductfunctionactionlist")]
  84. public async Task<List<BPA_ProductFunctionAction>> GetProductFunctionActionList()
  85. {
  86. return await _deviceTechnologyService.GetProductFunctionActionList();
  87. }
  88. /// <summary>
  89. /// 添加功能参数
  90. /// </summary>
  91. /// <param name="inputDto"></param>
  92. /// <returns></returns>
  93. [HttpPost("/api/productfunction/addproductfunctionaction")]
  94. public async Task<bool> AddProductFunctionAction(ProductFunctionActionBaseDto inputDto)
  95. {
  96. return await _deviceTechnologyService.AddProductFunctionAction(inputDto);
  97. }
  98. /// <summary>
  99. /// 修改功能参数
  100. /// </summary>
  101. /// <param name="inputDto"></param>
  102. /// <returns></returns>
  103. [HttpPost("/api/productfunction/updateproductfunctionaction")]
  104. public async Task<bool> UpdateProductFunctionAction(ProductFunctionActionBaseDto inputDto)
  105. {
  106. return await _deviceTechnologyService.UpdateProductFunctionAction(inputDto);
  107. }
  108. /// <summary>
  109. /// 删除功能参数
  110. /// </summary>
  111. /// <param name="ids"></param>
  112. /// <returns></returns>
  113. [HttpPost("/api/productfunction/delproductfunctionaction")]
  114. public async Task<bool> DeleteProductFunctionAction(List<string> ids)
  115. {
  116. return await _deviceTechnologyService.DeleteProductFunctionAction(ids);
  117. }
  118. }
  119. }