using BPA.SAAS.Manage.Application.Device.Dtos.ProductFunction;
using BPA.SAAS.Manage.Application.Device.Interface;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.Product;
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 ProductFunctionServices: IDynamicApiController, ITransient
{
IProductFunctionService _deviceTechnologyService;
public ProductFunctionServices(IProductFunctionService deviceTechnologyService)
{
_deviceTechnologyService= deviceTechnologyService;
}
///
/// 获取功能基础信息列表
///
///
///
[HttpPost("/api/productfunction/page")]
public async Task GetProductFunctionPage(ProductFunctionPageBase inputDto)
{
return await _deviceTechnologyService.GetProductFunctionPage(inputDto);
}
///
/// 查询所有功能信息
///
///
[HttpGet("/api/productfunction/getdevicetechnology")]
public async Task> GetProductFunction()
{
return await _deviceTechnologyService.GetProductFunction();
}
///
/// 根据设备id查询产品功能和服务
///
///
///
[HttpGet("/api/productfunction/getproductfunction")]
public async Task> GetProductFunction(string deviceId)
{
return await _deviceTechnologyService.GetProductFunction(deviceId);
}
///
/// 根据设备id查询产品功能和服务(外部调用)
///
///
///
[HttpGet("/api/productfunction/getproductfunction_alm")]
[AllowAnonymous]
public async Task> GetProductFunction_alm(string deviceId)
{
return await _deviceTechnologyService.GetProductFunction_alm(deviceId);
}
///
/// 添加功能
///
///
///
[HttpPost("/api/productfunction/add")]
public async Task AddProductFunction(ProductFunctionBaseDto inputDto)
{
return await _deviceTechnologyService.AddProductFunction(inputDto);
}
///
/// 修改功能
///
///
///
[HttpPost("/api/productfunction/update")]
public async Task UpdateProductFunction(ProductFunctionBaseDto inputDto)
{
return await _deviceTechnologyService.UpdateProductFunction(inputDto);
}
///
/// 删除功能
///
///
///
[HttpPost("/api/productfunction/delete")]
public async Task DeleteProductFunction(List ids)
{
return await _deviceTechnologyService.DeleteProductFunction(ids);
}
///
/// 根据功能id查询功能参数
///
///
[HttpGet("/api/productfunction/getproductfunctionaction")]
public async Task> GetProductFunctionActionList(string productFunctionId)
{
return await _deviceTechnologyService.GetProductFunctionActionList(productFunctionId);
}
///
/// 查询所有功能参数
///
///
[HttpGet("/api/productfunction/getproductfunctionactionlist")]
public async Task> GetProductFunctionActionList()
{
return await _deviceTechnologyService.GetProductFunctionActionList();
}
///
/// 添加功能参数
///
///
///
[HttpPost("/api/productfunction/addproductfunctionaction")]
public async Task AddProductFunctionAction(ProductFunctionActionBaseDto inputDto)
{
return await _deviceTechnologyService.AddProductFunctionAction(inputDto);
}
///
/// 修改功能参数
///
///
///
[HttpPost("/api/productfunction/updateproductfunctionaction")]
public async Task UpdateProductFunctionAction(ProductFunctionActionBaseDto inputDto)
{
return await _deviceTechnologyService.UpdateProductFunctionAction(inputDto);
}
///
/// 删除功能参数
///
///
///
[HttpPost("/api/productfunction/delproductfunctionaction")]
public async Task DeleteProductFunctionAction(List ids)
{
return await _deviceTechnologyService.DeleteProductFunctionAction(ids);
}
}
}