using BPA.SAAS.Manage.Application.Device.Dtos.DeviceVesion;
using BPA.SAAS.Manage.Application.Device.Interface;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.Device;
using Microsoft.AspNetCore.Components.Forms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BPA.SAAS.Manage.Application.Device
{
[ApiDescriptionSettings("Device", Tag = "设备版本管理")]
public class DeviceVesionServices: IDynamicApiController, ITransient
{
IDeviceVesionService _deviceVesionService;
public DeviceVesionServices(IDeviceVesionService deviceVesionService)
{
_deviceVesionService= deviceVesionService;
}
///
/// 分页查询
///
///
///
[HttpPost("/api/devicevesion/page")]
public async Task GetDeviceVesionPageAsync(DeviceVesionQueryInputDto inputDto)
{
return await _deviceVesionService.GetDeviceVesionPageAsync(inputDto);
}
///
/// 新增
///
///
[HttpPost("/api/devicevesion/add")]
public async Task AddDeviceVesionAsync(DeviceVesionBaseDto inputDto)
{
return await _deviceVesionService.AddDeviceVesionAsync(inputDto);
}
///
/// 删除
///
///
///
[HttpPost("/api/devicevesion/delete")]
public async Task DelDeviceVesionAsync(List inputList)
{
return await _deviceVesionService.DelDeviceVesionAsync(inputList);
}
///
/// 修改
///
///
[HttpPost("/api/devicevesion/update")]
public async Task UpdateDeviceVesionAsync(DeviceVesionBaseDto inputDto)
{
return await _deviceVesionService.UpdateDeviceVesionAsync(inputDto);
}
///
/// 更新状态
///
///
///
[HttpPost("/api/devicevesion/updatestatus")]
public async Task UpdateDeviceVesionSatatus(DeviceVesionSatatusDto inputDto)
{
return await _deviceVesionService.UpdateDeviceVesionSatatus(inputDto);
}
///
/// 根据设备编码查询版本
///
///
///
[HttpGet("/api/devicevesion/getdevicevesion")]
public async Task> GetDeviceVesion(string productId)
{
return await _deviceVesionService.GetDeviceVesion(productId);
}
///
/// 查询版本列表
///
///
[HttpGet("/api/devicevesion/getdevicevesionlist")]
public async Task> GetDeviceVesionList()
{
return await _deviceVesionService.GetDeviceVesionList();
}
}
}