团餐订单
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

WeighOrderServices.cs 5.4 KiB

pirms 10 mēnešiem
pirms 10 mēnešiem
pirms 10 mēnešiem
pirms 10 mēnešiem
pirms 10 mēnešiem
pirms 10 mēnešiem
pirms 10 mēnešiem
pirms 10 mēnešiem
pirms 9 mēnešiem
pirms 10 mēnešiem
pirms 9 mēnešiem
pirms 10 mēnešiem
pirms 9 mēnešiem
pirms 9 mēnešiem
pirms 10 mēnešiem
pirms 9 mēnešiem
pirms 10 mēnešiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. using BPA.KitChen.GroupMealOrder.Application.BaseDto;
  2. using BPA.KitChen.GroupMealOrder.Application.Service.WeighOrder.Dtos;
  3. using BPA.KitChen.GroupMealOrder.Application.Service.WeighOrder.Service;
  4. using BPA.KitChen.GroupMealOrder.Core.Entity;
  5. using BPA.KitChen.GroupMealOrder.SqlSugar;
  6. using Furion.DatabaseAccessor;
  7. using Furion.DynamicApiController;
  8. using Microsoft.AspNetCore.Authorization;
  9. using Microsoft.AspNetCore.Mvc;
  10. using Newtonsoft.Json;
  11. using SqlSugar;
  12. using System;
  13. using System.Collections.Generic;
  14. using System.Linq;
  15. using System.Text;
  16. using System.Threading.Tasks;
  17. namespace BPA.KitChen.GroupMealOrder.Application.Service.WeighOrder
  18. {
  19. [ApiDescriptionSettings("订单管理", Tag = "称重订单", SplitCamelCase = false)]
  20. public class WeighOrderServices: IDynamicApiController
  21. {
  22. private readonly IWeighOrderService _weighOrderService;
  23. public WeighOrderServices(IWeighOrderService weighOrderService)
  24. {
  25. _weighOrderService = weighOrderService;
  26. }
  27. /// <summary>
  28. /// 创建订单
  29. /// </summary>
  30. /// <param name="inputDto"></param>
  31. /// <returns></returns>
  32. [HttpPost("/api/WeighOrder/CreateWeighOrder")]
  33. public async Task<WeighOrderDto> CreateWeighOrder(WeighOrderCreteDto inputDto)
  34. {
  35. return await _weighOrderService.CreateWeighOrder(inputDto);
  36. }
  37. /// <summary>
  38. /// 添加订单商品
  39. /// </summary>
  40. /// <param name="inputDto"></param>
  41. /// <returns></returns>
  42. [HttpPost("/api/WeighOrder/AddWeighOrderGoods")]
  43. public async Task<bool> AddWeighOrderGoods(List<WeighOrderGoodsCreateDto> inputDto)
  44. {
  45. return await _weighOrderService.AddWeighOrderGoods(inputDto);
  46. }
  47. /// <summary>
  48. /// 添加订单餐盘
  49. /// </summary>
  50. /// <param name="inputDto"></param>
  51. /// <returns></returns>
  52. [HttpPost("/api/WeighOrder/AddWeighOrderDiningPlate")]
  53. public async Task<bool> AddWeighOrderDiningPlate(List<WeighOrderDiningPlateCreateDto> inputDto)
  54. {
  55. return await _weighOrderService.AddWeighOrderDiningPlate(inputDto);
  56. }
  57. /// <summary>
  58. /// 查询称重订单信息 按订单号
  59. /// </summary>
  60. /// <param name="inputDto"></param>
  61. /// <returns></returns>
  62. [HttpPost("/api/WeighOrder/GetWeighOrderByOrderId")]
  63. public async Task<WeighOrderDto> GetWeighOrderByOrderId(GetWeighOrderByOrderIdInputDto inputDto)
  64. {
  65. return await _weighOrderService.GetWeighOrderByOrderId(inputDto);
  66. }
  67. /// <summary>
  68. /// 查询称重订单信息 按芯片码
  69. /// </summary>
  70. /// <param name="inputDto"></param>
  71. /// <returns></returns>
  72. [HttpPost("/api/WeighOrder/GetWeighOrderByChipCode")]
  73. public async Task<WeighOrderDto> GetWeighOrderByChipCode(GetWeighOrderByChipCodeInputDto inputDto)
  74. {
  75. return await _weighOrderService.GetWeighOrderByChipCode(inputDto);
  76. }
  77. /// <summary>
  78. /// 修改订单状态
  79. /// </summary>
  80. /// <returns></returns>
  81. [HttpPost("/api/WeighOrder/UpdateWeighOrderStates")]
  82. public async Task<bool> UpdateWeighOrderStates(WeighOrderUpdateDto inputDto)
  83. {
  84. return await _weighOrderService.UpdateWeighOrderStates(inputDto);
  85. }
  86. /// <summary>
  87. /// 添加 餐盘解绑记录
  88. /// </summary>
  89. /// <param name="inputDto">餐盘ID</param>
  90. /// <returns></returns>
  91. [HttpPost("/api/WeighOrder/AddWeighOrderDiningPlateUnbindRecord"), AllowAnonymous]
  92. public async Task<bool> AddWeighOrderDiningPlateUnbindRecord(List<DiningPlateDto> inputDto)
  93. {
  94. return await _weighOrderService.AddWeighOrderDiningPlateUnbindRecord(inputDto);
  95. }
  96. /// <summary>
  97. /// 获取餐盘绑定信息
  98. /// </summary>
  99. /// <param name="inputDto">餐盘ID</param>
  100. /// <returns></returns>
  101. [HttpPost("/api/WeighOrder/GetDiningPlateOccupyInfo"), AllowAnonymous]
  102. public async Task<List<DiningPlateDto>> GetDiningPlateOccupyInfo(List<string> inputDto)
  103. {
  104. return await _weighOrderService.GetDiningPlateOccupyInfo(inputDto);
  105. }
  106. /// <summary>
  107. /// 更具openid获取称重订单
  108. /// </summary>
  109. /// <returns></returns>
  110. [HttpPost("/api/WeighOrder/GetWeighOrderPageByOpenId"), AllowAnonymous]
  111. public async Task<PageUtil> GetWeighOrderPageByOpenId(GetWeighOrderPageByOpenIdInputDto inputDto)
  112. {
  113. return await _weighOrderService.GetWeighOrderPageByOpenId(inputDto);
  114. }
  115. /// <summary>
  116. /// 更具openid获取称重订单
  117. /// </summary>
  118. /// <returns></returns>
  119. [HttpPost("/api/WeighOrder/GetWeighOrderByOpenId")]
  120. public async Task<WeighOrderDto> GetWeighOrderByOpenId(GetWeighOrderByOpenIdInputDto inputDto)
  121. {
  122. return await _weighOrderService.GetWeighOrderByOpenId(inputDto);
  123. }
  124. /// <summary>
  125. /// 称重订单分页
  126. /// </summary>
  127. /// <param name="inputDto"></param>
  128. /// <returns></returns>
  129. [HttpPost("/api/WeighOrder/GetWeighOrderPage")]
  130. public async Task<PageUtil> GetWeighOrderPage(GetGoodsListInputDto inputDto)
  131. {
  132. return await _weighOrderService.GetWeighOrderPage(inputDto);
  133. }
  134. }
  135. }