基础服务api
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

168 Zeilen
5.6 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. /// <returns></returns>
  124. [HttpGet("/api/batching/getbatchinguintlist_alm")]
  125. [AllowAnonymous]
  126. public async Task<List<dynamic>> GetBatchingUintList_alm()
  127. {
  128. return await _batchingService.GetBatchingUintList_alm();
  129. }
  130. /// <summary>
  131. /// 查询物料分类(外部接口)
  132. /// </summary>
  133. /// <returns></returns>
  134. [HttpGet("/api/batching/getbatchingtypelist_alm")]
  135. [AllowAnonymous]
  136. public async Task<List<dynamic>> GetBatchingTypeList_alm()
  137. {
  138. return await _batchingService.GetBatchingTypeList_alm();
  139. }
  140. /// <summary>
  141. /// 添加物料物料单位
  142. /// </summary>
  143. /// <param name="dto"></param>
  144. /// <returns></returns>
  145. [HttpPost("/api/batching/addbatchinguint")]
  146. public async Task<bool> AddBatchingUint(BatchingUintDto dto)
  147. {
  148. return await _batchingService.AddBatchingUint(dto);
  149. }
  150. /// <summary>
  151. /// 删除物料单位
  152. /// </summary>
  153. /// <param name="id"></param>
  154. /// <returns></returns>
  155. [HttpGet("/api/batching/batchinguintdel")]
  156. public async Task<bool> BatchingUintDel(string id)
  157. {
  158. return await _batchingService.BatchingUintDel(id);
  159. }
  160. [HttpGet("/api/batching/getbytypebatching")]
  161. public async Task<List<BatchingView>> GetByTypeBatching()
  162. {
  163. return await _batchingService.GetByTypeBatching();
  164. }
  165. }
  166. }