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

82 lines
3.1 KiB

  1. using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsTechnology;
  2. using BPA.SAAS.Manage.Application.DataBase.Interface;
  3. using Microsoft.AspNetCore.Components.Forms;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Xml.Linq;
  10. namespace BPA.SAAS.Manage.Application.DataBase
  11. {
  12. [ApiDescriptionSettings("Goods", Tag = "商品工艺")]
  13. public class GoodsTechnologyService: IDynamicApiController, ITransient
  14. {
  15. IGoodsTechnologyService _goodsTechnologyService;
  16. public GoodsTechnologyService(IGoodsTechnologyService goodsTechnologyService)
  17. {
  18. _goodsTechnologyService=goodsTechnologyService;
  19. }
  20. /// <summary>
  21. /// 更新
  22. /// </summary>
  23. /// <param name="inputDto"></param>
  24. /// <returns></returns>
  25. [HttpPost("/api/goodstechnology/updategoodstechnologyaction")]
  26. public async Task<bool> UpdateGoodsTechnologyAction(List<GoodsTechnologyActionBaseDto> inputDto)
  27. {
  28. return await _goodsTechnologyService.UpdateGoodsTechnologyAction(inputDto);
  29. }
  30. /// <summary>
  31. /// 添加
  32. /// </summary>
  33. /// <param name="inputDto"></param>
  34. /// <returns></returns>
  35. [HttpPost("/api/goodstechnology/addgoodstechnologyaction")]
  36. public async Task<bool> AddGoodsTechnologyAction(List<GoodsTechnologyActionBaseDto> inputDto)
  37. {
  38. return await _goodsTechnologyService.AddGoodsTechnologyAction(inputDto);
  39. }
  40. /// <summary>
  41. /// 根据商品获取工艺
  42. /// </summary>
  43. /// <param name="goodsId"></param>
  44. /// <returns></returns>
  45. [HttpGet("/api/goodstechnology/getGoodstechnologyaction")]
  46. public async Task<List<GoodsTechnologyActionListView>> GetGoodsTechnologyAction(string goodsId)
  47. {
  48. return await _goodsTechnologyService.GetGoodsTechnologyAction(goodsId);
  49. }
  50. /// <summary>
  51. /// 删除
  52. /// </summary>
  53. /// <param name="id"></param>
  54. /// <returns></returns>
  55. [HttpGet("/api/goodstechnology/deletegoodstechnologyaction")]
  56. public async Task<bool> DeleteGoodsTechnologyAction(string id)
  57. {
  58. return await _goodsTechnologyService.DeleteGoodsTechnologyAction(id);
  59. }
  60. /// <summary>
  61. /// 删除
  62. /// </summary>
  63. /// <param name="dto"></param>
  64. /// <returns></returns>
  65. [HttpPost("/api/goodstechnology/deletebydevidegoodstechnologyaction")]
  66. public async Task<bool> DeleteGoodsTechnologyAction(GoodsTechnologDelete dto)
  67. {
  68. return await _goodsTechnologyService.DeleteGoodsTechnologyAction(dto);
  69. }
  70. /// <summary>
  71. /// 查询设备信息(包含设备版本对应的工艺信息
  72. /// </summary>
  73. /// <returns></returns>
  74. [HttpGet("/api/goodstechnology/getdevicetechnology")]
  75. public async Task<List<DeviceGoodsTechnologyView>> GetDeviceTechnology()
  76. {
  77. return await _goodsTechnologyService.GetDeviceTechnology();
  78. }
  79. }
  80. }