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

преди 10 месеца
преди 10 месеца
преди 10 месеца
преди 10 месеца
преди 11 месеца
преди 11 месеца
преди 10 месеца
преди 10 месеца
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. using BPA.SAAS.Manage.Application.DataBase.Dtos.Bom;
  2. using BPA.SAAS.Manage.Application.DataBase.Interface;
  3. using BPA.SAAS.Manage.Comm.Enum;
  4. using BPA.SAAS.Manage.Core.Base;
  5. using BPA.SAAS.Manage.Core.DataBase;
  6. using Microsoft.AspNetCore.Components.Forms;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. namespace BPA.SAAS.Manage.Application.DataBase
  13. {
  14. [ApiDescriptionSettings("Goods", Tag = "配方管理")]
  15. public class BomServices: IDynamicApiController, ITransient
  16. {
  17. IBomService _bomService;
  18. public BomServices(IBomService bomService)
  19. {
  20. _bomService= bomService;
  21. }
  22. /// <summary>
  23. /// 查询所有配方信息
  24. /// </summary>
  25. /// <returns></returns>
  26. [HttpGet("/api/bom/getbomlist")]
  27. public async Task<List<BomSelectList>> GetBomList()
  28. {
  29. return await _bomService.GetBomList();
  30. }
  31. /// <summary>
  32. /// 根据配方id查询配方信息
  33. /// </summary>
  34. /// <param name="bomId"></param>
  35. /// <returns></returns>
  36. [HttpGet("/api/bom/getbyidbomlist")]
  37. public async Task<BomList> GetBomList(string bomId)
  38. {
  39. return await _bomService.GetBomList(bomId);
  40. }
  41. /// <summary>
  42. /// 添加
  43. /// </summary>
  44. /// <param name="dto"></param>
  45. /// <returns></returns>
  46. [HttpPost("/api/bom/add")]
  47. public async Task<bool> AddBom(BomInputDto dto)
  48. {
  49. return await _bomService.AddBom(dto);
  50. }
  51. /// <summary>
  52. /// 更新
  53. /// </summary>
  54. /// <param name="dto"></param>
  55. /// <returns></returns>
  56. [HttpPost("/api/bom/update")]
  57. public async Task<bool> UpdateBom(BomInputDto dto)
  58. {
  59. return await _bomService.UpdateBom(dto);
  60. }
  61. /// <summary>
  62. /// 更新配方详情
  63. /// </summary>
  64. /// <param name="dto"></param>
  65. /// <returns></returns>
  66. [HttpPost("/api/bom/updatebombatcing")]
  67. public async Task<bool> UpdateBomBatcing(BomBatcingInputDto dto)
  68. {
  69. return await _bomService.UpdateBomBatcing(dto);
  70. }
  71. /// <summary>
  72. /// 删除
  73. /// </summary>
  74. /// <param name="id"></param>
  75. /// <returns></returns>
  76. [HttpGet("/api/bom/delete")]
  77. public async Task<bool> DeleteBom(string id)
  78. {
  79. return await _bomService.DeleteBom(id);
  80. }
  81. /// <summary>
  82. /// 添加配方分类
  83. /// </summary>
  84. /// <param name="dto"></param>
  85. /// <returns></returns>
  86. [HttpPost("/api/bom/addbomtype")]
  87. public async Task<bool> AddBomType(AddBomTypeInputDto dto)
  88. {
  89. return await _bomService.AddBomType(dto);
  90. }
  91. /// <summary>
  92. /// 配方分类列表
  93. /// </summary>
  94. /// <returns></returns>
  95. [HttpGet("/api/bom/getbomtypelist")]
  96. public async Task<List<dynamic>> GetBomTypeList()
  97. {
  98. return await _bomService.GetBomTypeList();
  99. }
  100. /// <summary>
  101. ///获取 配方列表
  102. /// </summary>
  103. /// <param name="inputDto"></param>
  104. /// <returns></returns>
  105. [HttpPost("/api/bom/BomPage")]
  106. public async Task<PageUtil> BomPage(BomPageInputDto inputDto)
  107. {
  108. return await _bomService.BomPage(inputDto);
  109. }
  110. /// <summary>
  111. /// 添加配方
  112. /// </summary>
  113. /// <param name="dto"></param>
  114. /// <returns></returns>
  115. [HttpPost("/api/bom/AddBom")]
  116. public async Task<bool> AddBom(BomCreateInputDto dto)
  117. {
  118. return await _bomService.AddBom(dto);
  119. }
  120. /// <summary>
  121. /// 删除配方
  122. /// </summary>
  123. /// <param name="dto"></param>
  124. /// <returns></returns>
  125. [HttpPost("/api/bom/DelBom")]
  126. public async Task<bool> DelBom(string id)
  127. {
  128. return await _bomService.DelBom(id);
  129. }
  130. }
  131. }