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;
}
///
/// 创建订单
///
///
///
[HttpPost("/api/WeighOrder/CreateWeighOrder")]
public async Task CreateWeighOrder(WeighOrderCreteDto inputDto)
{
return await _weighOrderService.CreateWeighOrder(inputDto);
}
///
/// 添加订单商品
///
///
///
[HttpPost("/api/WeighOrder/AddWeighOrderGoods")]
public async Task AddWeighOrderGoods(List inputDto)
{
return await _weighOrderService.AddWeighOrderGoods(inputDto);
}
///
/// 添加订单餐盘
///
///
///
[HttpPost("/api/WeighOrder/AddWeighOrderDiningPlate")]
public async Task AddWeighOrderDiningPlate(List inputDto)
{
return await _weighOrderService.AddWeighOrderDiningPlate(inputDto);
}
///
/// 查询称重订单信息 按订单号
///
///
///
[HttpPost("/api/WeighOrder/GetWeighOrderByOrderId")]
public async Task GetWeighOrderByOrderId(GetWeighOrderByOrderIdInputDto inputDto)
{
return await _weighOrderService.GetWeighOrderByOrderId(inputDto);
}
///
/// 查询称重订单信息 按芯片码
///
///
///
[HttpPost("/api/WeighOrder/GetWeighOrderByChipCode")]
public async Task GetWeighOrderByChipCode(GetWeighOrderByChipCodeInputDto inputDto)
{
return await _weighOrderService.GetWeighOrderByChipCode(inputDto);
}
///
/// 修改订单状态
///
///
[HttpPost("/api/WeighOrder/UpdateWeighOrderStates")]
public async Task UpdateWeighOrderStates(WeighOrderUpdateDto inputDto)
{
return await _weighOrderService.UpdateWeighOrderStates(inputDto);
}
///
/// 添加 餐盘解绑记录
///
/// 餐盘ID
///
[HttpPost("/api/WeighOrder/AddWeighOrderDiningPlateUnbindRecord"), AllowAnonymous]
public async Task AddWeighOrderDiningPlateUnbindRecord(List inputDto)
{
return await _weighOrderService.AddWeighOrderDiningPlateUnbindRecord(inputDto);
}
///
/// 获取餐盘绑定信息
///
/// 餐盘ID
///
[HttpPost("/api/WeighOrder/GetDiningPlateOccupyInfo"), AllowAnonymous]
public async Task> GetDiningPlateOccupyInfo(List inputDto)
{
return await _weighOrderService.GetDiningPlateOccupyInfo(inputDto);
}
///
/// 更具openid获取称重订单
///
///
[HttpPost("/api/WeighOrder/GetWeighOrderPageByOpenId"), AllowAnonymous]
public async Task GetWeighOrderPageByOpenId(GetWeighOrderPageByOpenIdInputDto inputDto)
{
return await _weighOrderService.GetWeighOrderPageByOpenId(inputDto);
}
///
/// 更具openid获取称重订单
///
///
[HttpPost("/api/WeighOrder/GetWeighOrderByOpenId")]
public async Task GetWeighOrderByOpenId(GetWeighOrderByOpenIdInputDto inputDto)
{
return await _weighOrderService.GetWeighOrderByOpenId(inputDto);
}
///
/// 称重订单分页
///
///
///
[HttpPost("/api/WeighOrder/GetWeighOrderPage")]
public async Task GetWeighOrderPage(GetGoodsListInputDto inputDto)
{
return await _weighOrderService.GetWeighOrderPage(inputDto);
}
}
}