using BPA.SAAS.Manage.Application.DataBase.Dtos.Bom;
using BPA.SAAS.Manage.Application.DataBase.Interface;
using BPA.SAAS.Manage.Comm.Enum;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.DataBase;
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.DataBase
{
[ApiDescriptionSettings("Goods", Tag = "配方管理")]
public class BomServices: IDynamicApiController, ITransient
{
IBomService _bomService;
public BomServices(IBomService bomService)
{
_bomService= bomService;
}
///
/// 查询所有配方信息
///
///
[HttpGet("/api/bom/getbomlist")]
public async Task> GetBomList()
{
return await _bomService.GetBomList();
}
///
/// 根据配方id查询配方信息
///
///
///
[HttpGet("/api/bom/getbyidbomlist")]
public async Task GetBomList(string bomId)
{
return await _bomService.GetBomList(bomId);
}
///
/// 添加
///
///
///
[HttpPost("/api/bom/add")]
public async Task AddBom(BomInputDto dto)
{
return await _bomService.AddBom(dto);
}
///
/// 更新
///
///
///
[HttpPost("/api/bom/update")]
public async Task UpdateBom(BomInputDto dto)
{
return await _bomService.UpdateBom(dto);
}
///
/// 更新配方详情
///
///
///
[HttpPost("/api/bom/updatebombatcing")]
public async Task UpdateBomBatcing(BomBatcingInputDto dto)
{
return await _bomService.UpdateBomBatcing(dto);
}
///
/// 删除
///
///
///
[HttpGet("/api/bom/delete")]
public async Task DeleteBom(string id)
{
return await _bomService.DeleteBom(id);
}
///
/// 添加配方分类
///
///
///
[HttpPost("/api/bom/addbomtype")]
public async Task AddBomType(AddBomTypeInputDto dto)
{
return await _bomService.AddBomType(dto);
}
///
/// 配方分类列表
///
///
[HttpGet("/api/bom/getbomtypelist")]
public async Task> GetBomTypeList()
{
return await _bomService.GetBomTypeList();
}
///
///获取 配方列表
///
///
///
[HttpPost("/api/bom/BomPage")]
public async Task BomPage(BomPageInputDto inputDto)
{
return await _bomService.BomPage(inputDto);
}
///
/// 添加配方
///
///
///
[HttpPost("/api/bom/AddBom")]
public async Task AddBom(BomCreateInputDto dto)
{
return await _bomService.AddBom(dto);
}
///
/// 删除配方
///
///
///
[HttpPost("/api/bom/DelBom")]
public async Task DelBom(string id)
{
return await _bomService.DelBom(id);
}
}
}