|
- using BPA.SAAS.KitChenManage.Application.Food.Dtos;
- using BPA.SAAS.KitChenManage.Application.Food.Services;
- using BPA.SAAS.KitChenManage.Application.Store.Dtos;
- using BPA.SAAS.KitChenManage.Application.Store.Services;
- using BPA.SAAS.KitChenManage.Core.Base;
- using BPA.SAAS.KitChenManage.Core.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPA.SAAS.KitChenManage.Application.Food
- {
- [ApiDescriptionSettings("FoodMenu", Tag = "场景菜谱管理")]
- public class FoodMenuServices : IDynamicApiController
- {
- IFoodMenuService _foodmenuService;
- public FoodMenuServices(IFoodMenuService foodmenuService)
- {
- _foodmenuService = foodmenuService;
- }
- /// <summary>
- /// 分页查询
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- [HttpPost("/api/foodmenu/page")]
-
- public async Task<PageUtil> Page(FoodMenuDtoPageInput input)
- {
- return await _foodmenuService.Page(input);
- }
- /// <summary>
- /// 添加
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- [HttpPost("/api/foodmenu/add")]
- public async Task<bool> Add(FoodMenuDtoInput input)
- {
- return await _foodmenuService.Add(input);
- }
- /// <summary>
- /// 修改
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- [HttpPost("/api/foodmenu/update")]
- public async Task<bool> Update(FoodMenuDtoInput input)
- {
- return await _foodmenuService.Update(input);
- }
- /// <summary>
- /// 删除
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- [HttpPost("/api/foodmenu/delete")]
- public async Task<bool> Delete(List<string> input)
- {
- return await _foodmenuService.Delete(input);
- }
- /// <summary>
- /// 菜谱关联商品
- /// </summary>
- /// <param name="inputDto"></param>
- /// <returns></returns>
- [HttpPost("/api/foodmenu/editfoodmenugoods")]
- public async Task<bool> EditFoodMenuGoods(FoodMenuBaseDto inputDto)
- {
- return await _foodmenuService.EditFoodMenuGoods(inputDto);
- }
- /// <summary>
- /// 查询菜谱绑定的商品
- /// </summary>
- /// <param name="foodMenuId"></param>
- /// <returns></returns>
- [HttpGet("/api/foodmenu/getfoodmenugoods")]
- public async Task<List<BPA_FoodMenuGoods>> GetFoodMenuGoods(string foodMenuId)
- {
- return await _foodmenuService.GetFoodMenuGoods(foodMenuId);
- }
-
- /// <summary>
- /// 获取设备物料信息
- /// </summary>
- /// <returns></returns>
- [HttpGet("/api/foodmenu/getdevicegoods")]
- public async Task<ResultSAASManageDto> GetDeviceGoods(string deviceId)
- {
- return await _foodmenuService.GetDeviceGoods(deviceId);
-
- }
- }
- }
|