|
- using BPA.KitChen.GroupMealOrder.Application.BaseDto;
- using BPA.KitChen.GroupMealOrder.Application.Service.WeighOrder.Dtos;
- using BPA.KitChen.GroupMealOrder.Application.Service.WeighOrder.Service;
- using BPA.KitChen.GroupMealOrder.Core.Entity;
- using BPA.KitChen.GroupMealOrder.SqlSugar;
- using Furion.DatabaseAccessor;
- using Furion.DynamicApiController;
- using Microsoft.AspNetCore.Authorization;
- using Microsoft.AspNetCore.Mvc;
- using Newtonsoft.Json;
- using SqlSugar;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPA.KitChen.GroupMealOrder.Application.Service.WeighOrder
- {
-
- [ApiDescriptionSettings("订单管理", Tag = "称重订单", SplitCamelCase = false)]
- public class WeighOrderServices: IDynamicApiController
- {
- private readonly IWeighOrderService _weighOrderService;
- public WeighOrderServices(IWeighOrderService weighOrderService)
- {
- _weighOrderService = weighOrderService;
- }
-
-
- /// <summary>
- /// 创建订单
- /// </summary>
- /// <param name="inputDto"></param>
- /// <returns></returns>
- [HttpPost("/api/WeighOrder/CreateWeighOrder")]
- public async Task<WeighOrderDto> CreateWeighOrder(WeighOrderCreteDto inputDto)
- {
- return await _weighOrderService.CreateWeighOrder(inputDto);
- }
-
- /// <summary>
- /// 添加订单商品
- /// </summary>
- /// <param name="inputDto"></param>
- /// <returns></returns>
- [HttpPost("/api/WeighOrder/AddWeighOrderGoods")]
- public async Task<bool> AddWeighOrderGoods(List<WeighOrderGoodsCreateDto> inputDto)
- {
- return await _weighOrderService.AddWeighOrderGoods(inputDto);
- }
-
- /// <summary>
- /// 添加订单餐盘
- /// </summary>
- /// <param name="inputDto"></param>
- /// <returns></returns>
- [HttpPost("/api/WeighOrder/AddWeighOrderDiningPlate")]
- public async Task<bool> AddWeighOrderDiningPlate(List<WeighOrderDiningPlateCreateDto> inputDto)
- {
- return await _weighOrderService.AddWeighOrderDiningPlate(inputDto);
- }
-
- /// <summary>
- /// 查询称重订单信息 按订单号
- /// </summary>
- /// <param name="inputDto"></param>
- /// <returns></returns>
- [HttpPost("/api/WeighOrder/GetWeighOrderByOrderId")]
- public async Task<WeighOrderDto> GetWeighOrderByOrderId(GetWeighOrderByOrderIdInputDto inputDto)
- {
- return await _weighOrderService.GetWeighOrderByOrderId(inputDto);
- }
-
- /// <summary>
- /// 查询称重订单信息 按芯片码
- /// </summary>
- /// <param name="inputDto"></param>
- /// <returns></returns>
- [HttpPost("/api/WeighOrder/GetWeighOrderByChipCode")]
- public async Task<WeighOrderDto> GetWeighOrderByChipCode(GetWeighOrderByChipCodeInputDto inputDto)
- {
- return await _weighOrderService.GetWeighOrderByChipCode(inputDto);
- }
-
- /// <summary>
- /// 修改订单状态
- /// </summary>
- /// <returns></returns>
- [HttpPost("/api/WeighOrder/UpdateWeighOrderStates")]
- public async Task<bool> UpdateWeighOrderStates(WeighOrderUpdateDto inputDto)
- {
- return await _weighOrderService.UpdateWeighOrderStates(inputDto);
- }
-
-
- /// <summary>
- /// 添加 餐盘解绑记录
- /// </summary>
- /// <param name="inputDto">餐盘ID</param>
- /// <returns></returns>
- [HttpPost("/api/WeighOrder/AddWeighOrderDiningPlateUnbindRecord"), AllowAnonymous]
- public async Task<bool> AddWeighOrderDiningPlateUnbindRecord(List<DiningPlateDto> inputDto)
- {
- return await _weighOrderService.AddWeighOrderDiningPlateUnbindRecord(inputDto);
- }
-
- /// <summary>
- /// 获取餐盘绑定信息
- /// </summary>
- /// <param name="inputDto">餐盘ID</param>
- /// <returns></returns>
- [HttpPost("/api/WeighOrder/GetDiningPlateOccupyInfo"), AllowAnonymous]
- public async Task<List<DiningPlateDto>> GetDiningPlateOccupyInfo(List<string> inputDto)
- {
- return await _weighOrderService.GetDiningPlateOccupyInfo(inputDto);
- }
-
- /// <summary>
- /// 更具openid获取称重订单
- /// </summary>
- /// <returns></returns>
- [HttpPost("/api/WeighOrder/GetWeighOrderPageByOpenId"), AllowAnonymous]
- public async Task<PageUtil> GetWeighOrderPageByOpenId(GetWeighOrderPageByOpenIdInputDto inputDto)
- {
- return await _weighOrderService.GetWeighOrderPageByOpenId(inputDto);
- }
-
- /// <summary>
- /// 更具openid获取称重订单
- /// </summary>
- /// <returns></returns>
- [HttpPost("/api/WeighOrder/GetWeighOrderByOpenId")]
- public async Task<WeighOrderDto> GetWeighOrderByOpenId(GetWeighOrderByOpenIdInputDto inputDto)
- {
- return await _weighOrderService.GetWeighOrderByOpenId(inputDto);
- }
-
- /// <summary>
- /// 称重订单分页
- /// </summary>
- /// <param name="inputDto"></param>
- /// <returns></returns>
- [HttpPost("/api/WeighOrder/GetWeighOrderPage")]
- public async Task<PageUtil> GetWeighOrderPage(GetGoodsListInputDto inputDto)
- {
- return await _weighOrderService.GetWeighOrderPage(inputDto);
- }
-
- }
- }
|