后厨api
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

97 Zeilen
3.1 KiB

  1. using BPA.SAAS.KitChenManage.Application.Food.Dtos;
  2. using BPA.SAAS.KitChenManage.Application.Food.Services;
  3. using BPA.SAAS.KitChenManage.Application.Store.Dtos;
  4. using BPA.SAAS.KitChenManage.Application.Store.Services;
  5. using BPA.SAAS.KitChenManage.Core.Base;
  6. using BPA.SAAS.KitChenManage.Core.Model;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. namespace BPA.SAAS.KitChenManage.Application.Food
  13. {
  14. [ApiDescriptionSettings("FoodMenu", Tag = "场景菜谱管理")]
  15. public class FoodMenuServices : IDynamicApiController
  16. {
  17. IFoodMenuService _foodmenuService;
  18. public FoodMenuServices(IFoodMenuService foodmenuService)
  19. {
  20. _foodmenuService = foodmenuService;
  21. }
  22. /// <summary>
  23. /// 分页查询
  24. /// </summary>
  25. /// <param name="input"></param>
  26. /// <returns></returns>
  27. [HttpPost("/api/foodmenu/page")]
  28. public async Task<PageUtil> Page(FoodMenuDtoPageInput input)
  29. {
  30. return await _foodmenuService.Page(input);
  31. }
  32. /// <summary>
  33. /// 添加
  34. /// </summary>
  35. /// <param name="input"></param>
  36. /// <returns></returns>
  37. [HttpPost("/api/foodmenu/add")]
  38. public async Task<bool> Add(FoodMenuDtoInput input)
  39. {
  40. return await _foodmenuService.Add(input);
  41. }
  42. /// <summary>
  43. /// 修改
  44. /// </summary>
  45. /// <param name="input"></param>
  46. /// <returns></returns>
  47. [HttpPost("/api/foodmenu/update")]
  48. public async Task<bool> Update(FoodMenuDtoInput input)
  49. {
  50. return await _foodmenuService.Update(input);
  51. }
  52. /// <summary>
  53. /// 删除
  54. /// </summary>
  55. /// <param name="input"></param>
  56. /// <returns></returns>
  57. [HttpPost("/api/foodmenu/delete")]
  58. public async Task<bool> Delete(List<string> input)
  59. {
  60. return await _foodmenuService.Delete(input);
  61. }
  62. /// <summary>
  63. /// 菜谱关联商品
  64. /// </summary>
  65. /// <param name="inputDto"></param>
  66. /// <returns></returns>
  67. [HttpPost("/api/foodmenu/editfoodmenugoods")]
  68. public async Task<bool> EditFoodMenuGoods(FoodMenuBaseDto inputDto)
  69. {
  70. return await _foodmenuService.EditFoodMenuGoods(inputDto);
  71. }
  72. /// <summary>
  73. /// 查询菜谱绑定的商品
  74. /// </summary>
  75. /// <param name="foodMenuId"></param>
  76. /// <returns></returns>
  77. [HttpGet("/api/foodmenu/getfoodmenugoods")]
  78. public async Task<List<BPA_FoodMenuGoods>> GetFoodMenuGoods(string foodMenuId)
  79. {
  80. return await _foodmenuService.GetFoodMenuGoods(foodMenuId);
  81. }
  82. /// <summary>
  83. /// 获取设备物料信息
  84. /// </summary>
  85. /// <returns></returns>
  86. [HttpGet("/api/foodmenu/getdevicegoods")]
  87. public async Task<ResultSAASManageDto> GetDeviceGoods(string deviceId)
  88. {
  89. return await _foodmenuService.GetDeviceGoods(deviceId);
  90. }
  91. }
  92. }