|
- using BPA.SAAS.Manage.Application.DataBase.Dtos.Bom;
- using BPA.SAAS.Manage.Application.DataBase.Interface;
- 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;
- }
- /// <summary>
- /// 查询所有配方信息
- /// </summary>
- /// <returns></returns>
- [HttpGet("/api/bom/getbomlist")]
- public async Task<List<BomSelectList>> GetBomList()
- {
- return await _bomService.GetBomList();
- }
- /// <summary>
- /// 添加
- /// </summary>
- /// <param name="dto"></param>
- /// <returns></returns>
- [HttpPost("/api/bom/add")]
- public async Task<bool> AddBom(BomInputDto dto)
- {
- return await _bomService.AddBom(dto);
- }
- /// <summary>
- /// 更新
- /// </summary>
- /// <param name="dto"></param>
- /// <returns></returns>
- [HttpPost("/api/bom/update")]
- public async Task<bool> UpdateBom(BomInputDto dto)
- {
- return await _bomService.UpdateBom(dto);
- }
- /// <summary>
- /// 删除
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- [HttpGet("/api/bom/delete")]
- public async Task<bool> DeleteBom(string id)
- {
- return await _bomService.DeleteBom(id);
- }
- /// <summary>
- /// 添加配方分类
- /// </summary>
- /// <param name="dto"></param>
- /// <returns></returns>
- [HttpPost("/api/bom/addbomtype")]
- public async Task<bool> AddBomType(AddBomTypeInputDto dto)
- {
- return await _bomService.AddBomType(dto);
- }
- /// <summary>
- /// 配方分类列表
- /// </summary>
- /// <returns></returns>
- [HttpGet("/api/bom/getbomtypelist")]
- public async Task<List<dynamic>> GetBomTypeList()
- {
- return await _bomService.GetBomTypeList();
- }
- }
- }
|