基础服务api
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

DeviceVesionServices.cs 3.2 KiB

11 meses atrás
10 meses atrás
11 meses atrás
11 meses atrás
11 meses atrás
11 meses atrás
11 meses atrás
11 meses atrás
11 meses atrás
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. using BPA.SAAS.Manage.Application.Device.Dtos.DeviceVesion;
  2. using BPA.SAAS.Manage.Application.Device.Interface;
  3. using BPA.SAAS.Manage.Core.Base;
  4. using BPA.SAAS.Manage.Core.Product;
  5. using Microsoft.AspNetCore.Components.Forms;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace BPA.SAAS.Manage.Application.Device
  12. {
  13. [ApiDescriptionSettings("Device", Tag = "设备版本管理")]
  14. public class DeviceVesionServices: IDynamicApiController, ITransient
  15. {
  16. IDeviceVesionService _deviceVesionService;
  17. public DeviceVesionServices(IDeviceVesionService deviceVesionService)
  18. {
  19. _deviceVesionService= deviceVesionService;
  20. }
  21. /// <summary>
  22. /// 分页查询
  23. /// </summary>
  24. /// <param name="inputDto"></param>
  25. /// <returns></returns>
  26. [HttpPost("/api/devicevesion/page")]
  27. public async Task<PageUtil> GetDeviceVesionPageAsync(DeviceVesionQueryInputDto inputDto)
  28. {
  29. return await _deviceVesionService.GetDeviceVesionPageAsync(inputDto);
  30. }
  31. /// <summary>
  32. /// 新增
  33. /// </summary>
  34. /// <returns></returns>
  35. [HttpPost("/api/devicevesion/add")]
  36. public async Task<bool> AddDeviceVesionAsync(DeviceVesionBaseDto inputDto)
  37. {
  38. return await _deviceVesionService.AddDeviceVesionAsync(inputDto);
  39. }
  40. /// <summary>
  41. /// 删除
  42. /// </summary>
  43. /// <param name="inputList"></param>
  44. /// <returns></returns>
  45. [HttpPost("/api/devicevesion/delete")]
  46. public async Task<bool> DelDeviceVesionAsync(List<string> inputList)
  47. {
  48. return await _deviceVesionService.DelDeviceVesionAsync(inputList);
  49. }
  50. /// <summary>
  51. /// 修改
  52. /// </summary>
  53. /// <returns></returns>
  54. [HttpPost("/api/devicevesion/update")]
  55. public async Task<bool> UpdateDeviceVesionAsync(DeviceVesionBaseDto inputDto)
  56. {
  57. return await _deviceVesionService.UpdateDeviceVesionAsync(inputDto);
  58. }
  59. /// <summary>
  60. /// 更新状态
  61. /// </summary>
  62. /// <param name="inputDto"></param>
  63. /// <returns></returns>
  64. [HttpPost("/api/devicevesion/updatestatus")]
  65. public async Task<bool> UpdateDeviceVesionSatatus(DeviceVesionSatatusDto inputDto)
  66. {
  67. return await _deviceVesionService.UpdateDeviceVesionSatatus(inputDto);
  68. }
  69. /// <summary>
  70. /// 根据设备编码查询版本
  71. /// </summary>
  72. /// <param name="Code"></param>
  73. /// <returns></returns>
  74. [HttpGet("/api/devicevesion/getdevicevesion")]
  75. public async Task<List<BPA_ProductVesion>> GetDeviceVesion(string productId)
  76. {
  77. return await _deviceVesionService.GetDeviceVesion(productId);
  78. }
  79. /// <summary>
  80. /// 查询版本列表
  81. /// </summary>
  82. /// <returns></returns>
  83. [HttpGet("/api/devicevesion/getdevicevesionlist")]
  84. public async Task<List<BPA_ProductVesion>> GetDeviceVesionList()
  85. {
  86. return await _deviceVesionService.GetDeviceVesionList();
  87. }
  88. }
  89. }