基础服务api
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

148 wiersze
4.9 KiB

  1. using BPA.SAAS.Manage.Application.DataBase.Dtos.Batching;
  2. using BPA.SAAS.Manage.Application.DataBase.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.DataBase
  10. {
  11. [ApiDescriptionSettings("Batching", Tag = "物料基础信息")]
  12. public class BatchingServices: IDynamicApiController
  13. {
  14. IBatchingService _batchingService;
  15. public BatchingServices(IBatchingService batchingService)
  16. {
  17. _batchingService= batchingService;
  18. }
  19. /// <summary>
  20. /// 分页查询
  21. /// </summary>
  22. /// <param name="dto"></param>
  23. /// <returns></returns>
  24. [HttpPost("/api/batching/getpage")]
  25. public async Task<PageUtil> GetBatchingList(BatchingListQuery dto)
  26. {
  27. return await _batchingService.GetBatchingList(dto);
  28. }
  29. /// <summary>
  30. /// 添加
  31. /// </summary>
  32. /// <param name="dto"></param>
  33. /// <returns></returns>
  34. [HttpPost("/api/batching/add")]
  35. public async Task<bool> AddBatching(BatchingInfoDto dto)
  36. {
  37. return await _batchingService.AddBatching(dto);
  38. }
  39. /// <summary>
  40. /// 修改
  41. /// </summary>
  42. /// <param name="dto"></param>
  43. /// <returns></returns>
  44. [HttpPost("/api/batching/update")]
  45. public async Task<bool> UpdateBatching(BatchingInfoDto dto)
  46. {
  47. return await _batchingService.UpdateBatching(dto);
  48. }
  49. /// <summary>
  50. /// 删除
  51. /// </summary>
  52. /// <param name="Ids"></param>
  53. /// <returns></returns>
  54. [HttpPost("/api/batching/delete")]
  55. public async Task<bool> BatchDelBatching(List<string> Ids)
  56. {
  57. return await _batchingService.BatchDelBatching(Ids);
  58. }
  59. /// <summary>
  60. /// 物料列表
  61. /// </summary>
  62. /// <returns></returns>
  63. [HttpGet("/api/batching/getbatchinglist")]
  64. public async Task<Dictionary<string, object>> GetBatchingList()
  65. {
  66. return await _batchingService.GetBatchingList();
  67. }
  68. /// <summary>
  69. /// 物料列表
  70. /// </summary>
  71. /// <returns></returns>
  72. [HttpGet("/api/batching/getbatchingselectlist")]
  73. public async Task<List<BatchingList>> GetBatchingSelectList()
  74. {
  75. return await _batchingService.GetBatchingSelectList();
  76. }
  77. [HttpPost("/api/batching/updatebatchingstatus")]
  78. public async Task<bool> UpdateBatchingStatus(BatchingStatusDto dto)
  79. {
  80. return await _batchingService.UpdateBatchingStatus(dto);
  81. }
  82. /// <summary>
  83. /// 物料类型列表
  84. /// </summary>
  85. /// <returns></returns>
  86. [HttpGet("/api/batching/getbatchingtypelist")]
  87. public async Task<List<dynamic>> GetBatchingTypeList()
  88. {
  89. return await _batchingService.GetBatchingTypeList();
  90. }
  91. /// <summary>
  92. /// 添加物料类型
  93. /// </summary>
  94. /// <param name="dto"></param>
  95. /// <returns></returns>
  96. [HttpPost("/api/batching/addbatchingtype")]
  97. public async Task<bool> AddBatchingType(BatchingTypeDto dto)
  98. {
  99. return await _batchingService.AddBatchingType(dto);
  100. }
  101. /// <summary>
  102. /// 删除物料类型
  103. /// </summary>
  104. /// <param name="id"></param>
  105. /// <returns></returns>
  106. [HttpGet("/api/batching/batchtypedel")]
  107. public async Task<bool> BatchTypeDel(string id)
  108. {
  109. return await _batchingService.BatchTypeDel(id);
  110. }
  111. /// <summary>
  112. /// 物料单位列表
  113. /// </summary>
  114. /// <returns></returns>
  115. [HttpGet("/api/batching/getbatchinguintList")]
  116. public async Task<List<dynamic>> GetBatchingUintList()
  117. {
  118. return await _batchingService.GetBatchingUintList();
  119. }
  120. /// <summary>
  121. /// 添加物料物料单位
  122. /// </summary>
  123. /// <param name="dto"></param>
  124. /// <returns></returns>
  125. [HttpPost("/api/batching/addbatchinguint")]
  126. public async Task<bool> AddBatchingUint(BatchingUintDto dto)
  127. {
  128. return await _batchingService.AddBatchingUint(dto);
  129. }
  130. /// <summary>
  131. /// 删除物料单位
  132. /// </summary>
  133. /// <param name="id"></param>
  134. /// <returns></returns>
  135. [HttpGet("/api/batching/batchinguintdel")]
  136. public async Task<bool> BatchingUintDel(string id)
  137. {
  138. return await _batchingService.BatchingUintDel(id);
  139. }
  140. [HttpGet("/api/batching/getbytypebatching")]
  141. public async Task<List<BatchingView>> GetByTypeBatching()
  142. {
  143. return await _batchingService.GetByTypeBatching();
  144. }
  145. }
  146. }