using Nirvana.Common;
using Nirvana.Common.ApiBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YBDevice.Entity;

namespace YBDevice.Application.OrderInfo
{
    /// <summary>
    /// 订单管理
    /// </summary>
    public interface IOrderService
    {
        /// <summary>
        /// 订单列表
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<PageParms<OrderDto>> GetListAsync(QueryParams param);

        /// <summary>
        /// 信息提交
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> SubmitAsync(OrderSubmitDto model);
        /// <summary>
        /// 获取订单设备列表
        /// </summary>
        /// <param name="orderid"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <param name="code">设备序列号</param>
        /// <param name="type">设备类型</param>
        /// <returns></returns>
        Task<PageParms<OrderEquDto>> GetOrderEquListAsync(Guid orderid, int page = 1, int pagesize = 50,string code="",int type=0);

        /// <summary>
        /// 订单详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<YB_Order> DetailAsync(Guid id);
        /// <summary>
        /// 状态变更
        /// </summary>
        /// <param name="id"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        Task<ResultInfo> SetStatusAsync(Guid id, OrderStatus status);
    }
}
