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

68 lines
2.5 KiB

  1. using BPA.SAAS.Manage.Application.Device.Dtos.WarehouseTemplate;
  2. using BPA.SAAS.Manage.Application.Device.Interface;
  3. using BPA.SAAS.Manage.Core.Base;
  4. using Microsoft.AspNetCore.Components.Forms;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace BPA.SAAS.Manage.Application.Device
  11. {
  12. [ApiDescriptionSettings("Device", Tag = "设备仓位模板")]
  13. public class WarehouseTemplateServices : IDynamicApiController, ITransient
  14. {
  15. IWarehouseTemplateService _warehouseTemplateService;
  16. public WarehouseTemplateServices(IWarehouseTemplateService warehouseTemplateService)
  17. {
  18. _warehouseTemplateService=warehouseTemplateService;
  19. }
  20. /// <summary>
  21. /// 分页查询
  22. /// </summary>
  23. /// <param name="inputDto"></param>
  24. /// <returns></returns>
  25. [HttpPost("/api/warehousetemplate/page")]
  26. public async Task<PageUtil> GetWarehouseTemplatePage(WarehouseTemplateQueryInputDto inputDto)
  27. {
  28. return await _warehouseTemplateService.GetWarehouseTemplatePage(inputDto);
  29. }
  30. [HttpGet("/api/warehousetemplate/list")]
  31. public async Task<List<WarehouseTemplateView>> GetWarehouseTemplateList(string deviceId)
  32. {
  33. return await _warehouseTemplateService.GetWarehouseTemplateList(deviceId);
  34. }
  35. /// <summary>
  36. /// 添加
  37. /// </summary>
  38. /// <param name="inputDto"></param>
  39. /// <returns></returns>
  40. [HttpPost("/api/warehousetemplate/add")]
  41. public async Task<bool> AddWarehouseTemplate(WarehouseTemplatDto inputDto)
  42. {
  43. return await _warehouseTemplateService.AddWarehouseTemplate(inputDto);
  44. }
  45. /// <summary>
  46. /// 删除
  47. /// </summary>
  48. /// <param name="inputList"></param>
  49. /// <returns></returns>
  50. [HttpPost("/api/warehousetemplate/del")]
  51. public async Task<bool> DeWarehouseTemplate(List<string> inputList)
  52. {
  53. return await _warehouseTemplateService.DeWarehouseTemplate(inputList);
  54. }
  55. /// <summary>
  56. /// 更新
  57. /// </summary>
  58. /// <param name="inputDto"></param>
  59. /// <returns></returns>
  60. [HttpPost("/api/warehousetemplate/update")]
  61. public async Task<bool> UpdateWarehouseTemplate(WarehouseTemplatDto inputDto)
  62. {
  63. return await _warehouseTemplateService.UpdateWarehouseTemplate(inputDto);
  64. }
  65. }
  66. }