基础服务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.DeviceTechnology;
  2. using BPA.SAAS.Manage.Application.Device.Interface;
  3. using BPA.SAAS.Manage.Core.Base;
  4. using BPA.SAAS.Manage.Core.Device;
  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 DeviceTechnologyServices: IDynamicApiController, ITransient
  15. {
  16. IDeviceTechnologyService _deviceTechnologyService;
  17. public DeviceTechnologyServices(IDeviceTechnologyService deviceTechnologyService)
  18. {
  19. _deviceTechnologyService= deviceTechnologyService;
  20. }
  21. /// <summary>
  22. /// 获取工艺基础信息列表
  23. /// </summary>
  24. /// <param name="inputDto"></param>
  25. /// <returns></returns>
  26. [HttpPost("/api/devicetechnology/page")]
  27. public async Task<PageUtil> GetDeviceTechnologyPage(DeviceTechnologyPageBase inputDto)
  28. {
  29. return await _deviceTechnologyService.GetDeviceTechnologyPage(inputDto);
  30. }
  31. /// <summary>
  32. /// 查询所有工艺信息
  33. /// </summary>
  34. /// <returns></returns>
  35. [HttpGet("/api/devicetechnology/getdevicetechnology")]
  36. public async Task<List<DeviceTechnologyDto>> GetDeviceTechnology()
  37. {
  38. return await _deviceTechnologyService.GetDeviceTechnology();
  39. }
  40. /// <summary>
  41. /// 添加工艺
  42. /// </summary>
  43. /// <param name="inputDto"></param>
  44. /// <returns></returns>
  45. [HttpPost("/api/devicetechnology/add")]
  46. public async Task<bool> AddDeviceTechnology(DeviceTechnologyBaseDto inputDto)
  47. {
  48. return await _deviceTechnologyService.AddDeviceTechnology(inputDto);
  49. }
  50. /// <summary>
  51. /// 修改工艺
  52. /// </summary>
  53. /// <param name="inputDto"></param>
  54. /// <returns></returns>
  55. [HttpPost("/api/devicetechnology/update")]
  56. public async Task<bool> UpdateDeviceTechnology(DeviceTechnologyBaseDto inputDto)
  57. {
  58. return await _deviceTechnologyService.UpdateDeviceTechnology(inputDto);
  59. }
  60. /// <summary>
  61. /// 删除配方工艺
  62. /// </summary>
  63. /// <param name="ids"></param>
  64. /// <returns></returns>
  65. [HttpPost("/api/devicetechnology/delete")]
  66. public async Task<bool> DeleteDeviceTechnology(List<string> ids)
  67. {
  68. return await _deviceTechnologyService.DeleteDeviceTechnology(ids);
  69. }
  70. /// <summary>
  71. /// 根据工艺id查询工艺模型
  72. /// </summary>
  73. /// <returns></returns>
  74. [HttpGet("/api/devicetechnology/gettechnologyaction")]
  75. public async Task<List<BPA_DeviceTechnologyAction>> GetTechnologyActionList(string devicetechnologyId)
  76. {
  77. return await _deviceTechnologyService.GetTechnologyActionList(devicetechnologyId);
  78. }
  79. /// <summary>
  80. /// 查询所有工艺模型
  81. /// </summary>
  82. /// <returns></returns>
  83. [HttpGet("/api/devicetechnology/gettechnologyactionlist")]
  84. public async Task<List<BPA_DeviceTechnologyAction>> GetTechnologyActionList()
  85. {
  86. return await _deviceTechnologyService.GetTechnologyActionList();
  87. }
  88. /// <summary>
  89. /// 添加工艺模型
  90. /// </summary>
  91. /// <param name="inputDto"></param>
  92. /// <returns></returns>
  93. [HttpPost("/api/devicetechnology/adddevicetechnologyaction")]
  94. public async Task<bool> AddDeviceTechnologyAction(DeviceTechnologyActionBaseDto inputDto)
  95. {
  96. return await _deviceTechnologyService.AddDeviceTechnologyAction(inputDto);
  97. }
  98. /// <summary>
  99. /// 修改工艺模型
  100. /// </summary>
  101. /// <param name="inputDto"></param>
  102. /// <returns></returns>
  103. [HttpPost("/api/devicetechnology/updatedevicetechnologyaction")]
  104. public async Task<bool> UpdateBomTechnology(DeviceTechnologyActionBaseDto inputDto)
  105. {
  106. return await _deviceTechnologyService.UpdateBomTechnology(inputDto);
  107. }
  108. /// <summary>
  109. /// 删除工艺模型
  110. /// </summary>
  111. /// <param name="ids"></param>
  112. /// <returns></returns>
  113. [HttpPost("/api/devicetechnology/deldevicetechnologyaction")]
  114. public async Task<bool> DeleteTechnologyAction(List<string> ids)
  115. {
  116. return await _deviceTechnologyService.DeleteTechnologyAction(ids);
  117. }
  118. }
  119. }